The WebUI part is really throwing me off however, as I don't often use JavaScript and I have never used the ExtJS framework before and don't really have any idea what I'm doing for it.
I have looked over the code for official and 3rd party plugins that have WebUI sections, but it differs greatly from the skeleton code that gets generated that I don't even know where to start taking it apart!
All I need is a preferences page that can modify the config data used by the plugin. So far I can have the basic preferences page, but I can't use the exported get_config and set_config to change the plugin's profile data.
The current source is: https://github.com/TimJones/Deluge-Move ... ee/develop
and my diff just to try and load & display a config setting:
Code: Select all
onRender: function(ct, position) {
Deluge.ux.preferences.MoveOnRemovePage.superclass.onRender.call(this, ct, position);
this.form.layout = new Ext.layout.FormLayout();
this.form.layout.setContainer(this);
this.form.doLayout();
},
onApply: function() {
// build settings object
var config = { }
config['move_to'] = this.moveTo.getValue();
deluge.client.moveonremove.set_config(config);
},
onOk: function() {
this.onApply();
},
afterRender: function() {
Deluge.ux.preferences.MoveOnRemovePage.superclass.afterRender.call(this);
this.updateConfig();
},
updateConfig: function() {
deluge.client.moveonremove.get_config({
success: function(config) {
this.moveTo.setValue(config['move_to']);
},
scope: this
});
}
Any help is appreciated.