Change usage of asc_DownloadAs
This commit is contained in:
parent
5ccd06857e
commit
4abaffcf88
|
@ -65,7 +65,7 @@
|
|||
iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
} catch (e) {
|
||||
api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ define([
|
|||
Common.Gateway.requestRestore(record.get('revision'));
|
||||
else {
|
||||
this.isFromSelectRevision = record.get('revision');
|
||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -458,7 +458,7 @@ DE.ApplicationController = new(function(){
|
|||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||
return;
|
||||
}
|
||||
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
||||
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
|
|
@ -302,13 +302,13 @@ define([
|
|||
buttons: ['ok', 'cancel'],
|
||||
callback: _.bind(function(btn){
|
||||
if (btn == 'ok') {
|
||||
this.api.asc_DownloadAs(format);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
menu.hide();
|
||||
}
|
||||
}, this)
|
||||
});
|
||||
} else {
|
||||
this.api.asc_DownloadAs(format);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
menu.hide();
|
||||
}
|
||||
} else
|
||||
|
@ -326,14 +326,14 @@ define([
|
|||
callback: _.bind(function(btn){
|
||||
if (btn == 'ok') {
|
||||
this.isFromFileDownloadAs = ext;
|
||||
this.api.asc_DownloadAs(format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||
menu.hide();
|
||||
}
|
||||
}, this)
|
||||
});
|
||||
} else {
|
||||
this.isFromFileDownloadAs = ext;
|
||||
this.api.asc_DownloadAs(format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||
menu.hide();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -463,7 +463,7 @@ define([
|
|||
|
||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||
_format = Asc.c_oAscFileType.DOCX;
|
||||
this.api.asc_DownloadAs(_format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2096,7 +2096,7 @@ define([
|
|||
me.iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
} catch (e) {
|
||||
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ define([
|
|||
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||
_format = Asc.c_oAscFileType.PDF;
|
||||
|
||||
_main.api.asc_DownloadAs(_format);
|
||||
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||
},
|
||||
'go:editor': function() {
|
||||
Common.Gateway.requestEditRights();
|
||||
|
|
|
@ -322,7 +322,7 @@ define([
|
|||
if (type && typeof type[1] === 'string') {
|
||||
this.api.asc_DownloadOrigin(true)
|
||||
} else {
|
||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -567,13 +567,13 @@ define([
|
|||
me.warnDownloadAs,
|
||||
me.notcriticalErrorTitle,
|
||||
function () {
|
||||
me.api.asc_DownloadAs(format);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
_.defer(function () {
|
||||
me.api.asc_DownloadAs(format);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@ PE.ApplicationController = new(function(){
|
|||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||
return;
|
||||
}
|
||||
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
|
||||
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true));
|
||||
}
|
||||
// Helpers
|
||||
// -------------------------
|
||||
|
|
|
@ -247,13 +247,13 @@ define([
|
|||
},
|
||||
|
||||
clickSaveAsFormat: function(menu, format) {
|
||||
this.api.asc_DownloadAs(format);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
menu.hide();
|
||||
},
|
||||
|
||||
clickSaveCopyAsFormat: function(menu, format, ext) {
|
||||
this.isFromFileDownloadAs = ext;
|
||||
this.api.asc_DownloadAs(format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||
menu.hide();
|
||||
},
|
||||
|
||||
|
|
|
@ -419,7 +419,7 @@ define([
|
|||
|
||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||
_format = Asc.c_oAscFileType.PPTX;
|
||||
this.api.asc_DownloadAs(_format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||
},
|
||||
|
||||
onProcessMouse: function(data) {
|
||||
|
@ -1784,7 +1784,7 @@ define([
|
|||
me.iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
} catch (e) {
|
||||
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ define([
|
|||
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||
_format = Asc.c_oAscFileType.PDF;
|
||||
|
||||
_main.api.asc_DownloadAs(_format);
|
||||
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||
},
|
||||
'go:editor': function() {
|
||||
Common.Gateway.requestEditRights();
|
||||
|
|
|
@ -311,7 +311,7 @@ define([
|
|||
return;
|
||||
}
|
||||
this._state.isFromGatewayDownloadAs = true;
|
||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true));
|
||||
},
|
||||
|
||||
goBack: function(current) {
|
||||
|
|
|
@ -381,7 +381,7 @@ define([
|
|||
|
||||
if (format) {
|
||||
_.defer(function () {
|
||||
me.api.asc_DownloadAs(format);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ SSE.ApplicationController = new(function(){
|
|||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||
return;
|
||||
}
|
||||
api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
||||
}
|
||||
|
||||
function onApiMouseMove(array) {
|
||||
|
|
|
@ -264,7 +264,7 @@ define([
|
|||
buttons: ['ok', 'cancel'],
|
||||
callback: _.bind(function(btn){
|
||||
if (btn == 'ok') {
|
||||
this.api.asc_DownloadAs(format);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
menu.hide();
|
||||
}
|
||||
}, this)
|
||||
|
@ -273,7 +273,7 @@ define([
|
|||
menu.hide();
|
||||
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format);
|
||||
} else {
|
||||
this.api.asc_DownloadAs(format);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
menu.hide();
|
||||
}
|
||||
},
|
||||
|
@ -287,7 +287,7 @@ define([
|
|||
callback: _.bind(function(btn){
|
||||
if (btn == 'ok') {
|
||||
this.isFromFileDownloadAs = ext;
|
||||
this.api.asc_DownloadAs(format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||
menu.hide();
|
||||
}
|
||||
}, this)
|
||||
|
@ -298,7 +298,7 @@ define([
|
|||
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format, true);
|
||||
} else {
|
||||
this.isFromFileDownloadAs = ext;
|
||||
this.api.asc_DownloadAs(format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||
menu.hide();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -434,7 +434,7 @@ define([
|
|||
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
||||
Common.NotificationCenter.trigger('download:settings', this, _format, true);
|
||||
else
|
||||
this.api.asc_DownloadAs(_format, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||
},
|
||||
|
||||
onProcessMouse: function(data) {
|
||||
|
@ -2021,7 +2021,9 @@ define([
|
|||
me.iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
} catch (e) {
|
||||
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF, false, me.getApplication().getController('Print').getPrintParams());
|
||||
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);
|
||||
opts.asc_setAdjustPrint(me.getApplication().getController('Print').getPrintParams());
|
||||
me.api.asc_DownloadAs(opts);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -268,8 +268,11 @@ define([
|
|||
|
||||
if ( this.printSettingsDlg.type=='print' )
|
||||
this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
|
||||
else
|
||||
this.api.asc_DownloadAs(this.downloadFormat, this.asUrl, this.adjPrintParams);
|
||||
else {
|
||||
var opts = new Asc.asc_CDownloadOptions(this.downloadFormat, this.asUrl);
|
||||
opts.asc_setAdjustPrint(this.adjPrintParams);
|
||||
this.api.asc_DownloadAs(opts);
|
||||
}
|
||||
Common.component.Analytics.trackEvent((this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
||||
Common.component.Analytics.trackEvent('ToolBar', (this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
||||
Common.NotificationCenter.trigger('edit:complete', view);
|
||||
|
|
|
@ -113,7 +113,7 @@ define([
|
|||
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
||||
Common.NotificationCenter.trigger('download:settings', this.toolbar, _format);
|
||||
else
|
||||
_main.api.asc_DownloadAs(_format);
|
||||
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||
},
|
||||
'go:editor': function() {
|
||||
Common.Gateway.requestEditRights();
|
||||
|
|
|
@ -319,7 +319,7 @@ define([
|
|||
return;
|
||||
}
|
||||
this._state.isFromGatewayDownloadAs = true;
|
||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
|
||||
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
||||
},
|
||||
|
||||
goBack: function(current) {
|
||||
|
|
|
@ -676,11 +676,11 @@ define([
|
|||
me.warnDownloadAs,
|
||||
me.notcriticalErrorTitle,
|
||||
function () {
|
||||
me.api.asc_DownloadAs(format);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
}
|
||||
);
|
||||
} else {
|
||||
me.api.asc_DownloadAs(format);
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
}
|
||||
|
||||
me.hideModal();
|
||||
|
|
Loading…
Reference in a new issue