Author: damoxc

Revision: 5853

Log:
        show the infinity symbol if ratio is less than 0

Diff:
Modified: branches/1.2_RC/deluge/ui/web/js/Deluge.Torrents.js
===================================================================
--- branches/1.2_RC/deluge/ui/web/js/Deluge.Torrents.js 2009-10-20 22:35:02 UTC 
(rev 5852)
+++ branches/1.2_RC/deluge/ui/web/js/Deluge.Torrents.js 2009-10-20 22:45:32 UTC 
(rev 5853)
@@ -66,7 +66,7 @@
         }
     }
     function availRenderer(value, p, r)        {
-        return new Number(value).toFixed(3);
+        return (value < 0) ? '∞' : new Number(value).toFixed(3);
     }
     function trackerRenderer(value, p, r) {
         return String.format('<div style="background: url(/tracker/{0}) 
no-repeat; padding-left: 20px;">{0}</div>', value);

Modified: trunk/deluge/ui/web/js/Deluge.Torrents.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Torrents.js   2009-10-20 22:35:02 UTC (rev 
5852)
+++ trunk/deluge/ui/web/js/Deluge.Torrents.js   2009-10-20 22:45:32 UTC (rev 
5853)
@@ -66,7 +66,7 @@
         }
     }
     function availRenderer(value, p, r)        {
-        return new Number(value).toFixed(3);
+        return (value < 0) ? '∞' : new Number(value).toFixed(3);
     }
     function trackerRenderer(value, p, r) {
         return String.format('<div style="background: url(/tracker/{0}) 
no-repeat; padding-left: 20px;">{0}</div>', value);



--~--~---------~--~----~------------~-------~--~----~
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