summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Churchill <damoxc@gmail.com>2011-10-05 23:31:41 +0100
committerDamien Churchill <damoxc@gmail.com>2011-10-05 23:31:41 +0100
commitb724f7470069f6e131e4186f90b26b256731c0da (patch)
tree37f4b08cad4e8737237b0c30b4d70305969dc342
parentd44a357284059bae02e585fef150869a1a9ca6bb (diff)
downloaddeluge-b724f7470069f6e131e4186f90b26b256731c0da.tar.gz
deluge-b724f7470069f6e131e4186f90b26b256731c0da.tar.bz2
deluge-b724f7470069f6e131e4186f90b26b256731c0da.zip
web: drop JSLoader extension
Ext now includes an Ext.Loader class that can load scripts so this extra extension to do so is surplurfluous.
-rw-r--r--deluge/ui/web/js/ext-extensions/JSLoader.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/deluge/ui/web/js/ext-extensions/JSLoader.js b/deluge/ui/web/js/ext-extensions/JSLoader.js
deleted file mode 100644
index 7d397244d..000000000
--- a/deluge/ui/web/js/ext-extensions/JSLoader.js
+++ /dev/null
@@ -1,38 +0,0 @@
-Ext.ux.JSLoader = function(options) {
- Ext.ux.JSLoader.scripts[++Ext.ux.JSLoader.index] = {
- url: options.url,
- success: true,
- jsLoadObj: null,
- options: options,
- onLoad: options.onLoad || Ext.emptyFn,
- onError: options.onError || Ext.ux.JSLoader.stdError,
- scope: options.scope || this
- };
-
- Ext.Ajax.request({
- url: options.url,
- scriptIndex: Ext.ux.JSLoader.index,
- success: function(response, options) {
- var script = Ext.ux.JSLoader.scripts[options.scriptIndex];
- try {
- eval(response.responseText);
- } catch(e) {
- script.success = false;
- script.onError(script.options, e);
- }
- if (script.success) {
- script.onLoad.call(script.scope, script.options);
- }
- },
- failure: function(response, options) {
- var script = Ext.ux.JSLoader.scripts[options.scriptIndex];
- script.success = false;
- script.onError(script.options, response.status);
- }
- });
-}
-Ext.ux.JSLoader.index = 0;
-Ext.ux.JSLoader.scripts = [];
-Ext.ux.JSLoader.stdError = function(options, e) {
- window.alert('Error loading script:\n\n' + options.url + '\n\nstatus: ' + e);
-}