#2125: Plugin method calls are missing when first enabling plugins in webui
--------------------------+-------------------------------------------------
Reporter: Lilltiger | Owner: damoxc
Type: bug | Status: assigned
Priority: minor | Milestone: 1.3.6
Component: plugin | Version: git 1.3-stable
Keywords: label, webui |
--------------------------+-------------------------------------------------
Comment(by Cas):
The fix for #2046 means that need to refresh the browser is no longer
required however this bug will resurface because the js code does not
contain the updated list of methods. The quick and dirty fix is to do the
following:
{{{
#!diff
--- a/deluge/ui/web/js/deluge-all/Plugin.js
+++ b/deluge/ui/web/js/deluge-all/Plugin.js
@@ -77,7 +77,10 @@ Deluge.Plugin = Ext.extend(Ext.util.Observable, {
*/
enable: function() {
this.fireEvent("enable", this);
- if (this.onEnable) this.onEnable();
+ if (this.onEnable) {
+ deluge.client.reloadMethods();
+ this.onEnable();
+ }
},
registerTorrentStatus: function(key, header, options) {
}}}
The problem with this change is that by using `reloadMethods` from
`Client.js` it deletes all the methods in list before updating. This
results in `undefined` errors when attempting to call deluge methods while
webui is running until the list is repopulated.
I think this requires adding a new function to `Client.js` that simply
adds newly found methods to the list.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2125#comment:6>
Deluge <http://deluge-torrent.org/>
Deluge project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" 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-dev?hl=en.