remove loadLib

This commit is contained in:
Yuri Kuznetsov
2021-06-30 10:04:19 +03:00
parent fcc2271e83
commit dfb50ab7ee
-35
View File
@@ -542,37 +542,6 @@ var Espo = Espo || {classMap: {}};
this._executeLoadCallback(name, data);
},
loadLib: function (url, callback) {
if (this._cache) {
let script = this._cache.get('a', url);
if (script) {
this._execute(script);
if (typeof callback === 'function') {
callback();
}
return;
}
}
$.ajax({
url: this._basePath + url,
type: 'GET',
dataType: 'script',
local: true,
})
.then(() => {
if (typeof callback === 'function') {
callback();
}
})
.catch(() => {
throw new Error("Could not load file '" + url + "'");
});
},
addLibsConfig: function (data) {
this._libsConfig = _.extend(this._libsConfig, data);
},
@@ -609,8 +578,4 @@ var Espo = Espo || {classMap: {}};
Espo.loader.define(subject, dependency, callback);
};
Espo.loadLib = function (url, callback) {
Espo.loader.loadLib(url, callback);
};
}).call(this, Espo, _, $);