View | Details | Raw Unified | Return to bug 24219
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/js/browser.js (-3 / +3 lines)
Lines 32-40 KOHA.browser = function (searchid, biblionumber) { Link Here
32
    var browseRecords = function (movement) {
32
    var browseRecords = function (movement) {
33
        var newSearchPos = me.curPos + movement;
33
        var newSearchPos = me.curPos + movement;
34
        if (newSearchPos > current_search.results.length - 1) {
34
        if (newSearchPos > current_search.results.length - 1) {
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=first&searchid=' + me.searchid + '&offset=' + newSearchPos;
35
            window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' + newSearchPos;
36
        } else if (newSearchPos < 0) {
36
        } else if (newSearchPos < 0) {
37
            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);
37
            window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' + (me.offset - current_search.pagelen);
38
        } else {
38
        } else {
39
            window.location = window.location.href.replace('biblionumber=' + biblionumber, 'biblionumber=' + current_search.results[newSearchPos]);
39
            window.location = window.location.href.replace('biblionumber=' + biblionumber, 'biblionumber=' + current_search.results[newSearchPos]);
40
        }
40
        }
Lines 91-97 KOHA.browser = function (searchid, biblionumber) { Link Here
91
91
92
            $(document).ready(function () {
92
            $(document).ready(function () {
93
                if (me.curPos > -1) {
93
                if (me.curPos > -1) {
94
                    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;
94
                    var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset;
95
                    var prevbutton;
95
                    var prevbutton;
96
                    var nextbutton;
96
                    var nextbutton;
97
                    if (me.curPos === 0 && current_search.offset === 1) {
97
                    if (me.curPos === 0 && current_search.offset === 1) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (+1 lines)
Lines 708-713 Link Here
708
            query_cgi: "[% query_cgi | html %]",
708
            query_cgi: "[% query_cgi | html %]",
709
            limit_cgi: "[% limit_cgi | html %]",
709
            limit_cgi: "[% limit_cgi | html %]",
710
            sort_cgi: "[% sort_cgi | html %]",
710
            sort_cgi: "[% sort_cgi | html %]",
711
            sort_by: "[% sort_by | html %]",
711
            gotoPage: "[% gotoPage | html %]",
712
            gotoPage: "[% gotoPage | html %]",
712
            gotoNumber: "[% gotoNumber | html %]",
713
            gotoNumber: "[% gotoNumber | html %]",
713
            searchid: "[% searchid | html %]",
714
            searchid: "[% searchid | html %]",
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js (-4 / +3 lines)
Lines 104-110 $(document).ready(function() { Link Here
104
104
105
    if( SEARCH_RESULTS ){
105
    if( SEARCH_RESULTS ){
106
        var browser = KOHA.browser( search_result.searchid, parseInt( biblionumber, 10));
106
        var browser = KOHA.browser( search_result.searchid, parseInt( biblionumber, 10));
107
        browser.create( search_result.first_result_number, search_result.query_cgi, search_result.limit_cgi, search_result.sort_cgi, new_results_browser, search_result.total );
107
        browser.create( search_result.first_result_number, search_result.query_cgi, search_result.limit_cgi, search_result.sort_by, new_results_browser, search_result.total );
108
    }
108
    }
109
109
110
    if( search_result.gotoPage && search_result.gotoNumber){
110
    if( search_result.gotoPage && search_result.gotoNumber){
Lines 245-251 function browse_selection () { Link Here
245
    var bibnums = getContextBiblioNumbers();
245
    var bibnums = getContextBiblioNumbers();
246
    if ( bibnums && bibnums.length > 0 ) {
246
    if ( bibnums && bibnums.length > 0 ) {
247
        var browser = KOHA.browser('', parseInt( biblionumber, 10));
247
        var browser = KOHA.browser('', parseInt( biblionumber, 10));
248
        browser.create(1, search_result.query_cgi, search_result.limit_cgi, search_result.sort_cgi, bibnums, bibnums.length);
248
        browser.create(1, search_result.query_cgi, search_result.limit_cgi, search_result.sort_by, bibnums, bibnums.length);
249
        window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid;
249
        window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid;
250
    } else {
250
    } else {
251
        alert(MSG_NO_ITEM_SELECTED);
251
        alert(MSG_NO_ITEM_SELECTED);
Lines 305-308 function verify_images() { Link Here
305
            }
305
            }
306
        }
306
        }
307
    });
307
    });
308
}
308
}
309
- 

Return to bug 24219