[DE PE SSE] Fix bug 55786

This commit is contained in:
JuliaSvinareva 2022-05-17 18:55:18 +03:00
parent 40061edafa
commit 2eda10c7f6
10 changed files with 72 additions and 2 deletions

View file

@ -117,7 +117,8 @@ Common.UI.HintManager = new(function() {
_inputTimer,
_isDocReady = false,
_isEditDiagram = false,
_usedTitles = [];
_usedTitles = [],
_appPrefix;
var _api;
@ -436,6 +437,10 @@ Common.UI.HintManager = new(function() {
var _init = function(api) {
_api = api;
var filter = Common.localStorage.getKeysFilter();
_appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
Common.NotificationCenter.on({
'app:ready': function (mode) {
var lang = mode.lang ? mode.lang.toLowerCase() : 'en';
@ -594,7 +599,7 @@ Common.UI.HintManager = new(function() {
}
}
_needShow = (!e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
_needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
if (e.altKey && e.keyCode !== 115) {
e.preventDefault();
}

View file

@ -1221,6 +1221,9 @@ define([
Common.Utils.InternalSettings.set("de-settings-inputmode", value);
me.api.SetTextBoxInputMode(value);
value = Common.localStorage.getBool("de-settings-use-alt-key", true);
Common.Utils.InternalSettings.set("de-settings-use-alt-key", value);
/** coauthoring begin **/
me._state.fastCoauth = Common.Utils.InternalSettings.get("de-settings-coauthmode");
me.api.asc_SetFastCollaborative(me._state.fastCoauth);

View file

@ -341,6 +341,9 @@ define([
'<tr class="edit">',
'<td colspan="2"><div id="fms-chb-input-mode"></div></td>',
'</tr>',
'<tr>',
'<td colspan="2"><div id="fms-chb-use-alt-key"></div></td>',
'</tr>',
'<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>',
'<td>',
@ -400,6 +403,14 @@ define([
dataHintOffset: 'small'
});
this.chUseAltKey = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-use-alt-key'),
labelText: Common.Utils.isMac ? this.txtUseOptionKey : this.txtUseAltKey,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
/** coauthoring begin **/
this.chLiveComment = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-live-comment'),
@ -776,6 +787,8 @@ 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"));
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);
var item = this.cmbZoom.store.findWhere({value: value});
@ -858,6 +871,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-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom"));
@ -996,6 +1011,8 @@ define([
txtShowTrackChanges: 'Show track changes',
txtWorkspace: 'Workspace',
txtHieroglyphs: 'Hieroglyphs',
txtUseAltKey: 'Use Alt key to navigate the user interface using the keyboard',
txtUseOptionKey: 'Use Option key to navigate the user interface using the keyboard',
strShowComments: 'Show comments in text',
strShowResolvedComments: 'Show resolved comments',
txtFastTip: 'Real-time co-editing. All changes are saved automatically',

View file

@ -1785,6 +1785,8 @@
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Fit to Page",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width",
"DE.Views.FileMenuPanels.Settings.txtHieroglyphs": "Hieroglyphs",
"DE.Views.FileMenuPanels.Settings.txtUseAltKey": "Use Alt key to navigate the user interface using the keyboard",
"DE.Views.FileMenuPanels.Settings.txtUseOptionKey": "Use Option key to navigate the user interface using the keyboard",
"DE.Views.FileMenuPanels.Settings.txtInch": "Inch",
"DE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input",
"DE.Views.FileMenuPanels.Settings.txtLast": "View Last",

View file

@ -847,6 +847,9 @@ define([
Common.Utils.InternalSettings.set("pe-settings-inputmode", value);
me.api.SetTextBoxInputMode(value);
value = Common.localStorage.getBool("pe-settings-use-alt-key", true);
Common.Utils.InternalSettings.set("pe-settings-use-alt-key", value);
/** coauthoring begin **/
me._state.fastCoauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode");
me.api.asc_SetFastCollaborative(me._state.fastCoauth);

View file

@ -266,6 +266,9 @@ define([
'<tr class="edit">',
'<td colspan="2"><div id="fms-chb-input-mode"></div></td>',
'</tr>',
'<tr>',
'<td colspan="2"><div id="fms-chb-use-alt-key"></div></td>',
'</tr>',
'<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>',
@ -349,6 +352,14 @@ define([
dataHintOffset: 'small'
});
this.chUseAltKey = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-use-alt-key'),
labelText: Common.Utils.isMac ? this.txtUseOptionKey : this.txtUseAltKey,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.cmbZoom = new Common.UI.ComboBox({
el : $markup.findById('#fms-cmb-zoom'),
style : 'width: 160px;',
@ -616,6 +627,8 @@ define([
this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode"));
this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("pe-settings-use-alt-key"));
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);
var item = this.cmbZoom.store.findWhere({value: value});
@ -678,6 +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-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom"));
/** coauthoring begin **/
@ -773,6 +788,8 @@ define([
txtCollaboration: 'Collaboration',
txtWorkspace: 'Workspace',
txtHieroglyphs: 'Hieroglyphs',
txtUseAltKey: 'Use Alt key to navigate the user interface using the keyboard',
txtUseOptionKey: 'Use Option key to navigate the user interface using the keyboard',
txtFastTip: 'Real-time co-editing. All changes are saved automatically',
txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make',
strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE',

View file

@ -1645,6 +1645,8 @@
"PE.Views.FileMenuPanels.Settings.txtFitSlide": "Fit to Slide",
"PE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width",
"PE.Views.FileMenuPanels.Settings.txtHieroglyphs": "Hieroglyphs",
"PE.Views.FileMenuPanels.Settings.txtUseAltKey": "Use Alt key to navigate the user interface using the keyboard",
"PE.Views.FileMenuPanels.Settings.txtUseOptionKey": "Use Option key to navigate the user interface using the keyboard",
"PE.Views.FileMenuPanels.Settings.txtInch": "Inch",
"PE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input",
"PE.Views.FileMenuPanels.Settings.txtLast": "View Last",

View file

@ -866,6 +866,9 @@ 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", true);
Common.Utils.InternalSettings.set("sse-settings-use-alt-key", value);
/** coauthoring begin **/
this.isLiveCommenting = Common.localStorage.getBool("sse-settings-livecomment", true);
Common.Utils.InternalSettings.set("sse-settings-livecomment", this.isLiveCommenting);

View file

@ -242,6 +242,9 @@ define([
//'<td class="left"><label><%= scope.textRefStyle %></label></td>',
'<td colspan="2"><div id="fms-chb-r1c1-style"></div></td>',
'</tr>',
'<tr>',
'<td colspan="2"><div id="fms-chb-use-alt-key"></div></td>',
'</tr>',
'<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>',
'<td><span id="fms-cmb-theme"></span></td>',
@ -363,6 +366,14 @@ define([
dataHintOffset: 'small'
});
this.chUseAltKey = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-use-alt-key'),
labelText: Common.Utils.isMac ? this.txtUseOptionKey : this.txtUseAltKey,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.rbCoAuthModeFast = new Common.UI.RadioBox({
el : $markup.findById('#fms-rb-coauth-mode-fast'),
name : 'coauth-mode',
@ -774,6 +785,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"));
/** coauthoring begin **/
this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment"));
@ -904,6 +916,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-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("sse-settings-zoom", Common.localStorage.getItem("sse-settings-zoom"));
/** coauthoring begin **/
@ -1129,6 +1143,8 @@ define([
strShowResolvedComments: 'Show resolved comments',
txtWorkspace: 'Workspace',
strReferenceStyle: 'R1C1 reference style',
txtUseAltKey: 'Use Alt key to navigate the user interface using the keyboard',
txtUseOptionKey: 'Use Option key to navigate the user interface using the keyboard',
txtRegion: 'Region',
txtProofing: 'Proofing',
strDictionaryLanguage: 'Dictionary language',

View file

@ -2094,6 +2094,8 @@
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strPasteButton": "Show the Paste Options button when the content is pasted",
"del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strR1C1": "Turn on R1C1 style",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strReferenceStyle": "R1C1 reference style",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtUseAltKey": "Use Alt key to navigate the user interface using the keyboard",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtUseOptionKey": "Use Option key to navigate the user interface using the keyboard",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettings": "Regional Settings",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettingsEx": "Example: ",
"del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strResolvedComment": "Turn on display of the resolved comments",