Merge pull request #2927 from ONLYOFFICE/fix/bugfix

Fix Bug 67348
This commit is contained in:
Julia Radzhabova
2024-04-10 22:32:49 +03:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@ -674,7 +674,9 @@ define([
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
else {
me.isFromBtnDownload = me.appOptions.canRequestSaveAs || !!me.appOptions.saveAsUrl;
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF, me.isFromBtnDownload));
var options = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF, me.isFromBtnDownload);
options.asc_setIsSaveAs(me.isFromBtnDownload);
me.api.asc_DownloadAs(options);
}
}
});
@ -1115,8 +1117,11 @@ define([
var type = /^(?:(djvu|xps|oxps))$/.exec(this.document.fileType);
if (type && typeof type[1] === 'string')
this.api.asc_DownloadOrigin(true);
else
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
else {
var options = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true);
options.asc_setIsSaveAs(true);
this.api.asc_DownloadAs(options);
}
},
onHyperlinkClick: function(url) {

View File

@ -478,6 +478,7 @@ define([
} else {
var opts = new Asc.asc_CDownloadOptions(this.downloadFormat, this.asUrl);
opts.asc_setAdvancedOptions(this.adjPrintParams);
opts.asc_setIsSaveAs(this.asUrl);
this.api.asc_DownloadAs(opts);
}
Common.component.Analytics.trackEvent((this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');