From 566f58a09bf55cb142377c17973f9e627ab36636 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 16 Feb 2022 22:51:34 +0300 Subject: [PATCH 1/2] Fix Bug 55294 --- .../main/app/controller/Toolbar.js | 21 +++++++++---------- .../main/app/controller/Toolbar.js | 21 +++++++++---------- .../main/app/controller/Toolbar.js | 21 +++++++++---------- 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index a66896dd9..772d0a725 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1341,18 +1341,17 @@ define([ if (!value) { value = this._getApiTextSize(); - - Common.UI.warning({ - msg: this.textFontSizeErr, - callback: function() { - _.defer(function(btn) { - $('input', combo.cmpEl).focus(); - }) - } - }); - + setTimeout(function(){ + Common.UI.warning({ + msg: me.textFontSizeErr, + callback: function() { + _.defer(function(btn) { + $('input', combo.cmpEl).focus(); + }) + } + }); + }, 1); combo.setRawValue(value); - e.preventDefault(); return false; } diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 4d863cbf0..d3b7b2ac9 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1324,18 +1324,17 @@ define([ if (!value) { value = this._getApiTextSize(); - - Common.UI.warning({ - msg: this.textFontSizeErr, - callback: function() { - _.defer(function(btn) { - $('input', combo.cmpEl).focus(); - }) - } - }); - + setTimeout(function(){ + Common.UI.warning({ + msg: me.textFontSizeErr, + callback: function() { + _.defer(function(btn) { + $('input', combo.cmpEl).focus(); + }) + } + }); + }, 1); combo.setRawValue(value); - e.preventDefault(); return false; } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 834cfd680..97e314757 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1625,18 +1625,17 @@ define([ if (!value) { value = this._getApiTextSize(); - - Common.UI.warning({ - msg: this.textFontSizeErr, - callback: function() { - _.defer(function(btn) { - $('input', combo.cmpEl).focus(); - }) - } - }); - + setTimeout(function(){ + Common.UI.warning({ + msg: me.textFontSizeErr, + callback: function() { + _.defer(function(btn) { + $('input', combo.cmpEl).focus(); + }) + } + }); + }, 1); combo.setRawValue(value); - e.preventDefault(); return false; } From 116e364efbeeac5780a6e3a8f22b5a59d3effcfa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 16 Feb 2022 22:58:34 +0300 Subject: [PATCH 2/2] [DE] Fix Bug 55089 --- .../main/app/controller/LeftMenu.js | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 700c1babe..fb8a03751 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -373,17 +373,21 @@ define([ } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) this._saveAsFormat(menu, format, ext); else { - Common.UI.warning({ - width: 600, - title: this.notcriticalErrorTitle, - msg: Common.Utils.String.format(this.warnDownloadAsPdf, fileType.toUpperCase()), - buttons: ['ok', 'cancel'], - callback: _.bind(function(btn){ - if (btn == 'ok') { - me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); - } - }, this) - }); + if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) // don't show message about pdf/xps/oxps + me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); + else { + Common.UI.warning({ + width: 600, + title: this.notcriticalErrorTitle, + msg: Common.Utils.String.format(this.warnDownloadAsPdf, fileType.toUpperCase()), + buttons: ['ok', 'cancel'], + callback: _.bind(function(btn){ + if (btn == 'ok') { + me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); + } + }, this) + }); + } } } else this._saveAsFormat(menu, format, ext);