From e6638eb94f911ab03f0d91b5ed40e150d47286a8 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 3 Oct 2022 16:01:19 +0300 Subject: [PATCH] [DE PE SSE] Change variable name to reset Use Alt Key setting --- apps/common/main/lib/controller/HintManager.js | 4 ++-- apps/documenteditor/main/app/controller/Main.js | 4 ++-- apps/documenteditor/main/app/view/FileMenuPanels.js | 6 +++--- apps/presentationeditor/main/app/controller/Main.js | 4 ++-- apps/presentationeditor/main/app/view/FileMenuPanels.js | 6 +++--- apps/spreadsheeteditor/main/app/controller/Main.js | 4 ++-- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/common/main/lib/controller/HintManager.js b/apps/common/main/lib/controller/HintManager.js index 45963aeb7..70d88da5e 100644 --- a/apps/common/main/lib/controller/HintManager.js +++ b/apps/common/main/lib/controller/HintManager.js @@ -620,10 +620,10 @@ Common.UI.HintManager = new(function() { } } - _needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT && + _needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0 && !(window.PE && $('#pe-preview').is(':visible'))); - if (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && e.altKey && e.keyCode !== 115) { + if (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && e.altKey && e.keyCode !== 115) { e.preventDefault(); } }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 92a860db9..531895fce 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1227,8 +1227,8 @@ define([ Common.Utils.InternalSettings.set("de-settings-inputmode", value); me.api.SetTextBoxInputMode(value); - value = Common.localStorage.getBool("de-settings-use-alt-key", Common.Utils.isMac ? false : true); - Common.Utils.InternalSettings.set("de-settings-use-alt-key", value); + value = Common.localStorage.getBool("de-settings-show-alt-hints", Common.Utils.isMac ? false : true); + Common.Utils.InternalSettings.set("de-settings-show-alt-hints", value); /** coauthoring begin **/ me._state.fastCoauth = Common.Utils.InternalSettings.get("de-settings-coauthmode"); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 7c5689823..9b52cf439 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -790,7 +790,7 @@ define([ updateSettings: function() { this.chInputMode.setValue(Common.Utils.InternalSettings.get("de-settings-inputmode")); - this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("de-settings-use-alt-key")); + this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("de-settings-show-alt-hints")); var value = Common.Utils.InternalSettings.get("de-settings-zoom"); value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100); @@ -874,8 +874,8 @@ define([ if (!this.chDarkMode.isDisabled() && (this.chDarkMode.isChecked() !== Common.UI.Themes.isContentThemeDark())) Common.UI.Themes.toggleContentTheme(); Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); - Common.localStorage.setItem("de-settings-use-alt-key", this.chUseAltKey.isChecked() ? 1 : 0); - Common.Utils.InternalSettings.set("de-settings-use-alt-key", Common.localStorage.getBool("de-settings-use-alt-key")); + Common.localStorage.setItem("de-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0); + Common.Utils.InternalSettings.set("de-settings-show-alt-hints", Common.localStorage.getBool("de-settings-show-alt-hints")); Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom")); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index e3bb6312f..1c9a32e1a 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -852,8 +852,8 @@ define([ Common.Utils.InternalSettings.set("pe-settings-inputmode", value); me.api.SetTextBoxInputMode(value); - value = Common.localStorage.getBool("pe-settings-use-alt-key", Common.Utils.isMac ? false : true); - Common.Utils.InternalSettings.set("pe-settings-use-alt-key", value); + value = Common.localStorage.getBool("pe-settings-show-alt-hints", Common.Utils.isMac ? false : true); + Common.Utils.InternalSettings.set("pe-settings-show-alt-hints", value); /** coauthoring begin **/ me._state.fastCoauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode"); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index dcf044ba1..40098f3c7 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -627,7 +627,7 @@ define([ this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode")); - this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("pe-settings-use-alt-key")); + this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("pe-settings-show-alt-hints")); var value = Common.Utils.InternalSettings.get("pe-settings-zoom"); value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : -1); @@ -691,8 +691,8 @@ define([ Common.localStorage.setBool("pe-spellcheck-ignore-numbers-words", this.chIgnoreNumbers.isChecked()); } Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); - Common.localStorage.setItem("pe-settings-use-alt-key", this.chUseAltKey.isChecked() ? 1 : 0); - Common.Utils.InternalSettings.set("pe-settings-use-alt-key", Common.localStorage.getBool("pe-settings-use-alt-key")); + Common.localStorage.setItem("pe-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0); + Common.Utils.InternalSettings.set("pe-settings-show-alt-hints", Common.localStorage.getBool("pe-settings-show-alt-hints")); Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom")); /** coauthoring begin **/ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 5dd63d33f..9c745a88e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -871,8 +871,8 @@ define([ var zf = (value!==null) ? parseInt(value)/100 : (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom)/100 : 1); this.api.asc_setZoom(zf>0 ? zf : 1); - value = Common.localStorage.getBool("sse-settings-use-alt-key", Common.Utils.isMac ? false : true); - Common.Utils.InternalSettings.set("sse-settings-use-alt-key", value); + value = Common.localStorage.getBool("sse-settings-show-alt-hints", Common.Utils.isMac ? false : true); + Common.Utils.InternalSettings.set("sse-settings-show-alt-hints", value); /** coauthoring begin **/ this.isLiveCommenting = Common.localStorage.getBool("sse-settings-livecomment", true); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 471066cd4..b2d7e5ffe 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -798,7 +798,7 @@ define([ value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100); var item = this.cmbZoom.store.findWhere({value: value}); this.cmbZoom.setValue(item ? parseInt(item.get('value')) : (value>0 ? value+'%' : 100)); - this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("sse-settings-use-alt-key")); + this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("sse-settings-show-alt-hints")); /** coauthoring begin **/ this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment")); @@ -930,8 +930,8 @@ define([ applySettings: function() { Common.UI.Themes.setTheme(this.cmbTheme.getValue()); - Common.localStorage.setItem("sse-settings-use-alt-key", this.chUseAltKey.isChecked() ? 1 : 0); - Common.Utils.InternalSettings.set("sse-settings-use-alt-key", Common.localStorage.getBool("sse-settings-use-alt-key")); + Common.localStorage.setItem("sse-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0); + Common.Utils.InternalSettings.set("sse-settings-show-alt-hints", Common.localStorage.getBool("sse-settings-show-alt-hints")); Common.localStorage.setItem("sse-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("sse-settings-zoom", Common.localStorage.getItem("sse-settings-zoom")); /** coauthoring begin **/