Fix click on buttons when left menu is hidden

This commit is contained in:
Julia Radzhabova 2022-06-09 00:09:42 +03:00
parent 14442d55d8
commit 79428de692
4 changed files with 20 additions and 4 deletions

View file

@ -68,11 +68,14 @@ define([
initialize: function(options) {
_.extend(this, options);
Common.UI.BaseView.prototype.initialize.call(this, arguments);
var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
},
render: function(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({
el: $('#history-list'),

View file

@ -202,7 +202,7 @@ define([
this.$el.width(parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART);
}
} 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);
}
@ -497,6 +497,11 @@ define([
}
this.limitHint && this.limitHint.css('top', top);
},
isVisible: function () {
return this.$el && this.$el.is(':visible');
},
/** coauthoring begin **/
tipComments : 'Comments',
tipChat : 'Chat',

View file

@ -195,7 +195,7 @@ define([
this.$el.width(Common.localStorage.getItem('pe-mainmenu-width') || MENU_SCALE_PART);
}
} 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.onCoauthOptions();
@ -453,6 +453,10 @@ define([
Common.NotificationCenter.trigger('layout:changed', 'history');
},
isVisible: function () {
return this.$el && this.$el.is(':visible');
},
/** coauthoring begin **/
tipComments : 'Comments',
tipChat : 'Chat',

View file

@ -179,7 +179,7 @@ define([
this.$el.width(Common.localStorage.getItem('sse-mainmenu-width') || MENU_SCALE_PART);
}
} 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.onCoauthOptions();
@ -439,6 +439,10 @@ define([
Common.NotificationCenter.trigger('layout:changed', 'history');
},
isVisible: function () {
return this.$el && this.$el.is(':visible');
},
/** coauthoring begin **/
tipComments : 'Comments',
tipChat : 'Chat',