[DE] Show right panel after preview modes (form, review)

This commit is contained in:
Julia Radzhabova 2022-02-10 19:28:29 +03:00
parent f812d0eade
commit ad0e2d6002
4 changed files with 8 additions and 5 deletions

View file

@ -788,7 +788,7 @@ define([
allowMerge: false, allowMerge: false,
allowSignature: false, allowSignature: false,
allowProtect: false, allowProtect: false,
rightMenu: {clear: true, disable: true}, rightMenu: {clear: disable, disable: true},
statusBar: true, statusBar: true,
leftMenu: {disable: false, previewMode: true}, leftMenu: {disable: false, previewMode: true},
fileMenu: {protect: true}, fileMenu: {protect: true},

View file

@ -306,7 +306,7 @@ define([
allowMerge: false, allowMerge: false,
allowSignature: false, allowSignature: false,
allowProtect: false, allowProtect: false,
rightMenu: {clear: true, disable: true}, rightMenu: {clear: disable, disable: true},
statusBar: true, statusBar: true,
leftMenu: {disable: false, previewMode: true}, leftMenu: {disable: false, previewMode: true},
fileMenu: false, fileMenu: false,

View file

@ -135,11 +135,11 @@ define([
this.onFocusObject(SelectedObjects); this.onFocusObject(SelectedObjects);
}, },
onFocusObject: function(SelectedObjects, forceSignature) { onFocusObject: function(SelectedObjects, forceSignature, forceOpen) {
if (!this.editMode && !forceSignature) if (!this.editMode && !forceSignature)
return; return;
var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false; var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : !!forceOpen;
this._initSettings = false; this._initSettings = false;
var can_add_table = false, var can_add_table = false,
@ -447,7 +447,7 @@ define([
} else { } else {
var selectedElements = this.api.getSelectedElements(); var selectedElements = this.api.getSelectedElements();
if (selectedElements.length > 0) if (selectedElements.length > 0)
this.onFocusObject(selectedElements); this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("de-hide-right-settings"));
} }
} }
}, },

View file

@ -151,6 +151,7 @@ define([
this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu; this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu;
var open = !Common.localStorage.getBool("de-hide-right-settings", this.defaultHideRightMenu); var open = !Common.localStorage.getBool("de-hide-right-settings", this.defaultHideRightMenu);
Common.Utils.InternalSettings.set("de-hide-right-settings", !open);
this.$el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px'); this.$el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px');
this.$el.show(); this.$el.show();
@ -279,6 +280,7 @@ define([
target_pane_parent.css("display", "inline-block" ); target_pane_parent.css("display", "inline-block" );
this.minimizedMode = false; this.minimizedMode = false;
Common.localStorage.setItem("de-hide-right-settings", 0); Common.localStorage.setItem("de-hide-right-settings", 0);
Common.Utils.InternalSettings.set("de-hide-right-settings", false);
} }
target_pane_parent.find('> .active').removeClass('active'); target_pane_parent.find('> .active').removeClass('active');
target_pane.addClass("active"); target_pane.addClass("active");
@ -291,6 +293,7 @@ define([
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("de-hide-right-settings", 1); Common.localStorage.setItem("de-hide-right-settings", 1);
Common.Utils.InternalSettings.set("de-hide-right-settings", true);
} }
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]); this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]);