Merge pull request #43 from carlmon/QueueOrder

Display queue order as Aria2 will download.
This commit is contained in:
ziahamza 2013-01-05 01:52:27 -08:00
commit fbb0ecfefb

View File

@ -462,11 +462,11 @@ function refreshDownloadTemplates(top_elem, data) {
updateDownloadTemplates(elem, ctx); updateDownloadTemplates(elem, ctx);
} else { } else {
var item = Mustache.render(down_template, ctx); var item = Mustache.render(down_template, ctx);
new_items.splice(0, 0, item); //prepend to array using splice (unshift method may not be supported) new_items.push(item);
} }
} }
if (new_items.length > 0) { if (new_items.length > 0) {
$top_elem.prepend(new_items); $top_elem.append(new_items);
} }
$top_elem.children('.hero-unit').remove(); $top_elem.children('.hero-unit').remove();
} }