Merge pull request #2098 from ONLYOFFICE/fix/bugfix

Fix Bug 59959
This commit is contained in:
Julia Radzhabova 2022-11-30 22:00:24 +03:00 committed by GitHub
commit 9e80367822
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 13 deletions

View file

@ -81,8 +81,7 @@ define([
if (!config.isEdit || config.customization && !!config.customization.compactHeader)
toolbar.setExtra('left', me.header.getPanel('left', config));
var value = Common.localStorage.getItem("de-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -265,7 +264,7 @@ define([
},
applySettings: function () {
var value = parseInt(Common.localStorage.getItem("de-settings-quick-print-button"));
var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -922,7 +922,7 @@ define([
}
Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setItem("de-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.setBool("de-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.save();

View file

@ -81,8 +81,7 @@ define([
toolbar.setExtra('right', me.header.getPanel('right', config));
if (!config.isEdit || config.customization && !!config.customization.compactHeader)
toolbar.setExtra('left', me.header.getPanel('left', config));
var value = Common.localStorage.getItem("pe-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
var value = Common.localStorage.getBool("pe-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("pe-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -321,7 +320,7 @@ define([
},
applySettings: function () {
var value = parseInt(Common.localStorage.getItem("pe-settings-quick-print-button"));
var value = Common.localStorage.getBool("pe-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("pe-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -720,7 +720,7 @@ define([
Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setItem("pe-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.setBool("pe-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.save();

View file

@ -90,8 +90,7 @@ define([
if ( me.appConfig && me.appConfig.isEdit && !(config.customization && config.customization.compactHeader) && toolbar.btnCollabChanges )
toolbar.btnCollabChanges = me.header.btnSave;
var value = Common.localStorage.getItem("sse-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
var value = Common.localStorage.getBool("sse-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("sse-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -294,7 +293,7 @@ define([
},
applySettings: function () {
var value = parseInt(Common.localStorage.getItem("sse-settings-quick-print-button"));
var value = Common.localStorage.getBool("sse-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("sse-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -996,7 +996,7 @@ define([
Common.Utils.InternalSettings.set("sse-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setItem("sse-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.setBool("sse-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.save();
if (this.menu) {
@ -2736,7 +2736,8 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
applySettings: function() {
if (this.menu) {
this.menu.fireEvent('settings:apply', [this.menu]);
this.menu.hide();
// this.menu.fireEvent('settings:apply', [this.menu]);
}
},