mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 00:48:41 +00:00
implement moving trackers up/down
This commit is contained in:
parent
38c85cf7bb
commit
8e4d88f03c
1 changed files with 16 additions and 0 deletions
|
@ -188,6 +188,7 @@ Deluge.EditTrackersWindow = Ext.extend(Ext.Window, {
|
||||||
|
|
||||||
onRequestComplete: function(status) {
|
onRequestComplete: function(status) {
|
||||||
this.list.getStore().loadData(status);
|
this.list.getStore().loadData(status);
|
||||||
|
this.list.getStore().sort('tier', 'ASC');
|
||||||
},
|
},
|
||||||
|
|
||||||
onSaveFail: function() {
|
onSaveFail: function() {
|
||||||
|
@ -208,5 +209,20 @@ Deluge.EditTrackersWindow = Ext.extend(Ext.Window, {
|
||||||
success: this.onRequestComplete,
|
success: this.onRequestComplete,
|
||||||
scope: this
|
scope: this
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onDownClick: function() {
|
||||||
|
var r = this.list.getSelectedRecords()[0];
|
||||||
|
r.set('tier', r.get('tier') + 1);
|
||||||
|
r.commit();
|
||||||
|
r.store.sort('tier', 'ASC');
|
||||||
|
},
|
||||||
|
|
||||||
|
onUpClick: function() {
|
||||||
|
var r = this.list.getSelectedRecords()[0];
|
||||||
|
if (r.get('tier') == 0) return;
|
||||||
|
r.set('tier', r.get('tier') - 1);
|
||||||
|
r.commit();
|
||||||
|
r.store.sort('tier', 'ASC');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue