mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 02:38:59 +08:00
[PE][SSE] Fix open right pane
This commit is contained in:
@ -577,7 +577,7 @@ define([
|
||||
},
|
||||
|
||||
tryToShowRightMenu: function() {
|
||||
if (this.rightmenu && this.rightmenu.mode && (!this.rightmenu.mode.canBrandingExt || !this.rightmenu.mode.customization || this.mode.customization.rightMenu !== false) && Common.UI.LayoutManager.isElementVisible('rightMenu'))
|
||||
if (this.rightmenu && this.rightmenu.mode && (!this.rightmenu.mode.canBrandingExt || !this.rightmenu.mode.customization || this.rightmenu.mode.customization.rightMenu !== false) && Common.UI.LayoutManager.isElementVisible('rightMenu'))
|
||||
this.onRightMenuHide(null, true);
|
||||
},
|
||||
|
||||
|
||||
@ -441,6 +441,7 @@ define([
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("pe-hide-right-settings"));
|
||||
this._lastVisibleSettings = undefined;
|
||||
}
|
||||
!view && this.rightmenu.fireEvent('view:hide', [this, !status]);
|
||||
Common.localStorage.setBool('pe-hidden-rightmenu', !status);
|
||||
Common.Utils.InternalSettings.set("pe-hidden-rightmenu", !status);
|
||||
}
|
||||
@ -452,11 +453,17 @@ define([
|
||||
onRightMenuOpen: function(type) {
|
||||
if (this._settings[type]===undefined || this._settings[type].hidden || this._settings[type].btn.isDisabled() || this._settings[type].panelId===this.rightmenu.GetActivePane()) return;
|
||||
|
||||
this.tryToShowRightMenu();
|
||||
this.rightmenu.SetActivePane(type, true);
|
||||
this._settings[type].panel.ChangeSettings.call(this._settings[type].panel, this._settings[type].props);
|
||||
this.rightmenu.updateScroller();
|
||||
},
|
||||
|
||||
tryToShowRightMenu: function() {
|
||||
if (this.rightmenu && this.rightmenu.mode && (!this.rightmenu.mode.canBrandingExt || !this.rightmenu.mode.customization || this.rightmenu.mode.customization.rightMenu !== false) && Common.UI.LayoutManager.isElementVisible('rightMenu'))
|
||||
this.onRightMenuHide(null, true);
|
||||
},
|
||||
|
||||
addNewPlugin: function (button, $button, $panel) {
|
||||
this.rightmenu.insertButton(button, $button);
|
||||
this.rightmenu.insertPanel($panel);
|
||||
|
||||
@ -135,6 +135,11 @@ define([
|
||||
'view:hide': _.bind(function (leftmenu, state) {
|
||||
this.view.chLeftMenu.setValue(!state, true);
|
||||
}, this)
|
||||
},
|
||||
'RightMenu': {
|
||||
'view:hide': _.bind(function (leftmenu, state) {
|
||||
this.view.chRightMenu.setValue(!state, true);
|
||||
}, this)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -244,6 +244,7 @@ define([
|
||||
},
|
||||
|
||||
setMode: function(mode) {
|
||||
this.mode = mode;
|
||||
this.imageSettings && this.imageSettings.setMode(mode);
|
||||
this.shapeSettings && this.shapeSettings.setMode(mode);
|
||||
this.slideSettings && this.slideSettings.setMode(mode);
|
||||
|
||||
@ -523,6 +523,7 @@ define([
|
||||
this.onSelectionChanged(this.api.asc_getCellInfo());
|
||||
this._lastVisibleSettings = undefined;
|
||||
}
|
||||
!view && this.rightmenu.fireEvent('view:hide', [this, !status]);
|
||||
Common.localStorage.setBool('sse-hidden-rightmenu', !status);
|
||||
}
|
||||
|
||||
@ -533,11 +534,17 @@ define([
|
||||
onRightMenuOpen: function(type) {
|
||||
if (this._settings[type]===undefined || this._settings[type].hidden || this._settings[type].btn.isDisabled() || this._settings[type].panelId===this.rightmenu.GetActivePane()) return;
|
||||
|
||||
this.tryToShowRightMenu();
|
||||
this.rightmenu.SetActivePane(type, true);
|
||||
this._settings[type].panel.ChangeSettings.call(this._settings[type].panel, this._settings[type].props);
|
||||
this.rightmenu.updateScroller();
|
||||
},
|
||||
|
||||
tryToShowRightMenu: function() {
|
||||
if (this.rightmenu && this.rightmenu.mode && (!this.rightmenu.mode.canBrandingExt || !this.rightmenu.mode.customization || this.rightmenu.mode.customization.rightMenu !== false) && Common.UI.LayoutManager.isElementVisible('rightMenu'))
|
||||
this.onRightMenuHide(null, true);
|
||||
},
|
||||
|
||||
addNewPlugin: function (button, $button, $panel) {
|
||||
this.rightmenu.insertButton(button, $button);
|
||||
this.rightmenu.insertPanel($panel);
|
||||
|
||||
@ -117,6 +117,11 @@ define([
|
||||
'view:hide': _.bind(function (leftmenu, state) {
|
||||
this.view.chLeftMenu.setValue(!state, true);
|
||||
}, this)
|
||||
},
|
||||
'RightMenu': {
|
||||
'view:hide': _.bind(function (leftmenu, state) {
|
||||
this.view.chRightMenu.setValue(!state, true);
|
||||
}, this)
|
||||
}
|
||||
});
|
||||
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
||||
|
||||
Reference in New Issue
Block a user