Author: damoxc

Revision: 5752

Log:
        remove the js loader, doesn't work correctly

Diff:
Modified: trunk/deluge/ui/web/js/Deluge.UI.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.UI.js 2009-09-15 07:28:09 UTC (rev 5751)
+++ trunk/deluge/ui/web/js/Deluge.UI.js 2009-09-15 07:29:08 UTC (rev 5752)
@@ -83,6 +83,8 @@
                Deluge.Client.on('connected', function(e) {
                        Deluge.Login.show();
                        Deluge.Events.start();
+                       Deluge.Events.on('PluginEnabledEvent', 
this.onPluginEnabled, this);
+                       Deluge.Events.on('PluginDisabledEvent', 
this.onPluginDisabled, this);
                }, this, {single: true});
                
                this.update = this.update.bind(this);
@@ -152,6 +154,24 @@
                this.stop();
        },
        
+       onPluginEnabled: function(pluginName) {
+           Deluge.Client.web.get_plugin_resources(pluginName, {
+               success: this.onGotPluginResources,
+               scope: this
+           })
+       },
+       
+       onGotPluginResources: function(resources) {
+           var scripts = (Deluge.debug) ? resources['debug_scripts'] : 
resources['scripts'];
+           Ext.each(scripts, function(script) {
+               
+           }, this);
+       },
+       
+       onPluginDisabled: function(pluginName) {
+           //alert('D: ' + pluginName);
+       },
+       
        /**
         * @static
         * Stop the Deluge UI polling the server and clear the interface.

Modified: trunk/deluge/ui/web/js/ext-extensions-debug.js
===================================================================
--- trunk/deluge/ui/web/js/ext-extensions-debug.js      2009-09-15 07:28:09 UTC 
(rev 5751)
+++ trunk/deluge/ui/web/js/ext-extensions-debug.js      2009-09-15 07:29:08 UTC 
(rev 5752)
@@ -993,50 +993,4 @@
        actionMode: 'wrap',
        onShow: Ext.form.TriggerField.superclass.onShow,
        onHide: Ext.form.TriggerField.superclass.onHide
-});
-
-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
-    };
-    
-    Ext.Ajax.request({
-       url: options.url,
-       params: options.params,
-        scriptIndex: Ext.ux.JSLoader.index,
-       success: function(response, options) {
-           var script = Ext.ux.JSLoader.scripts[options.scriptIndex];
-           try {
-               script.jsLoadObj = Ext.decode(response.responseText);
-               Ext.applyIf(script.jsLoadObj,{jsLoad: function(){return 
Ext.ComponentMgr.create(script.jsLoadObj);}});
-               var comp = script.jsLoadObj.jsLoad();
-               if (comp.remoteInit){
-                   comp.remoteInit();
-               }
-           } catch(e) {
-               script.success = false;
-               script.onError(script.options, e);
-           }
-           if (script.success) script.onLoad(comp,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) {
-    // throw(e);
-    window.alert('Error loading script:\n\n' + options.url + '\n\nstatus: ' + 
e);
-}
\ No newline at end of file
+});
\ No newline at end of file



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to