[DE PE SSE] Add alert when RTL interface setting was changed

This commit is contained in:
JuliaSvinareva
2023-01-25 02:13:46 +03:00
parent d3ee06cd80
commit d51057dbc2
3 changed files with 42 additions and 3 deletions

View File

@ -992,6 +992,7 @@ define([
}
Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
var isRtlChanged = this.chRTL.$el.is(':visible') && Common.localStorage.getBool("ui-rtl") !== this.chRTL.isChecked();
Common.localStorage.setBool("ui-rtl", this.chRTL.isChecked());
Common.localStorage.setBool("de-settings-quick-print-button", this.chQuickPrint.isChecked());
@ -1003,6 +1004,16 @@ define([
if (this._oldUnits !== this.cmbUnit.getValue())
Common.NotificationCenter.trigger('settings:unitschanged', this);
}
if (isRtlChanged) {
var config = {
title: this.txtWorkspaceSettingChange,
msg: this.txtRestartEditor,
iconCls: 'warn',
buttons: ['ok']
};
Common.UI.alert(config);
}
},
fillShowChanges: function(fastmode) {
@ -1095,7 +1106,9 @@ define([
strShowOthersChanges: 'Show changes from other users',
txtAdvancedSettings: 'Advanced Settings',
txtQuickPrint: 'Show the Quick Print button in the editor header',
txtQuickPrintTip: 'The document will be printed on the last selected or default printer'
txtQuickPrintTip: 'The document will be printed on the last selected or default printer',
txtWorkspaceSettingChange: 'Workspace setting (RTL interface) change',
txtRestartEditor: 'Please restart document editor so that your workspace settings can take effect'
}, DE.Views.FileMenuPanels.Settings || {}));
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View File

@ -791,6 +791,7 @@ define([
Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
var isRtlChanged = this.chRTL.$el.is(':visible') && Common.localStorage.getBool("ui-rtl") !== this.chRTL.isChecked();
Common.localStorage.setBool("ui-rtl", this.chRTL.isChecked());
Common.localStorage.setBool("pe-settings-quick-print-button", this.chQuickPrint.isChecked());
@ -802,6 +803,16 @@ define([
if (this._oldUnits !== this.cmbUnit.getValue())
Common.NotificationCenter.trigger('settings:unitschanged', this);
}
if (isRtlChanged) {
var config = {
title: this.txtWorkspaceSettingChange,
msg: this.txtRestartEditor,
iconCls: 'warn',
buttons: ['ok']
};
Common.UI.alert(config);
}
},
onFontRenderSelected: function(combo, record) {
@ -872,7 +883,9 @@ define([
strShowOthersChanges: 'Show changes from other users',
txtAdvancedSettings: 'Advanced Settings',
txtQuickPrint: 'Show the Quick Print button in the editor header',
txtQuickPrintTip: 'The document will be printed on the last selected or default printer'
txtQuickPrintTip: 'The document will be printed on the last selected or default printer',
txtWorkspaceSettingChange: 'Workspace setting (RTL interface) change',
txtRestartEditor: 'Please restart presentation editor so that your workspace settings can take effect'
}, PE.Views.FileMenuPanels.Settings || {}));
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View File

@ -1069,6 +1069,7 @@ define([
Common.Utils.InternalSettings.set("sse-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
var isRtlChanged = this.chRTL.$el.is(':visible') && Common.localStorage.getBool("ui-rtl") !== this.chRTL.isChecked();
Common.localStorage.setBool("ui-rtl", this.chRTL.isChecked());
Common.localStorage.setBool("sse-settings-quick-print-button", this.chQuickPrint.isChecked());
@ -1103,6 +1104,16 @@ define([
if (this.mode.isEdit)
this.api.asc_setDate1904(this.chDateSystem.isChecked());
if (isRtlChanged) {
var config = {
title: this.txtWorkspaceSettingChange,
msg: this.txtRestartEditor,
iconCls: 'warn',
buttons: ['ok']
};
Common.UI.alert(config);
}
},
updateRegionalExample: function(landId) {
@ -1267,7 +1278,9 @@ define([
strDateFormat1904: 'Use 1904 date system',
txtAdvancedSettings: 'Advanced Settings',
txtQuickPrint: 'Show the Quick Print button in the editor header',
txtQuickPrintTip: 'The document will be printed on the last selected or default printer'
txtQuickPrintTip: 'The document will be printed on the last selected or default printer',
txtWorkspaceSettingChange: 'Workspace setting (RTL interface) change',
txtRestartEditor: 'Please restart spreadsheet editor so that your workspace settings can take effect'
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));