Author: damoxc
Revision: 5832
Log:
change the value of torrent.queue from -1 to 99999 so the grid sorting
works the same as the gtk ui
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-10 13:45:31 UTC
(rev 5831)
+++ branches/1.2_RC/deluge/ui/web/js/Deluge.Torrents.js 2009-10-10 14:06:08 UTC
(rev 5832)
@@ -35,7 +35,7 @@
(function() {
/* Renderers for the Torrent Grid */
function queueRenderer(value) {
- return (value == -1) ? '' : value + 1;
+ return (value == 99999) ? '' : value + 1;
}
function torrentNameRenderer(value, p, r) {
return String.format('<div class="torrent-name
x-deluge-{0}">{1}</div>', r.data['state'].toLowerCase(), value);
@@ -241,7 +241,7 @@
if (!record) {
// We need to create a new record
var data = [
- torrent.queue,
+ ((torrent.queue == -1) ? 99999 : torrent.queue),
torrent.name,
torrent.total_size,
torrent.state,
@@ -262,7 +262,7 @@
store.loadData([data], true);
} else {
// We just need to do an update
- record.set('queue', torrent.queue);
+ record.set('queue', ((torrent.queue == -1) ? 99999 :
torrent.queue));
record.set('name', torrent.name);
record.set('size', torrent.total_size);
record.set('state', torrent.state);
Modified: trunk/deluge/ui/web/js/Deluge.Torrents.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Torrents.js 2009-10-10 13:45:31 UTC (rev
5831)
+++ trunk/deluge/ui/web/js/Deluge.Torrents.js 2009-10-10 14:06:08 UTC (rev
5832)
@@ -35,7 +35,7 @@
(function() {
/* Renderers for the Torrent Grid */
function queueRenderer(value) {
- return (value == -1) ? '' : value + 1;
+ return (value == 99999) ? '' : value + 1;
}
function torrentNameRenderer(value, p, r) {
return String.format('<div class="torrent-name
x-deluge-{0}">{1}</div>', r.data['state'].toLowerCase(), value);
@@ -241,7 +241,7 @@
if (!record) {
// We need to create a new record
var data = [
- torrent.queue,
+ ((torrent.queue == -1) ? 99999 : torrent.queue),
torrent.name,
torrent.total_size,
torrent.state,
@@ -262,7 +262,7 @@
store.loadData([data], true);
} else {
// We just need to do an update
- record.set('queue', torrent.queue);
+ record.set('queue', ((torrent.queue == -1) ? 99999 :
torrent.queue));
record.set('name', torrent.name);
record.set('size', torrent.total_size);
record.set('state', torrent.state);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---