commit
ba32c0ab2a
|
@ -138,10 +138,10 @@ define([
|
|||
props = me.api.asc_getDocumentProtection();
|
||||
if (props && props.asc_getIsPassword()) {
|
||||
var win = new Common.Views.OpenDialog({
|
||||
title: me.view.txtWBUnlockTitle,
|
||||
title: me.view.txtUnlockTitle,
|
||||
closable: true,
|
||||
type: Common.Utils.importTextType.DRM,
|
||||
txtOpenFile: me.view.txtWBUnlockDescription,
|
||||
txtOpenFile: me.view.txtDocUnlockDescription,
|
||||
validatePwd: false,
|
||||
maxPasswordLength: 15,
|
||||
handler: function (result, value) {
|
||||
|
|
|
@ -463,7 +463,8 @@ define([
|
|||
} else {
|
||||
var selectedElements = this.api.getSelectedElements();
|
||||
if (selectedElements.length > 0)
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("de-hide-right-settings"));
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("de-hide-right-settings") && // user didn't close panel
|
||||
!Common.Utils.InternalSettings.get("de-hidden-rightmenu")); // user didn't hide right menu
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -496,11 +497,17 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onRightMenuHide: function (view, status) {
|
||||
onRightMenuHide: function (view, status) { // status = true when show panel
|
||||
if (this.rightmenu) {
|
||||
!status && this.rightmenu.clearSelection();
|
||||
status ? this.rightmenu.show() : this.rightmenu.hide();
|
||||
Common.localStorage.setBool('de-hidden-rightmenu', !status);
|
||||
Common.Utils.InternalSettings.set("de-hidden-rightmenu", !status);
|
||||
if (status) {
|
||||
var selectedElements = this.api.getSelectedElements();
|
||||
if (selectedElements.length > 0)
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("de-hide-right-settings"));
|
||||
}
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('layout:changed', 'main');
|
||||
|
|
|
@ -141,7 +141,8 @@ define([
|
|||
txtDocProtectedComment: 'Document is protected.<br>You may only insert comments to this document.',
|
||||
txtDocProtectedForms: 'Document is protected.<br>You may only fill in forms in this document.',
|
||||
hintProtectDoc: 'Protect document',
|
||||
txtDocUnlockDescription: 'Enter a password to unprotect document'
|
||||
txtDocUnlockDescription: 'Enter a password to unprotect document',
|
||||
txtUnlockTitle: 'Unprotect Document'
|
||||
}
|
||||
}()), DE.Views.DocProtection || {}));
|
||||
});
|
|
@ -144,6 +144,7 @@ define([
|
|||
var value = Common.UI.LayoutManager.getInitValue('rightMenu');
|
||||
value = (value!==undefined) ? !value : false;
|
||||
Common.localStorage.getBool("de-hidden-rightmenu", value) && me._rightMenu.hide();
|
||||
Common.Utils.InternalSettings.set("de-hidden-rightmenu", Common.localStorage.getBool("de-hidden-rightmenu", value));
|
||||
},
|
||||
|
||||
applyCommonMode: function() {
|
||||
|
|
|
@ -1632,6 +1632,7 @@
|
|||
"DE.Views.DocProtection.txtDocProtectedTrack": "Document is protected.<br>You may edit this document, but all changes will be tracked.",
|
||||
"DE.Views.DocProtection.txtDocProtectedView": "Document is protected.<br>You may only view this document.",
|
||||
"DE.Views.DocProtection.txtDocUnlockDescription": "Enter a password to unprotect document",
|
||||
"DE.Views.DocProtection.txtUnlockTitle": "Unprotect Document",
|
||||
"DE.Views.DocProtection.txtProtectDoc": "Protect Document",
|
||||
"DE.Views.DocumentHolder.aboveText": "Above",
|
||||
"DE.Views.DocumentHolder.addCommentText": "Add comment",
|
||||
|
|
|
@ -117,11 +117,11 @@ define([
|
|||
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
|
||||
},
|
||||
|
||||
onFocusObject: function(SelectedObjects, forceSignature) {
|
||||
onFocusObject: function(SelectedObjects, forceSignature, forceOpen) {
|
||||
if (!this.editMode && !forceSignature)
|
||||
return;
|
||||
|
||||
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
|
||||
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : !!forceOpen;
|
||||
this._initSettings = false;
|
||||
|
||||
var needhide = true;
|
||||
|
@ -206,13 +206,19 @@ define([
|
|||
if (!this.rightmenu.minimizedMode || open) {
|
||||
var active;
|
||||
|
||||
if (priorityactive<0 && this._priorityArr.length>0) {
|
||||
for (i=0; i<this._priorityArr.length; i++) {
|
||||
var type = this._priorityArr[i],
|
||||
pnl = this._settings[type];
|
||||
if (pnl===undefined || pnl.btn===undefined || pnl.panel===undefined || pnl.hidden) continue;
|
||||
priorityactive = type;
|
||||
break;
|
||||
if (priorityactive<0) {
|
||||
if (this._priorityArr.length>0) {
|
||||
for (i=0; i<this._priorityArr.length; i++) {
|
||||
var type = this._priorityArr[i],
|
||||
pnl = this._settings[type];
|
||||
if (pnl===undefined || pnl.btn===undefined || pnl.panel===undefined || pnl.hidden) continue;
|
||||
priorityactive = type;
|
||||
break;
|
||||
}
|
||||
} else if (this._lastVisibleSettings!==undefined) {
|
||||
var pnl = this._settings[this._lastVisibleSettings];
|
||||
if (pnl!==undefined && pnl.btn!==undefined && pnl.panel!==undefined && !pnl.hidden)
|
||||
priorityactive = this._lastVisibleSettings;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,7 +274,8 @@ define([
|
|||
} else {
|
||||
var selectedElements = this.api.getSelectedElements();
|
||||
if (selectedElements.length > 0)
|
||||
this.onFocusObject(selectedElements);
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("pe-hide-right-settings") &&
|
||||
!Common.Utils.InternalSettings.get("pe-hidden-rightmenu"));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -391,9 +398,29 @@ define([
|
|||
|
||||
onRightMenuHide: function (view, status) {
|
||||
if (this.rightmenu) {
|
||||
!status && this.rightmenu.clearSelection();
|
||||
status ? this.rightmenu.show() : this.rightmenu.hide();
|
||||
if (!status) { // remember last active pane
|
||||
var active = this.rightmenu.GetActivePane(),
|
||||
type;
|
||||
if (active) {
|
||||
for (var i=0; i<this._settings.length; i++) {
|
||||
if (this._settings[i] && this._settings[i].panelId === active) {
|
||||
type = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this._lastVisibleSettings = type;
|
||||
}
|
||||
this.rightmenu.clearSelection();
|
||||
this.rightmenu.hide();
|
||||
} else {
|
||||
this.rightmenu.show();
|
||||
var selectedElements = this.api.getSelectedElements();
|
||||
if (selectedElements.length > 0)
|
||||
this.onFocusObject(selectedElements, false, !Common.Utils.InternalSettings.get("pe-hide-right-settings"));
|
||||
this._lastVisibleSettings = undefined;
|
||||
}
|
||||
Common.localStorage.setBool('pe-hidden-rightmenu', !status);
|
||||
Common.Utils.InternalSettings.set("pe-hidden-rightmenu", !status);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('layout:changed', 'main');
|
||||
|
|
|
@ -151,6 +151,7 @@ define([
|
|||
|
||||
this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu;
|
||||
var open = !Common.localStorage.getBool("pe-hide-right-settings", this.defaultHideRightMenu);
|
||||
Common.Utils.InternalSettings.set("pe-hide-right-settings", !open);
|
||||
el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px');
|
||||
el.show();
|
||||
|
||||
|
@ -243,6 +244,7 @@ define([
|
|||
target_pane_parent.css("display", "inline-block" );
|
||||
this.minimizedMode = false;
|
||||
Common.localStorage.setItem("pe-hide-right-settings", 0);
|
||||
Common.Utils.InternalSettings.set("pe-hide-right-settings", false);
|
||||
}
|
||||
target_pane_parent.find('> .active').removeClass('active');
|
||||
target_pane.addClass("active");
|
||||
|
@ -256,6 +258,7 @@ define([
|
|||
$(this.el).width(SCALE_MIN);
|
||||
this.minimizedMode = true;
|
||||
Common.localStorage.setItem("pe-hide-right-settings", 1);
|
||||
Common.Utils.InternalSettings.set("pe-hide-right-settings", true);
|
||||
}
|
||||
|
||||
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]);
|
||||
|
|
|
@ -145,6 +145,7 @@ define([
|
|||
var value = Common.UI.LayoutManager.getInitValue('rightMenu');
|
||||
value = (value!==undefined) ? !value : false;
|
||||
Common.localStorage.getBool("pe-hidden-rightmenu", value) && me._rightMenu.hide();
|
||||
Common.Utils.InternalSettings.set("pe-hidden-rightmenu", Common.localStorage.getBool("pe-hidden-rightmenu", value));
|
||||
},
|
||||
|
||||
applyCommonMode: function() {
|
||||
|
|
|
@ -281,6 +281,12 @@ define([
|
|||
if (!this.rightmenu.minimizedMode || this._openRightMenu) {
|
||||
var active;
|
||||
|
||||
if (priorityactive<0 && this._lastVisibleSettings!==undefined) {
|
||||
var pnl = this._settings[this._lastVisibleSettings];
|
||||
if (pnl!==undefined && pnl.btn!==undefined && pnl.panel!==undefined && !pnl.hidden)
|
||||
priorityactive = this._lastVisibleSettings;
|
||||
}
|
||||
|
||||
if (priorityactive<0 && !this._settings[Common.Utils.documentSettingsType.Cell].hidden &&
|
||||
(!this._settings[Common.Utils.documentSettingsType.Table].hidden || !this._settings[Common.Utils.documentSettingsType.Pivot].hidden ||
|
||||
!this._settings[Common.Utils.documentSettingsType.Chart].hidden)) {
|
||||
|
@ -372,7 +378,8 @@ define([
|
|||
var me = this;
|
||||
if (this.api) {
|
||||
this._openRightMenu = !Common.localStorage.getBool("sse-hide-right-settings", this.rightmenu.defaultHideRightMenu);
|
||||
|
||||
Common.Utils.InternalSettings.set("sse-hide-right-settings", !this._openRightMenu);
|
||||
|
||||
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
|
||||
this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this));
|
||||
// this.rightmenu.shapeSettings.createDelayedElements();
|
||||
|
@ -473,8 +480,26 @@ define([
|
|||
|
||||
onRightMenuHide: function (view, status) {
|
||||
if (this.rightmenu) {
|
||||
!status && this.rightmenu.clearSelection();
|
||||
status ? this.rightmenu.show() : this.rightmenu.hide();
|
||||
if (!status) { // remember last active pane
|
||||
var active = this.rightmenu.GetActivePane(),
|
||||
type;
|
||||
if (active) {
|
||||
for (var i=0; i<this._settings.length; i++) {
|
||||
if (this._settings[i] && this._settings[i].panelId === active) {
|
||||
type = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this._lastVisibleSettings = type;
|
||||
}
|
||||
this.rightmenu.clearSelection();
|
||||
this.rightmenu.hide();
|
||||
} else {
|
||||
this.rightmenu.show();
|
||||
this._openRightMenu = !Common.Utils.InternalSettings.get("sse-hide-right-settings");
|
||||
this.onSelectionChanged(this.api.asc_getCellInfo());
|
||||
this._lastVisibleSettings = undefined;
|
||||
}
|
||||
Common.localStorage.setBool('sse-hidden-rightmenu', !status);
|
||||
}
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ define([
|
|||
|
||||
this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu;
|
||||
var open = !Common.localStorage.getBool("sse-hide-right-settings", this.defaultHideRightMenu);
|
||||
Common.Utils.InternalSettings.set("sse-hide-right-settings", !open);
|
||||
el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px');
|
||||
el.css('z-index', 101);
|
||||
el.show();
|
||||
|
@ -280,6 +281,7 @@ define([
|
|||
target_pane_parent.css("display", "inline-block" );
|
||||
this.minimizedMode = false;
|
||||
Common.localStorage.setItem("sse-hide-right-settings", 0);
|
||||
Common.Utils.InternalSettings.set("sse-hide-right-settings", false);
|
||||
}
|
||||
target_pane_parent.find('> .active').removeClass('active');
|
||||
target_pane.addClass("active");
|
||||
|
@ -292,6 +294,7 @@ define([
|
|||
$(this.el).width(SCALE_MIN);
|
||||
this.minimizedMode = true;
|
||||
Common.localStorage.setItem("sse-hide-right-settings", 1);
|
||||
Common.Utils.InternalSettings.set("sse-hide-right-settings", true);
|
||||
}
|
||||
|
||||
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]);
|
||||
|
|
Loading…
Reference in a new issue