From f53dc5faafb1f951ff73da412fae5c2926a4c9ca Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 5 Oct 2011 01:29:47 +0100 Subject: [PATCH] web: random fixes Just a bunch of random fixes to improve the situation whilst trying to convert over to extjs4. --- deluge/ui/web/js/deluge-all/Keys.js | 5 +++-- deluge/ui/web/js/deluge-all/Sidebar.js | 9 ++++++--- deluge/ui/web/js/deluge-all/details/DetailsPanel.js | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Keys.js b/deluge/ui/web/js/deluge-all/Keys.js index 64fe0f8cd..36f549ddb 100644 --- a/deluge/ui/web/js/deluge-all/Keys.js +++ b/deluge/ui/web/js/deluge-all/Keys.js @@ -48,7 +48,8 @@ Deluge.Keys = { 'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds', 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate', 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies', - 'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete' + 'is_auto_managed', 'time_added', 'tracker_host', 'save_path', + 'last_seen_complete', 'owner', 'public', 'shared' ], /** @@ -63,7 +64,7 @@ Deluge.Keys = { 'total_done', 'total_payload_download', 'total_uploaded', 'total_payload_upload', 'next_announce', 'tracker_status', 'num_pieces', 'piece_length', 'is_auto_managed', 'active_time', 'seeding_time', - 'seed_rank', 'last_seen_complete', 'owner', 'public', 'shared' + 'seed_rank' ], /** diff --git a/deluge/ui/web/js/deluge-all/Sidebar.js b/deluge/ui/web/js/deluge-all/Sidebar.js index e0e283127..6f7c0960d 100644 --- a/deluge/ui/web/js/deluge-all/Sidebar.js +++ b/deluge/ui/web/js/deluge-all/Sidebar.js @@ -79,12 +79,15 @@ Ext.define('Deluge.Sidebar', { this.panels[filter] = panel; panel.header.on('click', function(header) { + var s = panel.getStore(), + sm = panel.getSelectionModel(); + if (!deluge.config.sidebar_multiple_filters) { deluge.ui.update(); } - if (!panel.getSelectionModel().hasSelection()) { - panel.getSelectionModel().select(0); - } + //if (!sm.hasSelection() && s.count() > 0) { + // sm.select([s.first()]); + //} }); this.fireEvent('filtercreate', this, panel); diff --git a/deluge/ui/web/js/deluge-all/details/DetailsPanel.js b/deluge/ui/web/js/deluge-all/details/DetailsPanel.js index 4b480c1d7..e90200730 100644 --- a/deluge/ui/web/js/deluge-all/details/DetailsPanel.js +++ b/deluge/ui/web/js/deluge-all/details/DetailsPanel.js @@ -47,11 +47,11 @@ Ext.define('Deluge.details.DetailsPanel', { initComponent: function() { this.callParent(arguments); - this.add(new Deluge.details.StatusTab()); - this.add(new Deluge.details.DetailsTab()); - this.add(new Deluge.details.FilesTab()); - this.add(new Deluge.details.PeersTab()); - this.add(new Deluge.details.OptionsTab()); + this.add(Ext.create('Deluge.details.StatusTab')); + this.add(Ext.create('Deluge.details.DetailsTab')); + this.add(Ext.create('Deluge.details.FilesTab')); + this.add(Ext.create('Deluge.details.PeersTab')); + this.add(Ext.create('Deluge.details.OptionsTab')); }, clear: function() {