Add JS files
This commit is contained in:
32
include/ECM/EcmMultiPdf/EcmMultiPdf.js
Executable file
32
include/ECM/EcmMultiPdf/EcmMultiPdf.js
Executable file
@@ -0,0 +1,32 @@
|
||||
var EcmMultiPdf_create = function(documents, outputName) {
|
||||
// fill params
|
||||
var params = new Array();
|
||||
params[0] = documents;
|
||||
|
||||
if (!(typeof outputName === 'undefined')) {
|
||||
if ((outputName.toUpperCase().substring((outputName.length) - 4,
|
||||
outputName.length)) != '.PDF')
|
||||
outputName += '.pdf';
|
||||
params[2] = outputName;
|
||||
}
|
||||
|
||||
|
||||
// AJAX call
|
||||
jQuery.ajax({
|
||||
type : 'POST',
|
||||
url : 'index.php?entryPoint=HandleEcmAjax',
|
||||
data : {
|
||||
ecmclass : 'EcmMultiPdf',
|
||||
job : 'create',
|
||||
params : btoa(JSON.stringify(params)),
|
||||
},
|
||||
dataType : 'json',
|
||||
success : function(response) {
|
||||
$.unblockUI();
|
||||
if (Number.isInteger(response[0]))
|
||||
alert('ERROR '+response[0]);
|
||||
else
|
||||
window.open(response[0]);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user