Commit 29c56a96 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Поправил получение JSZipUtils

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65072 954022d7-b5bf-4e40-9824-e11837661b57
parent 43eda377
......@@ -6,7 +6,7 @@ var g_sAESKey = '7f3d2338390c1e3e154c21005f51010e065b0f1a1e101600202473150c022a1
function CheckLicense(licenseUrl, userId, callback) {
licenseUrl = licenseUrl ? licenseUrl : g_sLicenseDefaultUrl;
require('jsziputils').getBinaryContent(licenseUrl, function(err, data) {
g_fGetJSZipUtils().getBinaryContent(licenseUrl, function(err, data) {
if (err) {
callback(true, false);
return;
......
......@@ -171,6 +171,9 @@ function g_fSaveWithParts(fSendCommand, fCallback, fCallbackRequest, oAdditional
}, oAdditionalData, dataContainer);
}
function g_fGetJSZipUtils() {
return window['JSZipUtils'] ? window['JSZipUtils'] : require('jsziputils');
}
function g_fGetImageFromChanges (name) {
var file;
var ext = GetFileExtension(name);
......@@ -216,7 +219,7 @@ function g_fOpenFileCommand(binUrl, changesUrl, Signature, callback) {
}
});
if (null != changesUrl) {
require('jsziputils').getBinaryContent(changesUrl, function(err, data) {
g_fGetJSZipUtils().getBinaryContent(changesUrl, function(err, data) {
bEndLoadChanges = true;
if (err) {
bError = true;
......
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