From e0111271a311983e3c584feb5d4c968a121d56eb Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Sat, 10 Oct 2009 14:06:08 +0000 Subject: [PATCH] change the value of torrent.queue from -1 to 99999 so the grid sorting works the same as the gtk ui --- deluge/ui/web/js/Deluge.Torrents.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/web/js/Deluge.Torrents.js b/deluge/ui/web/js/Deluge.Torrents.js index 44222a708..a61dcc258 100644 --- a/deluge/ui/web/js/Deluge.Torrents.js +++ b/deluge/ui/web/js/Deluge.Torrents.js @@ -35,7 +35,7 @@ Copyright: (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('
{1}
', r.data['state'].toLowerCase(), value); @@ -241,7 +241,7 @@ Copyright: 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 @@ Copyright: 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);