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 (-3 / +2 lines)
Lines 797-803 Link Here
797
                    [%- END -%]
797
                    [%- END -%]
798
                ];
798
                ];
799
                var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
799
                var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
800
                browser.create([% SEARCH_RESULTS.first.result_number | html %], '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_cgi | html %]',
800
                browser.create([% SEARCH_RESULTS.first.result_number | html %], '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_by| html %]',
801
                       newresults, '[% total | html %]');
801
                       newresults, '[% total | html %]');
802
            [% END %]
802
            [% END %]
803
803
Lines 935-941 Link Here
935
            var bibnums = getContextBiblioNumbers();
935
            var bibnums = getContextBiblioNumbers();
936
            if ( bibnums && bibnums.length > 0 ) {
936
            if ( bibnums && bibnums.length > 0 ) {
937
                var browser = KOHA.browser('', parseInt('[% biblionumber | html %]', 10));
937
                var browser = KOHA.browser('', parseInt('[% biblionumber | html %]', 10));
938
                browser.create(1, '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_cgi | html %]', bibnums, bibnums.length);
938
                browser.create(1, '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_by | html %]', bibnums, bibnums.length);
939
                window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid;
939
                window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid;
940
            } else {
940
            } else {
941
                alert(MSG_NO_ITEM_SELECTED);
941
                alert(MSG_NO_ITEM_SELECTED);
942
- 

Return to bug 24219