mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
For Bug 25910
This commit is contained in:
@ -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();
|
||||
|
||||
@ -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.<br>Are you sure you want to continue?",
|
||||
"SSE.Controllers.LeftMenu.warnDownloadCsvSheets": "The CSV format does not support saving a multi-sheet file.<br>To keep the selected format and save only the current sheet, press Save.<br>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.<br>To save only the selected sheet to CSV, press OK.<br>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.<br>Do you want to continue?",
|
||||
"SSE.Controllers.Main.confirmAddCellWatchesMax": "This action will add only {0} cell watches by memory save reason.<br>Do you want to continue?",
|
||||
"SSE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>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).",
|
||||
|
||||
@ -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.<br>Are you sure you want to continue?"
|
||||
"warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
|
||||
"warnDownloadCsv": "The CSV format does not support saving a multi-sheet file and all elements, except text.<br>To save only the selected sheet to CSV, press OK.<br>To save the whole spreadsheet and all features, click Cancel and select another format."
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user