Author: damoxc
Revision: 5883
Log:
fix the eta sort order in the webui
Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-10-27 11:07:30 UTC (rev 5882)
+++ branches/1.2_RC/ChangeLog 2009-10-27 11:16:55 UTC (rev 5883)
@@ -10,6 +10,7 @@
* Fix setting torrent options when adding
* Fix setting file priorities when adding
* HTML escape the field values on the details tab
+ * Fix #215, make infinite eta values display in the correct order
=== Deluge 1.2.0_rc2 (25 October 2009) ===
==== GtkUI ====
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-27 11:07:30 UTC
(rev 5882)
+++ branches/1.2_RC/deluge/ui/web/js/Deluge.Torrents.js 2009-10-27 11:16:55 UTC
(rev 5883)
@@ -71,6 +71,10 @@
function trackerRenderer(value, p, r) {
return String.format('<div style="background: url(/tracker/{0})
no-repeat; padding-left: 20px;">{0}</div>', value);
}
+
+ function etaSorter(eta) {
+ return eta * -1;
+ }
/**
* Ext.deluge.TorrentGrid Class
@@ -100,7 +104,7 @@
{name: 'total_peers', type: 'int'},
{name: 'downspeed', type: 'int'},
{name: 'upspeed', type: 'int'},
- {name: 'eta', type: 'int'},
+ {name: 'eta', type: 'int', sortType: etaSorter},
{name: 'ratio', type: 'float'},
{name: 'avail', type: 'float'},
{name: 'added', type: 'int'},
Modified: trunk/deluge/ui/web/js/Deluge.Torrents.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Torrents.js 2009-10-27 11:07:30 UTC (rev
5882)
+++ trunk/deluge/ui/web/js/Deluge.Torrents.js 2009-10-27 11:16:55 UTC (rev
5883)
@@ -71,6 +71,10 @@
function trackerRenderer(value, p, r) {
return String.format('<div style="background: url(/tracker/{0})
no-repeat; padding-left: 20px;">{0}</div>', value);
}
+
+ function etaSorter(eta) {
+ return eta * -1;
+ }
/**
* Ext.deluge.TorrentGrid Class
@@ -100,7 +104,7 @@
{name: 'total_peers', type: 'int'},
{name: 'downspeed', type: 'int'},
{name: 'upspeed', type: 'int'},
- {name: 'eta', type: 'int'},
+ {name: 'eta', type: 'int', sortType: etaSorter},
{name: 'ratio', type: 'float'},
{name: 'avail', type: 'float'},
{name: 'added', type: 'int'},
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---