Fix search result buttons issue

This commit is contained in:
calzoneman 2013-09-24 13:19:41 -05:00
parent 0addff6bab
commit b3f4fc2b52
2 changed files with 21 additions and 24 deletions

View File

@ -1,3 +1,7 @@
Tue Sep 24 13:15 2013 CDT
* www/assets/js/callbacks.js: Instantiate a new paginator for every
search result- prevents buttons being incorrectly added or omitted.
Mon Sep 23 16:22 2013 CDT
* lib/user.js: distinguish search result return packets with a 'source'
field that specifies where the item came from (e.g 'yt' for youtube

View File

@ -939,12 +939,6 @@ Callbacks = {
clearSearchResults();
})
.insertBefore($("#library"));
var p = $("#library").data("paginator");
if(p) {
p.items = data.results;
p.loadPage(0);
}
else {
var opts = {
preLoadPage: function () {
$("#library").html("");
@ -961,11 +955,10 @@ Callbacks = {
itemsPerPage: 100
};
p = Paginate(data.results, opts);
var p = Paginate(data.results, opts);
p.paginator.insertBefore($("#library"))
.attr("id", "search_pagination");
$("#library").data("paginator", p);
}
},
/* REGION Polls */