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

(-)a/koha-tmpl/intranet-tmpl/js/browser.js (-3 / +4 lines)
Lines 25-31 KOHA.browser = function (searchid, biblionumber) { Link Here
25
        }
25
        }
26
    }
26
    }
27
27
28
    this.create = function (offset, query, limit, sort, newresults) {
28
    this.create = function (offset, query, limit, sort, newresults, total) {
29
        if (me.searchCookie) {
29
        if (me.searchCookie) {
30
            if (offset === me.searchCookie.offset - newresults.length) {
30
            if (offset === me.searchCookie.offset - newresults.length) {
31
                me.searchCookie.results = newresults.concat(me.searchCookie.results);
31
                me.searchCookie.results = newresults.concat(me.searchCookie.results);
Lines 41-47 KOHA.browser = function (searchid, biblionumber) { Link Here
41
                limit: limit,
41
                limit: limit,
42
                sort:  sort,
42
                sort:  sort,
43
                pagelen: newresults.length,
43
                pagelen: newresults.length,
44
                results: newresults
44
                results: newresults,
45
                total: total
45
            };
46
            };
46
47
47
            //Bug_11369 Cleaning up excess searchCookies to prevent cookie overflow in the browser memory.
48
            //Bug_11369 Cleaning up excess searchCookies to prevent cookie overflow in the browser memory.
Lines 81-87 KOHA.browser = function (searchid, biblionumber) { Link Here
81
                    } else {
82
                    } else {
82
                        prevbutton = '<a href="#" id="browse-previous" class="browse-button">« ' + BROWSER_PREVIOUS + '</a>';
83
                        prevbutton = '<a href="#" id="browse-previous" class="browse-button">« ' + BROWSER_PREVIOUS + '</a>';
83
                    }
84
                    }
84
                    if (me.curPos === me.searchCookie.pagelen - 1) {
85
                    if (me.searchCookie.offset + me.curPos == me.searchCookie.total) {
85
                        nextbutton = '<span id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</span>';
86
                        nextbutton = '<span id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</span>';
86
                    } else {
87
                    } else {
87
                        nextbutton = '<a href="#" id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</a>';
88
                        nextbutton = '<a href="#" id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</a>';
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-2 / +2 lines)
Lines 139-145 $('#sort_by').change(function() { Link Here
139
            [%- END -%]
139
            [%- END -%]
140
        ];
140
        ];
141
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
141
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
142
        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]', '[% sort_cgi | uri %]', newresults);
142
        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]',
143
               newresults, '[% total %]');
143
    [% END %]
144
    [% END %]
144
    [% IF (gotoPage && gotoNumber) %]
145
    [% IF (gotoPage && gotoNumber) %]
145
        [% IF (gotoNumber == 'first') %]
146
        [% IF (gotoNumber == 'first') %]
146
- 

Return to bug 12481