Fix click on buttons when left menu is hidden
This commit is contained in:
parent
14442d55d8
commit
79428de692
|
@ -68,11 +68,14 @@ define([
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
_.extend(this, options);
|
_.extend(this, options);
|
||||||
Common.UI.BaseView.prototype.initialize.call(this, arguments);
|
Common.UI.BaseView.prototype.initialize.call(this, arguments);
|
||||||
|
|
||||||
|
var filter = Common.localStorage.getKeysFilter();
|
||||||
|
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function(el) {
|
render: function(el) {
|
||||||
el = el || this.el;
|
el = el || this.el;
|
||||||
$(el).html(this.template({scope: this})).width( (parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
|
$(el).html(this.template({scope: this})).width( (parseInt(Common.localStorage.getItem(this.appPrefix + 'mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
|
||||||
|
|
||||||
this.viewHistoryList = new Common.UI.DataView({
|
this.viewHistoryList = new Common.UI.DataView({
|
||||||
el: $('#history-list'),
|
el: $('#history-list'),
|
||||||
|
|
|
@ -202,7 +202,7 @@ define([
|
||||||
this.$el.width(parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART);
|
this.$el.width(parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART);
|
||||||
}
|
}
|
||||||
} else if (!this._state.pluginIsRunning) {
|
} else if (!this._state.pluginIsRunning) {
|
||||||
Common.localStorage.setItem('de-mainmenu-width',this.$el.width());
|
this.isVisible() && Common.localStorage.setItem('de-mainmenu-width',this.$el.width());
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,6 +497,11 @@ define([
|
||||||
}
|
}
|
||||||
this.limitHint && this.limitHint.css('top', top);
|
this.limitHint && this.limitHint.css('top', top);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isVisible: function () {
|
||||||
|
return this.$el && this.$el.is(':visible');
|
||||||
|
},
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
tipComments : 'Comments',
|
tipComments : 'Comments',
|
||||||
tipChat : 'Chat',
|
tipChat : 'Chat',
|
||||||
|
|
|
@ -195,7 +195,7 @@ define([
|
||||||
this.$el.width(Common.localStorage.getItem('pe-mainmenu-width') || MENU_SCALE_PART);
|
this.$el.width(Common.localStorage.getItem('pe-mainmenu-width') || MENU_SCALE_PART);
|
||||||
}
|
}
|
||||||
} else if (!this._state.pluginIsRunning){
|
} else if (!this._state.pluginIsRunning){
|
||||||
Common.localStorage.setItem('pe-mainmenu-width',this.$el.width());
|
this.isVisible() && Common.localStorage.setItem('pe-mainmenu-width',this.$el.width());
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
}
|
}
|
||||||
this.onCoauthOptions();
|
this.onCoauthOptions();
|
||||||
|
@ -453,6 +453,10 @@ define([
|
||||||
Common.NotificationCenter.trigger('layout:changed', 'history');
|
Common.NotificationCenter.trigger('layout:changed', 'history');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isVisible: function () {
|
||||||
|
return this.$el && this.$el.is(':visible');
|
||||||
|
},
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
tipComments : 'Comments',
|
tipComments : 'Comments',
|
||||||
tipChat : 'Chat',
|
tipChat : 'Chat',
|
||||||
|
|
|
@ -179,7 +179,7 @@ define([
|
||||||
this.$el.width(Common.localStorage.getItem('sse-mainmenu-width') || MENU_SCALE_PART);
|
this.$el.width(Common.localStorage.getItem('sse-mainmenu-width') || MENU_SCALE_PART);
|
||||||
}
|
}
|
||||||
} else if (!this._state.pluginIsRunning){
|
} else if (!this._state.pluginIsRunning){
|
||||||
Common.localStorage.setItem('sse-mainmenu-width',this.$el.width());
|
this.isVisible() && Common.localStorage.setItem('sse-mainmenu-width',this.$el.width());
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
}
|
}
|
||||||
this.onCoauthOptions();
|
this.onCoauthOptions();
|
||||||
|
@ -439,6 +439,10 @@ define([
|
||||||
Common.NotificationCenter.trigger('layout:changed', 'history');
|
Common.NotificationCenter.trigger('layout:changed', 'history');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isVisible: function () {
|
||||||
|
return this.$el && this.$el.is(':visible');
|
||||||
|
},
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
tipComments : 'Comments',
|
tipComments : 'Comments',
|
||||||
tipChat : 'Chat',
|
tipChat : 'Chat',
|
||||||
|
|
Loading…
Reference in a new issue