From 4f145f37fd0124307b53c1afafbce9fbcd16b7fa Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Fri, 29 Aug 2025 19:38:26 +0300 Subject: [PATCH] For Bug 25910 --- .../main/app/controller/LeftMenu.js | 60 ++++--------------- apps/spreadsheeteditor/main/locale/en.json | 1 + apps/spreadsheeteditor/mobile/locale/en.json | 3 +- .../src/controller/settings/Download.jsx | 2 +- 4 files changed, 17 insertions(+), 49 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index b38f53c9e2..d7260d8273 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -344,7 +344,7 @@ define([ showLostDataWarning: function(callback) { Common.UI.warning({ title: this.textWarning, - msg: this.warnDownloadAs, + msg: this.warnDownloadCsv, buttons: ['ok', 'cancel'], callback: _.bind(function (btn) { if (btn == 'ok') { @@ -357,25 +357,10 @@ define([ clickSaveAsFormat: function(menu, format) { if (format == Asc.c_oAscFileType.CSV) { var me = this; - if (this.api.asc_getWorksheetsCount()>1) { - Common.UI.warning({ - title: this.textWarning, - msg: this.warnDownloadCsvSheets, - buttons: [{value: 'ok', caption: this.textSave}, 'cancel'], - callback: _.bind(function (btn) { - if (btn == 'ok') { - me.showLostDataWarning(function () { - Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); - menu.hide(); - }); - } - }, this) - }); - } else - this.showLostDataWarning(function () { - Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); - menu.hide(); - }); + this.showLostDataWarning(function () { + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); + menu.hide(); + }); } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) { menu.hide(); Common.NotificationCenter.trigger('download:settings', this.leftMenu, format); @@ -388,33 +373,14 @@ define([ clickSaveCopyAsFormat: function(menu, format, ext, wopiPath) { if (format == Asc.c_oAscFileType.CSV) { var me = this; - if (this.api.asc_getWorksheetsCount()>1) { - Common.UI.warning({ - title: this.textWarning, - msg: this.warnDownloadCsvSheets, - buttons: [{value: 'ok', caption: this.textSave}, 'cancel'], - callback: _.bind(function (btn) { - if (btn == 'ok') { - me.showLostDataWarning(function () { - me.isFromFileDownloadAs = ext; - var options = new Asc.asc_CDownloadOptions(format, true); - options.asc_setIsSaveAs(true); - wopiPath && options.asc_setWopiSaveAsPath(wopiPath); - Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, options); - menu.hide(); - }); - } - }, this) - }); - } else - me.showLostDataWarning(function () { - me.isFromFileDownloadAs = ext; - var options = new Asc.asc_CDownloadOptions(format, true); - options.asc_setIsSaveAs(true); - wopiPath && options.asc_setWopiSaveAsPath(wopiPath); - Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, options); - menu.hide(); - }); + me.showLostDataWarning(function () { + me.isFromFileDownloadAs = ext; + var options = new Asc.asc_CDownloadOptions(format, true); + options.asc_setIsSaveAs(true); + wopiPath && options.asc_setWopiSaveAsPath(wopiPath); + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, options); + menu.hide(); + }); } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) { this.isFromFileDownloadAs = ext; menu.hide(); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 5477cce2c9..afd19ab7b5 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1077,6 +1077,7 @@ "SSE.Controllers.LeftMenu.txtUntitled": "Untitled", "SSE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?", "SSE.Controllers.LeftMenu.warnDownloadCsvSheets": "The CSV format does not support saving a multi-sheet file.
To keep the selected format and save only the current sheet, press Save.
To save the current spreadsheet, click Cancel and save it in a different format.", + "SSE.Controllers.LeftMenu.warnDownloadCsv": "The CSV format does not support saving a multi-sheet file and all elements, except text.
To save only the selected sheet to CSV, press OK.
To save the whole spreadsheet and all features, click Cancel and select another format.", "SSE.Controllers.Main.confirmAddCellWatches": "This action will add {0} cell watches.
Do you want to continue?", "SSE.Controllers.Main.confirmAddCellWatchesMax": "This action will add only {0} cell watches by memory save reason.
Do you want to continue?", "SSE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.
Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).", diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 21b6ebbf5a..0c22698b2d 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -884,7 +884,8 @@ "txtUk": "Ukrainian", "txtVi": "Vietnamese", "txtZh": "Chinese", - "warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?" + "warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?", + "warnDownloadCsv": "The CSV format does not support saving a multi-sheet file and all elements, except text.
To save only the selected sheet to CSV, press OK.
To save the whole spreadsheet and all features, click Cancel and select another format." } } } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx index fcc8f56a26..4f6886ff95 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx @@ -29,7 +29,7 @@ class DownloadController extends Component { if (format == Asc.c_oAscFileType.CSV) { f7.dialog.create({ title: _t.notcriticalErrorTitle, - text: _t.warnDownloadAs, + text: _t.warnDownloadCsv, buttons: [ { text: _t.textCancel