Lines 30-44
KOHA.browser = function (searchid, biblionumber) {
Link Here
|
30 |
var browseRecords = function (movement) { |
30 |
var browseRecords = function (movement) { |
31 |
var newSearchPos = me.curPos + movement; |
31 |
var newSearchPos = me.curPos + movement; |
32 |
if (newSearchPos > current_search.results.length - 1) { |
32 |
if (newSearchPos > current_search.results.length - 1) { |
33 |
window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' + newSearchPos; |
33 |
window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.full_query.replace(/&offset(=[^&]*)?|^offset(=[^&]*)?&?/g, '')) + '&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' + newSearchPos; |
34 |
} else if (newSearchPos < 0) { |
34 |
} else if (newSearchPos < 0) { |
35 |
window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' + (me.offset - current_search.pagelen); |
35 |
window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.full_query.replace(/&offset(=[^&]*)?|^offset(=[^&]*)?&?/g, '')) + '&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' + (me.offset - current_search.pagelen); |
36 |
} else { |
36 |
} else { |
37 |
window.location = window.location.href.replace('biblionumber=' + biblionumber, 'biblionumber=' + current_search.results[newSearchPos]); |
37 |
window.location = window.location.href.replace('biblionumber=' + biblionumber, 'biblionumber=' + current_search.results[newSearchPos]); |
38 |
} |
38 |
} |
39 |
} |
39 |
} |
40 |
|
40 |
|
41 |
me.create = function (offset, query, limit, sort, newresults, total) { |
41 |
me.create = function (offset, query, limit, sort, newresults, total, full_query) { |
42 |
if (current_search) { |
42 |
if (current_search) { |
43 |
if (offset === current_search.offset - newresults.length) { |
43 |
if (offset === current_search.offset - newresults.length) { |
44 |
current_search.results = newresults.concat(current_search.results); |
44 |
current_search.results = newresults.concat(current_search.results); |
Lines 51-56
KOHA.browser = function (searchid, biblionumber) {
Link Here
|
51 |
if (!current_search) { |
51 |
if (!current_search) { |
52 |
current_search = { offset: offset, |
52 |
current_search = { offset: offset, |
53 |
query: query, |
53 |
query: query, |
|
|
54 |
full_query: full_query, |
54 |
limit: limit, |
55 |
limit: limit, |
55 |
sort: sort, |
56 |
sort: sort, |
56 |
pagelen: newresults.length, |
57 |
pagelen: newresults.length, |
Lines 89-95
KOHA.browser = function (searchid, biblionumber) {
Link Here
|
89 |
|
90 |
|
90 |
$(document).ready(function () { |
91 |
$(document).ready(function () { |
91 |
if (me.curPos > -1) { |
92 |
if (me.curPos > -1) { |
92 |
var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset; |
93 |
var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.full_query.replace(/&offset(=[^&]*)?|^offset(=[^&]*)?&?/g, '')) + '&offset=' + me.offset; |
93 |
var prevbutton; |
94 |
var prevbutton; |
94 |
var nextbutton; |
95 |
var nextbutton; |
95 |
if (me.curPos === 0 && current_search.offset === 1) { |
96 |
if (me.curPos === 0 && current_search.offset === 1) { |