From fd544834e40f4ce8bda6c7df10e154b9e0b82b51 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 26 Sep 2008 18:02:54 +0000 Subject: [PATCH] fix wrong method being called for menu clicks --- .../webui/templates/ajax/static/js/deluge-ui.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/deluge/ui/webui/templates/ajax/static/js/deluge-ui.js b/deluge/ui/webui/templates/ajax/static/js/deluge-ui.js index 180507b7b..54644aab1 100644 --- a/deluge/ui/webui/templates/ajax/static/js/deluge-ui.js +++ b/deluge/ui/webui/templates/ajax/static/js/deluge-ui.js @@ -76,7 +76,7 @@ Deluge.UI = { var menu = new Widgets.PopupMenu() menu.add(Deluge.Menus.Torrents); menu.addEvent('action', function(e) { - this.torrent_action(e.action, e.value) + this.torrentAction(e.action, e.value) }.bind(this)) this.grid.addEvent('row_menu', function(e) { @@ -88,10 +88,11 @@ Deluge.UI = { }.bindWithEvent(this)) this.grid.addEvent('selectedchanged', function(e) { - if ($chk(this.grid.selectedRow)) + if ($chk(this.grid.selectedRow)) { this.details.update(this.grid.selectedRow.id); - else + } else { this.details.update(null); + } }.bindWithEvent(this)) }, @@ -151,12 +152,12 @@ Deluge.UI = { this.grid.updateTorrents(this.torrents); this.statusbar.update(this.stats); - if ($chk(this.grid.selectedRow)) + if ($chk(this.grid.selectedRow)) { this.details.update(this.grid.selectedRow.id); - else + } else { this.details.update(null); - - this.labels.update(this.filters) + } + this.labels.update(this.filters); }, filePriorities: function(event) { @@ -269,8 +270,6 @@ Deluge.UI = { } }; - - window.addEvent('domready', function(e) { Deluge.UI.initialize(); Deluge.UI.run();