change the value of torrent.queue from -1 to 99999 so the grid sorting works the same as the gtk ui

This commit is contained in:
Damien Churchill 2009-10-10 14:06:08 +00:00
parent 44217fd977
commit e0111271a3
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ Copyright:
(function() { (function() {
/* Renderers for the Torrent Grid */ /* Renderers for the Torrent Grid */
function queueRenderer(value) { function queueRenderer(value) {
return (value == -1) ? '' : value + 1; return (value == 99999) ? '' : value + 1;
} }
function torrentNameRenderer(value, p, r) { function torrentNameRenderer(value, p, r) {
return String.format('<div class="torrent-name x-deluge-{0}">{1}</div>', r.data['state'].toLowerCase(), value); return String.format('<div class="torrent-name x-deluge-{0}">{1}</div>', r.data['state'].toLowerCase(), value);
@ -241,7 +241,7 @@ Copyright:
if (!record) { if (!record) {
// We need to create a new record // We need to create a new record
var data = [ var data = [
torrent.queue, ((torrent.queue == -1) ? 99999 : torrent.queue),
torrent.name, torrent.name,
torrent.total_size, torrent.total_size,
torrent.state, torrent.state,
@ -262,7 +262,7 @@ Copyright:
store.loadData([data], true); store.loadData([data], true);
} else { } else {
// We just need to do an update // 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('name', torrent.name);
record.set('size', torrent.total_size); record.set('size', torrent.total_size);
record.set('state', torrent.state); record.set('state', torrent.state);