diff options
author | Damien Churchill <damoxc@gmail.com> | 2011-11-04 00:44:56 +0000 |
---|---|---|
committer | Damien Churchill <damoxc@gmail.com> | 2011-11-04 00:44:56 +0000 |
commit | c405425993e5a6aeb343cb974d114f9e38dca757 (patch) | |
tree | 47bf11e45559bc163d3ad1719c26fe3cf589703b | |
parent | d10752fc1afe9869c38a0960d0e7ec4c74c842a8 (diff) | |
download | deluge-c405425993e5a6aeb343cb974d114f9e38dca757.tar.gz deluge-c405425993e5a6aeb343cb974d114f9e38dca757.tar.bz2 deluge-c405425993e5a6aeb343cb974d114f9e38dca757.zip |
web: fix details tab taking a while to update
Somewhere the handler for the torrent grid selection change
got removed during the upgrade to ext-4, add it back so the
details tab updating becomes instant once more.
-rw-r--r-- | deluge/ui/web/js/deluge-all/TorrentGrid.js | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/deluge/ui/web/js/deluge-all/TorrentGrid.js b/deluge/ui/web/js/deluge-all/TorrentGrid.js index 1f9a5e510..72cf6ebcb 100644 --- a/deluge/ui/web/js/deluge-all/TorrentGrid.js +++ b/deluge/ui/web/js/deluge-all/TorrentGrid.js @@ -240,11 +240,15 @@ Ext.define('Deluge.TorrentGrid', { } }), + viewConfig: { + stateId: 'torrentGridView', + stateful: true + }, + id: 'torrentGrid', region: 'center', cls: 'deluge-torrents', stripeRows: true, - autoScroll:true, deferredRender:false, invalidateScrollOnRefresh: false, margins: '5 5 0 0', @@ -255,6 +259,29 @@ Ext.define('Deluge.TorrentGrid', { deluge.events.on('disconnect', this.onDisconnect, this); this.on('itemcontextmenu', this.onTorrentSelected, this); + + this.on('staterestore', function(stateful, state, eopts) { + deluge.log('grid restoring state'); + }); + + this.on('selectionchange', function(grid, selected) { + if (selected.length) + deluge.details.update(); + else + deluge.details.clear(); + }); + + this.on('statesave', function() { + deluge.log('grid saving state'); + }); + + this.getView().on('statesave', function() { + deluge.log('view saving state'); + }); + + this.getView().on('staterestore', function(stateful, state, eopts) { + deluge.log('view restoring state'); + }); }, /** |