Merge pull request #1990 from ONLYOFFICE/fix/alt-hints

[DE PE SSE] Change variable name to reset Use Alt Key setting
This commit is contained in:
Julia Radzhabova 2022-10-03 16:10:37 +03:00 committed by GitHub
commit 527633324b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 17 deletions

View file

@ -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 && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0 &&
!(window.PE && $('#pe-preview').is(':visible'))); !(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(); e.preventDefault();
} }
}); });

View file

@ -1227,8 +1227,8 @@ define([
Common.Utils.InternalSettings.set("de-settings-inputmode", value); Common.Utils.InternalSettings.set("de-settings-inputmode", value);
me.api.SetTextBoxInputMode(value); me.api.SetTextBoxInputMode(value);
value = Common.localStorage.getBool("de-settings-use-alt-key", Common.Utils.isMac ? false : true); value = Common.localStorage.getBool("de-settings-show-alt-hints", Common.Utils.isMac ? false : true);
Common.Utils.InternalSettings.set("de-settings-use-alt-key", value); Common.Utils.InternalSettings.set("de-settings-show-alt-hints", value);
/** coauthoring begin **/ /** coauthoring begin **/
me._state.fastCoauth = Common.Utils.InternalSettings.get("de-settings-coauthmode"); me._state.fastCoauth = Common.Utils.InternalSettings.get("de-settings-coauthmode");

View file

@ -790,7 +790,7 @@ define([
updateSettings: function() { updateSettings: function() {
this.chInputMode.setValue(Common.Utils.InternalSettings.get("de-settings-inputmode")); 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"); 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); 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())) if (!this.chDarkMode.isDisabled() && (this.chDarkMode.isChecked() !== Common.UI.Themes.isContentThemeDark()))
Common.UI.Themes.toggleContentTheme(); Common.UI.Themes.toggleContentTheme();
Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); 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.localStorage.setItem("de-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0);
Common.Utils.InternalSettings.set("de-settings-use-alt-key", Common.localStorage.getBool("de-settings-use-alt-key")); 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.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom")); Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom"));

View file

@ -852,8 +852,8 @@ define([
Common.Utils.InternalSettings.set("pe-settings-inputmode", value); Common.Utils.InternalSettings.set("pe-settings-inputmode", value);
me.api.SetTextBoxInputMode(value); me.api.SetTextBoxInputMode(value);
value = Common.localStorage.getBool("pe-settings-use-alt-key", Common.Utils.isMac ? false : true); value = Common.localStorage.getBool("pe-settings-show-alt-hints", Common.Utils.isMac ? false : true);
Common.Utils.InternalSettings.set("pe-settings-use-alt-key", value); Common.Utils.InternalSettings.set("pe-settings-show-alt-hints", value);
/** coauthoring begin **/ /** coauthoring begin **/
me._state.fastCoauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode"); me._state.fastCoauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode");

View file

@ -627,7 +627,7 @@ define([
this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode")); 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"); 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); 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.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-inputmode", this.chInputMode.isChecked() ? 1 : 0);
Common.localStorage.setItem("pe-settings-use-alt-key", this.chUseAltKey.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0);
Common.Utils.InternalSettings.set("pe-settings-use-alt-key", Common.localStorage.getBool("pe-settings-use-alt-key")); 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.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom")); Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom"));
/** coauthoring begin **/ /** coauthoring begin **/

View file

@ -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); 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); this.api.asc_setZoom(zf>0 ? zf : 1);
value = Common.localStorage.getBool("sse-settings-use-alt-key", Common.Utils.isMac ? false : true); value = Common.localStorage.getBool("sse-settings-show-alt-hints", Common.Utils.isMac ? false : true);
Common.Utils.InternalSettings.set("sse-settings-use-alt-key", value); Common.Utils.InternalSettings.set("sse-settings-show-alt-hints", value);
/** coauthoring begin **/ /** coauthoring begin **/
this.isLiveCommenting = Common.localStorage.getBool("sse-settings-livecomment", true); this.isLiveCommenting = Common.localStorage.getBool("sse-settings-livecomment", true);

View file

@ -798,7 +798,7 @@ define([
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100); 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}); var item = this.cmbZoom.store.findWhere({value: value});
this.cmbZoom.setValue(item ? parseInt(item.get('value')) : (value>0 ? value+'%' : 100)); 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 **/ /** coauthoring begin **/
this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment")); this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment"));
@ -930,8 +930,8 @@ define([
applySettings: function() { applySettings: function() {
Common.UI.Themes.setTheme(this.cmbTheme.getValue()); Common.UI.Themes.setTheme(this.cmbTheme.getValue());
Common.localStorage.setItem("sse-settings-use-alt-key", this.chUseAltKey.isChecked() ? 1 : 0); Common.localStorage.setItem("sse-settings-show-alt-hints", this.chUseAltKey.isChecked() ? 1 : 0);
Common.Utils.InternalSettings.set("sse-settings-use-alt-key", Common.localStorage.getBool("sse-settings-use-alt-key")); 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.localStorage.setItem("sse-settings-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("sse-settings-zoom", Common.localStorage.getItem("sse-settings-zoom")); Common.Utils.InternalSettings.set("sse-settings-zoom", Common.localStorage.getItem("sse-settings-zoom"));
/** coauthoring begin **/ /** coauthoring begin **/