mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-06 00:23:32 +00:00
add the session timeout to one of the options on the interface preferences
This commit is contained in:
parent
1a635e8860
commit
e676bcf576
@ -94,10 +94,32 @@ Ext.deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
fieldset = this.add({
|
||||
xtype: 'fieldset',
|
||||
border: false,
|
||||
title: _('Session'),
|
||||
autoHeight: true,
|
||||
labelWidth: 110,
|
||||
defaultType: 'uxspinner',
|
||||
defaults: {
|
||||
width: 80,
|
||||
}
|
||||
});
|
||||
optMan.bind('session_timeout', fieldset.add({
|
||||
name: 'session_timeout',
|
||||
fieldLabel: _('Session Timeout')
|
||||
}));
|
||||
},
|
||||
|
||||
onApply: function() {
|
||||
alert('apply');
|
||||
var changed = this.optionsManager.getDirty();
|
||||
if (!Ext.isObjectEmpty(changed)) {
|
||||
Deluge.Client.web.set_config(changed, {
|
||||
success: this.onSetConfig,
|
||||
scope: this
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onGotConfig: function(config) {
|
||||
@ -149,6 +171,10 @@ Ext.deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||
});
|
||||
},
|
||||
|
||||
onSetConfig: function() {
|
||||
this.getOptionsManager().commit();
|
||||
},
|
||||
|
||||
onShow: function() {
|
||||
Ext.deluge.preferences.Interface.superclass.onShow.call(this);
|
||||
Deluge.Client.web.get_config({
|
||||
|
Loading…
x
Reference in New Issue
Block a user