Commit 519451d7 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

add g_fLoadFileContent

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66773 954022d7-b5bf-4e40-9824-e11837661b57
parent 433c8fee
......@@ -181,6 +181,17 @@ function g_fSaveWithParts(fSendCommand, fCallback, fCallbackRequest, oAdditional
}, oAdditionalData, dataContainer);
}
function g_fLoadFileContent(url, callback) {
asc_ajax({
url: url,
dataType: "text",
success: callback,
error: function() {
callback(null);
}
});
}
function g_fGetJSZipUtils() {
return window['JSZipUtils'] ? window['JSZipUtils'] : require('jsziputils');
}
......
......@@ -1933,20 +1933,17 @@ asc_docs_api.prototype.processSavedFile = function(url, downloadType) {
var t = this;
if (DownloadType.MailMerge === downloadType) {
this.mailMergeFileData = null;
asc_ajax({
url: url,
dataType: "text",
success: function (result) {
try {
t.asc_StartMailMergeByList(JSON.parse(result));
} catch (e) {
t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeLoadFile, c_oAscError.Level.NoCritical);
}
},
error: function () {
t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeLoadFile, c_oAscError.Level.NoCritical);
}
});
g_fLoadFileContent(url, function(result) {
if (null === result) {
t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeLoadFile, c_oAscError.Level.NoCritical);
return;
}
try {
t.asc_StartMailMergeByList(JSON.parse(result));
} catch (e) {
t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeLoadFile, c_oAscError.Level.NoCritical);
}
});
} else {
this.constructor.prototype.processSavedFile(url, downloadType);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment