Author: damoxc

Revision: 6164

Log:
        fix the progress bar in the grid

Diff:
Modified: trunk/deluge/ui/web/js/deluge-all/Deluge.Torrents.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-all/Deluge.Torrents.js        2010-01-28 
18:43:30 UTC (rev 6163)
+++ trunk/deluge/ui/web/js/deluge-all/Deluge.Torrents.js        2010-01-28 
22:49:56 UTC (rev 6164)
@@ -47,8 +47,9 @@
        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 @@
        },
 
        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() {


-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to