diff --git a/apps/common/mobile/lib/controller/Plugins.jsx b/apps/common/mobile/lib/controller/Plugins.jsx index 5ec997299..8c7d5394f 100644 --- a/apps/common/mobile/lib/controller/Plugins.jsx +++ b/apps/common/mobile/lib/controller/Plugins.jsx @@ -214,40 +214,7 @@ const PluginsController = inject('storeAppOptions')(observer(props => { plugins.forEach(item => { let plugin = new Asc.CPlugin(); - - plugin.set_Name(item['name']); - plugin.set_Guid(item['guid']); - plugin.set_BaseUrl(item['baseUrl']); - plugin.set_MinVersion && plugin.set_MinVersion(item['minVersion']); - - let variations = item['variations'], - variationsArr = []; - - variations.forEach(itemVar => { - let variation = new Asc.CPluginVariation(); - - variation.set_Description(itemVar['description']); - variation.set_Url(itemVar['url']); - variation.set_Icons(itemVar['icons']); - variation.set_Visual(itemVar['isVisual']); - variation.set_CustomWindow(itemVar['isCustomWindow']); - variation.set_System(itemVar['isSystem']); - variation.set_Viewer(itemVar['isViewer']); - variation.set_EditorsSupport(itemVar['EditorsSupport']); - variation.set_Modal(itemVar['isModal']); - variation.set_InsideMode(itemVar['isInsideMode']); - variation.set_InitDataType(itemVar['initDataType']); - variation.set_InitData(itemVar['initData']); - variation.set_UpdateOleOnResize(itemVar['isUpdateOleOnResize']); - variation.set_Buttons(itemVar['buttons']); - variation.set_Size(itemVar['size']); - variation.set_InitOnSelectionChanged(itemVar['initOnSelectionChanged']); - variation.set_Events(itemVar['events']); - - variationsArr.push(variation); - }); - - plugin["set_Variations"](variationsArr); + plugin.deserialize(item); arr.push(plugin); }); diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index 01f508e3e..1885894af 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -131,8 +131,8 @@ define([ this.rightmenu.fireEvent('editcomplete', this.rightmenu); }, - onFocusObject: function(SelectedObjects) { - if (!this.editMode) + onFocusObject: function(SelectedObjects, forceSignature) { + if (!this.editMode && !forceSignature) return; var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false; @@ -269,6 +269,7 @@ define([ if (priorityactive>-1) active = priorityactive; else if (lastactive>=0 && currentactive<0) active = lastactive; else if (currentactive>=0) active = currentactive; + else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature; else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge; if (active == undefined && open && lastactive>=0) @@ -423,8 +424,9 @@ define([ } this.rightmenu.chartSettings.disableControls(disabled); - if (!allowSignature && this.rightmenu.signatureSettings) { - this.rightmenu.btnSignature.setDisabled(disabled); + if (this.rightmenu.signatureSettings) { + !allowSignature && this.rightmenu.btnSignature.setDisabled(disabled); + allowSignature && disabled && this.onFocusObject([], true); // force press signature button } if (disabled) { diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index e3b20bdfd..8b7114bd4 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1627,6 +1627,8 @@ define([ insertImage: function(data) { // gateway if (data && (data.url || data.images)) { + data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead."); + var arr = []; if (data.images && data.images.length>0) { for (var i=0; i-1) active = priorityactive; else if (currentactive>=0) active = currentactive; else if (lastactive>=0) active = lastactive; + else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature; else active = Common.Utils.documentSettingsType.Slide; if (active !== undefined) { @@ -226,8 +227,9 @@ define([ this.rightmenu.imageSettings.disableControls(disabled); this.rightmenu.chartSettings.disableControls(disabled); - if (!allowSignature && this.rightmenu.signatureSettings) { - this.rightmenu.btnSignature.setDisabled(disabled); + if (this.rightmenu.signatureSettings) { + !allowSignature && this.rightmenu.btnSignature.setDisabled(disabled); + allowSignature && disabled && this.onFocusObject([], true); // force press signature button } if (disabled) { diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index cfea951bc..c2e3935db 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1627,6 +1627,8 @@ define([ insertImage: function(data) { // gateway if (data && (data.url || data.images)) { + data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead."); + var arr = []; if (data.images && data.images.length>0) { for (var i=0; i-1) active = priorityactive; else if (lastactive>=0 && currentactive<0) active = lastactive; else if (currentactive>=0) active = currentactive; + else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature; if (active == undefined && this._openRightMenu && lastactive>=0) active = lastactive; @@ -425,12 +426,9 @@ define([ this.rightmenu.cellSettings.disableControls(disabled); this.rightmenu.slicerSettings.disableControls(disabled); - if (!allowSignature && this.rightmenu.signatureSettings) { - this.rightmenu.btnSignature.setDisabled(disabled); - } - - if (!allowSignature && this.rightmenu.signatureSettings) { - this.rightmenu.btnSignature.setDisabled(disabled); + if (this.rightmenu.signatureSettings) { + !allowSignature && this.rightmenu.btnSignature.setDisabled(disabled); + allowSignature && disabled && this.onFocusObject([], undefined, undefined, undefined, undefined, true); // force press signature button } if (disabled) { diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 993366fde..e045f7e44 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -908,6 +908,8 @@ define([ insertImage: function(data) { // gateway if (data && (data.url || data.images)) { + data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead."); + var arr = []; if (data.images && data.images.length>0) { for (var i=0; i