Skip to content
Snippets Groups Projects
Commit c77dded3 authored by Brett Bieber's avatar Brett Bieber
Browse files

Get pagination links tied to the correct search object.

parent fe03f817
No related branches found
No related tags found
No related merge requests found
......@@ -121,10 +121,14 @@ UNL_Search.handleResults = function (result_div, searchobj) {
}
var nav = document.createElement("div");
nav.className = "gs-search-nav";
var search_name = 'unl_search';
if (result_div.substring(0,5) == 'local') {
search_name = 'local_search';
}
for (var i = 0; i < searchobj.cursor.pages.length; i++) {
var pageText = '';
if (searchobj.cursor.currentPageIndex != i) {
pageText += '<a onclick="UNL_Search.unl_search.gotoPage(' + i + '); return false;" href="#">' + searchobj.cursor.pages[i].label + '</a>&nbsp;&nbsp;';
pageText += '<a onclick="UNL_Search.'+search_name+'.gotoPage(' + i + '); return false;" href="#">' + searchobj.cursor.pages[i].label + '</a>&nbsp;&nbsp;';
} else {
pageText += searchobj.cursor.pages[i].label + '&nbsp;&nbsp;';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment