[DE] Fix rev. c0862be9b9 (Change downloading as TXT/ RTF)

This commit is contained in:
Julia Radzhabova 2019-08-06 10:49:13 +03:00
parent e34f886d79
commit 85b5d88c12
2 changed files with 12 additions and 3 deletions

View file

@ -302,7 +302,10 @@ define([
buttons: ['ok', 'cancel'],
callback: _.bind(function(btn){
if (btn == 'ok') {
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
if (format == Asc.c_oAscFileType.TXT)
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
else
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
}, this)
@ -348,7 +351,10 @@ define([
callback: _.bind(function(btn){
if (btn == 'ok') {
this.isFromFileDownloadAs = ext;
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true));
if (format == Asc.c_oAscFileType.TXT)
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true));
else
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
menu.hide();
}
}, this)

View file

@ -568,7 +568,10 @@ define([
(format === Asc.c_oAscFileType.TXT) ? me.warnDownloadAs : me.warnDownloadAsRTF,
me.notcriticalErrorTitle,
function () {
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
if (format == Asc.c_oAscFileType.TXT)
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
else
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
}
);
});