From 1d29f67a754f8b8f99e0ef00a2676a651f762091 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Thu, 28 Jan 2010 22:49:56 +0000 Subject: [PATCH] fix the progress bar in the grid --- deluge/ui/web/js/deluge-all/Deluge.Torrents.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Deluge.Torrents.js b/deluge/ui/web/js/deluge-all/Deluge.Torrents.js index 97b5e3f8e..3751aa582 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.Torrents.js +++ b/deluge/ui/web/js/deluge-all/Deluge.Torrents.js @@ -47,8 +47,9 @@ Copyright: function torrentProgressRenderer(value, p, r) { value = new Number(value); var progress = value; - var text = r.data['state'] + ' ' + value.toFixed(2) + '%' - return Deluge.progressBar(value, this.width - 8, text); + var text = r.data['state'] + ' ' + value.toFixed(2) + '%'; + var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]); + return Deluge.progressBar(value, width - 8, text); } function seedsRenderer(value, p, r) { if (r.data['total_seeds'] > -1) { @@ -243,11 +244,8 @@ Copyright: }, update: function(torrents, bulk) { - if (bulk) { - this.getStore().loadData({"torrents": Ext.values(torrents)}); - } else { - this.getStore().loadData({"torrents": Ext.values(torrents)}); - } + var store = this.getStore(); + store.loadData({"torrents": Ext.values(torrents)}); }, onDisconnect: function() {