From 0bdcd6099ffa3ea9aecf2cbf37aa5b24eac015d3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 6 Oct 2017 13:57:35 +0300 Subject: [PATCH 1/5] Added Sogou Pinyin input in Chrome. --- .../main/app/controller/LeftMenu.js | 5 +++++ apps/documenteditor/main/app/controller/Main.js | 5 +++++ .../main/app/view/FileMenuPanels.js | 16 +++++++++++++++- apps/documenteditor/main/locale/en.json | 1 + .../main/app/controller/LeftMenu.js | 5 +++++ .../main/app/controller/Main.js | 5 +++++ .../main/app/view/FileMenuPanels.js | 16 +++++++++++++++- apps/presentationeditor/main/locale/en.json | 1 + .../main/app/controller/LeftMenu.js | 5 +++++ .../main/app/controller/Main.js | 5 +++++ .../main/app/view/FileMenuPanels.js | 17 ++++++++++++++++- apps/spreadsheeteditor/main/locale/en.json | 2 ++ 12 files changed, 80 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 31ecfc3e7..091e0a127 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -299,6 +299,11 @@ define([ var value; this.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode")); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("de-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + /** coauthoring begin **/ if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) { var fast_coauth = Common.localStorage.getBool("de-settings-coauthmode", true); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 08dbddd8e..6e96e290f 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -800,6 +800,11 @@ define([ me.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode")); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("de-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + /** coauthoring begin **/ if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) { value = Common.localStorage.getItem("de-settings-coauthmode"); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a2953db42..a43602008 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -128,6 +128,10 @@ define([ '', '
', '','', + '', + '', + '
', + '','', '', '', '', @@ -185,6 +189,11 @@ define([ labelText: this.strInputMode }); + this.chInputSogou = new Common.UI.CheckBox({ + el: $('#fms-chb-input-sogou'), + labelText: this.strInputSogou + }); + /** coauthoring begin **/ this.chLiveComment = new Common.UI.CheckBox({ el: $('#fms-chb-live-comment'), @@ -339,10 +348,13 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring && mode.canComments ? 'show' : 'hide'](); /** coauthoring end **/ + + $('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide'](); }, updateSettings: function() { this.chInputMode.setValue(Common.localStorage.getBool("de-settings-inputmode")); + Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("de-settings-inputsogou")); var value = Common.localStorage.getItem("de-settings-zoom"); value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100); @@ -393,6 +405,7 @@ define([ applySettings: function() { Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); + Common.Utils.isChrome && Common.localStorage.setItem("de-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue()); /** coauthoring begin **/ Common.localStorage.setItem("de-settings-livecomment", this.chLiveComment.isChecked() ? 1 : 0); @@ -470,7 +483,8 @@ define([ txtFitWidth: 'Fit to Width', textForceSave: 'Save to Server', strForcesave: 'Always save to server (otherwise save to server on document close)', - strResolvedComment: 'Turn on display of the resolved comments' + strResolvedComment: 'Turn on display of the resolved comments', + strInputSogou: 'Turn on Sogou Pinyin input' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index f15a493ba..c8b492a0c 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -994,6 +994,7 @@ "DE.Views.FileMenuPanels.Settings.strFontRender": "Font Hinting", "DE.Views.FileMenuPanels.Settings.strForcesave": "Always save to server (otherwise save to server on document close)", "DE.Views.FileMenuPanels.Settings.strInputMode": "Turn on hieroglyphs", + "DE.Views.FileMenuPanels.Settings.strInputSogou": "Turn on Sogou Pinyin input", "DE.Views.FileMenuPanels.Settings.strLiveComment": "Turn on display of the comments", "DE.Views.FileMenuPanels.Settings.strResolvedComment": "Turn on display of the resolved comments", "DE.Views.FileMenuPanels.Settings.strShowChanges": "Realtime Collaboration Changes", diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index d41162cdd..7c8a0e8c8 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -240,6 +240,11 @@ define([ applySettings: function(menu) { this.api.SetTextBoxInputMode(Common.localStorage.getBool("pe-settings-inputmode")); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("pe-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + /** coauthoring begin **/ if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) { this.api.asc_SetFastCollaborative(Common.localStorage.getBool("pe-settings-coauthmode", true)); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 9031b0b86..6e2d1d421 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -598,6 +598,11 @@ define([ me.api.SetTextBoxInputMode(Common.localStorage.getBool("pe-settings-inputmode")); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("pe-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + /** coauthoring begin **/ if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) { value = Common.localStorage.getItem("pe-settings-coauthmode"); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 75547a46d..919b9f72c 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -119,6 +119,10 @@ define([ '', '
', '','', + '', + '', + '
', + '','', '', '', '', @@ -173,6 +177,11 @@ define([ labelText: this.strInputMode }); + this.chInputSogou = new Common.UI.CheckBox({ + el: $('#fms-chb-input-sogou'), + labelText: this.strInputSogou + }); + this.cmbZoom = new Common.UI.ComboBox({ el : $('#fms-cmb-zoom'), style : 'width: 160px;', @@ -282,12 +291,15 @@ define([ /** coauthoring begin **/ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ + + $('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide'](); }, updateSettings: function() { this.chSpell.setValue(Common.localStorage.getBool("pe-settings-spellcheck", true)); this.chInputMode.setValue(Common.localStorage.getBool("pe-settings-inputmode")); + Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("pe-settings-inputsogou")); var value = Common.localStorage.getItem("pe-settings-zoom"); value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : -1); @@ -326,6 +338,7 @@ define([ applySettings: function() { Common.localStorage.setItem("pe-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); + Common.Utils.isChrome && Common.localStorage.setItem("pe-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue()); /** coauthoring begin **/ if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) { @@ -376,7 +389,8 @@ define([ textForceSave: 'Save to Server', strForcesave: 'Always save to server (otherwise save to server on document close)', txtSpellCheck: 'Spell Checking', - strSpellCheckMode: 'Turn on spell checking option' + strSpellCheckMode: 'Turn on spell checking option', + strInputSogou: 'Turn on Sogou Pinyin input' }, PE.Views.FileMenuPanels.Settings || {})); PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ef2ba3b31..03cfb7793 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -840,6 +840,7 @@ "PE.Views.FileMenuPanels.Settings.strFast": "Fast", "PE.Views.FileMenuPanels.Settings.strForcesave": "Always save to server (otherwise save to server on document close)", "PE.Views.FileMenuPanels.Settings.strInputMode": "Turn on hieroglyphs", + "PE.Views.FileMenuPanels.Settings.strInputSogou": "Turn on Sogou Pinyin input", "PE.Views.FileMenuPanels.Settings.strShowChanges": "Realtime Collaboration Changes", "PE.Views.FileMenuPanels.Settings.strSpellCheckMode": "Turn on spell checking option", "PE.Views.FileMenuPanels.Settings.strStrict": "Strict", diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 94cfd26db..5d2d000d9 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -264,6 +264,11 @@ define([ applySettings: function(menu) { this.api.asc_setFontRenderingMode(parseInt(Common.localStorage.getItem("sse-settings-fontrender"))); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("sse-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + /** coauthoring begin **/ var value = Common.localStorage.getItem("sse-settings-livecomment"); var resolved = Common.localStorage.getItem("sse-settings-resolvedcomment"); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index e2998582b..72c3d3531 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -149,6 +149,11 @@ define([ }); this.api.asc_setFontRenderingMode(parseInt(value)); + if (Common.Utils.isChrome) { + value = Common.localStorage.getBool("sse-settings-inputsogou"); + window["AscInputMethod"]["SogouPinyin"] = value; + } + this.api.asc_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this)); this.api.asc_registerCallback('asc_onEndAction', _.bind(this.onLongActionEnd, this)); this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this)); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index b5143d50e..978af2c82 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -447,6 +447,10 @@ define([ '', '
', '','', + '', + '', + '
', + '','', '', '', '', @@ -515,6 +519,11 @@ define([ labelText: this.strResolvedComment }); + this.chInputSogou = new Common.UI.CheckBox({ + el: $('#fms-chb-input-sogou'), + labelText: this.strInputSogou + }); + this.cmbCoAuthMode = new Common.UI.ComboBox({ el : $('#fms-cmb-coauth-mode'), style : 'width: 160px;', @@ -679,6 +688,7 @@ define([ $('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring && mode.canComments ? 'show' : 'hide'](); $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring? 'show' : 'hide'](); + $('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide'](); }, setApi: function(api) { @@ -710,6 +720,8 @@ define([ /** coauthoring end **/ value = Common.localStorage.getItem("sse-settings-fontrender"); + Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("sse-settings-inputsogou")); + item = this.cmbFontRender.store.findWhere({value: parseInt(value)}); this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling)); @@ -758,6 +770,7 @@ define([ if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) Common.localStorage.setItem("sse-settings-coauthmode", this.cmbCoAuthMode.getValue()); /** coauthoring end **/ + Common.Utils.isChrome && Common.localStorage.setItem("sse-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0); Common.localStorage.setItem("sse-settings-fontrender", this.cmbFontRender.getValue()); Common.localStorage.setItem("sse-settings-unit", this.cmbUnit.getValue()); Common.localStorage.setItem("sse-settings-autosave", this.chAutosave.isChecked() ? 1 : 0); @@ -838,7 +851,9 @@ define([ txtInch: 'Inch', textForceSave: 'Save to Server', strForcesave: 'Always save to server (otherwise save to server on document close)', - strResolvedComment: 'Turn on display of the resolved comments' + strResolvedComment: 'Turn on display of the resolved comments', + txtInput: 'Alternate Input', + strInputSogou: 'Turn on Sogou Pinyin input' }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 65b365378..6e66bb63b 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1100,6 +1100,7 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.strForcesave": "Always save to server (otherwise save to server on document close)", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocale": "Formula Language", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocaleEx": "Example: SUM; MIN; MAX; COUNT", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strInputSogou": "Turn on Sogou Pinyin input", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strLiveComment": "Turn on display of the comments", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettings": "Regional Settings", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettingsEx": "Example: ", @@ -1120,6 +1121,7 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtDe": "Deutsch", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtEn": "English", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Inch", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInput": "Alternate Input", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtLiveComment": "Commenting Display", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native", From fbc4769cab45d2ccee4f7f67713d54ac85b96f09 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 6 Oct 2017 14:04:01 +0300 Subject: [PATCH 2/5] Update sogou option layout. --- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a43602008..8ef6e6458 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -131,7 +131,7 @@ define([ '', '', '
', - '','', + '','', '', '', '', diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 919b9f72c..4aae8916d 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -122,7 +122,7 @@ define([ '', '', '
', - '','', + '','', '', '', '', diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 978af2c82..8f765ea10 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -450,7 +450,7 @@ define([ '', '', '
', - '','', + '','', '', '', '', From 9757cb175b4a8b370f0853df8bc9ba39f2303a5c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 12 Oct 2017 14:20:32 +0300 Subject: [PATCH 3/5] Use api.setInputParams method for SogouPinyin. --- apps/documenteditor/main/app/controller/LeftMenu.js | 2 +- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/LeftMenu.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/LeftMenu.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 091e0a127..0d4153db8 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -301,7 +301,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("de-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + this.api.setInputParams({"SogouPinyin" : value}); } /** coauthoring begin **/ diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 6e96e290f..32eecc697 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -802,7 +802,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("de-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + me.api.setInputParams({"SogouPinyin" : value}); } /** coauthoring begin **/ diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index 7c8a0e8c8..7e884ea79 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -242,7 +242,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("pe-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + this.api.setInputParams({"SogouPinyin" : value}); } /** coauthoring begin **/ diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 6e2d1d421..01389d58e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -600,7 +600,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("pe-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + me.api.setInputParams({"SogouPinyin" : value}); } /** coauthoring begin **/ diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 5d2d000d9..eaa552fd0 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -266,7 +266,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("sse-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + this.api.setInputParams({"SogouPinyin" : value}); } /** coauthoring begin **/ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 72c3d3531..611b3f7a6 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -151,7 +151,7 @@ define([ if (Common.Utils.isChrome) { value = Common.localStorage.getBool("sse-settings-inputsogou"); - window["AscInputMethod"]["SogouPinyin"] = value; + this.api.setInputParams({"SogouPinyin" : value}); } this.api.asc_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this)); From d668bd150d24f9ff9056d2df0159c6d750ba4918 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 13 Oct 2017 12:47:39 +0300 Subject: [PATCH 4/5] Merge plugins from config, server and from event asc_onPluginsInit. --- apps/documenteditor/main/app/controller/Main.js | 9 +++++---- apps/presentationeditor/main/app/controller/Main.js | 9 +++++---- apps/spreadsheeteditor/main/app/controller/Main.js | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 32eecc697..cf04ef8b1 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1927,9 +1927,10 @@ define([ if (plugins) { var arr = [], arrUI = []; plugins.pluginsData.forEach(function(item){ - if (uiCustomize!==undefined && _.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - })) return; + if (_.find(arr, function(arritem) { + return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); + }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) + return; var variationsArr = [], pluginVisible = false; @@ -1976,7 +1977,7 @@ define([ this.UICustomizePlugins = arrUI; if ( !uiCustomize ) { - if (pluginStore) pluginStore.reset(arr); + if (pluginStore) pluginStore.add(arr); this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 01389d58e..d1b5bcc5d 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1696,9 +1696,10 @@ define([ if (plugins) { var arr = [], arrUI = []; plugins.pluginsData.forEach(function(item){ - if (uiCustomize!==undefined && _.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - })) return; + if (_.find(arr, function(arritem) { + return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); + }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) + return; var variationsArr = [], pluginVisible = false; @@ -1744,7 +1745,7 @@ define([ this.UICustomizePlugins = arrUI; if ( !uiCustomize ) { - if (pluginStore) pluginStore.reset(arr); + if (pluginStore) pluginStore.add(arr); this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 611b3f7a6..ba48e3e05 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1891,9 +1891,10 @@ define([ if (plugins) { var arr = [], arrUI = []; plugins.pluginsData.forEach(function(item){ - if (uiCustomize!==undefined && _.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - })) return; + if (_.find(arr, function(arritem) { + return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); + }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) + return; var variationsArr = [], pluginVisible = false; @@ -1939,7 +1940,7 @@ define([ this.UICustomizePlugins = arrUI; if (!uiCustomize) { - if (pluginStore) pluginStore.reset(arr); + if (pluginStore) pluginStore.add(arr); this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ From a3b22d0ca203c3b56aa5f52a9397b1f759a6c54f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 13 Oct 2017 17:36:52 +0300 Subject: [PATCH 5/5] Fix Bug 36076. --- apps/documenteditor/main/resources/less/leftmenu.less | 2 +- apps/presentationeditor/main/resources/less/leftmenu.less | 2 +- apps/spreadsheeteditor/main/resources/less/leftmenu.less | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/resources/less/leftmenu.less b/apps/documenteditor/main/resources/less/leftmenu.less index f838d62b9..ee490c488 100644 --- a/apps/documenteditor/main/resources/less/leftmenu.less +++ b/apps/documenteditor/main/resources/less/leftmenu.less @@ -71,7 +71,7 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60 color: #6e4e00 !important; white-space: nowrap; line-height: 20px; - writing-mode: vertical-rl; + writing-mode: tb-rl; -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg); diff --git a/apps/presentationeditor/main/resources/less/leftmenu.less b/apps/presentationeditor/main/resources/less/leftmenu.less index 5300f2365..d12639436 100644 --- a/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/apps/presentationeditor/main/resources/less/leftmenu.less @@ -462,7 +462,7 @@ color: #6e4e00 !important; white-space: nowrap; line-height: @app-header-height; - writing-mode: vertical-rl; + writing-mode: tb-rl; -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg); diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 9ee72cb35..100eaaa2d 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -531,7 +531,7 @@ color: #6e4e00 !important; white-space: nowrap; line-height: @app-header-height; - writing-mode: vertical-rl; + writing-mode: tb-rl; -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg);