Author: damoxc

Revision: 4972

Log:
        tweak the seeds and peers renderers to match the gtk ones

Diff:
Modified: trunk/deluge/ui/web/js/deluge-torrents.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-torrents.js   2009-04-01 21:51:04 UTC (rev 
4971)
+++ trunk/deluge/ui/web/js/deluge-torrents.js   2009-04-01 21:53:41 UTC (rev 
4972)
@@ -53,11 +53,19 @@
 }
 
 function seeds(value, p, r) {
-       return String.format("{0} ({1})", value, r.data['total_seeds']);
+       if (r.data['total_seeds'] > -1) {
+               return String.format("{0} ({1})", value, r.data['total_seeds']);
+       } else {
+               return value;
+       }
 }
 
 function peers(value, p, r) {
-       return String.format("{0} ({1})", value, r.data['total_peers']);
+       if (r.data['total_peers'] > -1) {
+               return String.format("{0} ({1})", value, r.data['total_peers']);
+       } else {
+               return value;
+       }
 }
 
 function avail(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