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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 197-202 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
197
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
197
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
198
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
198
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
199
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
199
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
200
('MaxSearchCookies','10',NULL,'Defines the maximum number of search cookies to store in the browser.','Integer')
200
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
201
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
201
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
202
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
202
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
203
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 9505-9510 CREATE TABLE borrower_sync ( Link Here
9505
    SetVersion($DBversion);
9505
    SetVersion($DBversion);
9506
}
9506
}
9507
9507
9508
$DBversion = "3.17.00.XXX";
9509
if (CheckVersion($DBversion)) {
9510
    $dbh->do(q{
9511
        INSERT INTO systempreferences ( variable, value, options, explanation, type ) VALUES
9512
        ('MaxSearchCookies','10',NULL,'Defines the maximum number of search cookies to store in the browser.','Integer')
9513
    });
9514
    print "Upgrade to $DBversion done (Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds)\n";
9515
    SetVersion($DBversion);
9516
}
9517
9508
=head1 FUNCTIONS
9518
=head1 FUNCTIONS
9509
9519
9510
=head2 TableExists($table)
9520
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/js/browser.js (-2 / +4 lines)
Lines 1-6 Link Here
1
if ( KOHA === undefined ) var KOHA = {};
1
if ( KOHA === undefined ) var KOHA = {};
2
2
3
KOHA.browser = function (searchid, biblionumber) {
3
KOHA.browser = function (searchid, biblionumber, max_search_cookies) {
4
    if (!max_search_cookies) max_search_cookies = 10;
5
4
    var me = this;
6
    var me = this;
5
7
6
    if (!searchid) {
8
    if (!searchid) {
Lines 52-58 KOHA.browser = function (searchid, biblionumber) { Link Here
52
                    return ( elementOfArray.search(/^scs_\d/) != -1 ); //We are looking for specifically staff client searchCookies.
54
                    return ( elementOfArray.search(/^scs_\d/) != -1 ); //We are looking for specifically staff client searchCookies.
53
                }
55
                }
54
            );
56
            );
55
            if (scsCookieKeys.length >= 10) {
57
            if (scsCookieKeys.length >= max_search_cookies) {
56
                scsCookieKeys.sort(); //Make sure they are in order, oldest first!
58
                scsCookieKeys.sort(); //Make sure they are in order, oldest first!
57
                $.removeCookie( scsCookieKeys[0], { path: '/' } );
59
                $.removeCookie( scsCookieKeys[0], { path: '/' } );
58
            }
60
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (+5 lines)
Lines 207-212 Cataloging: Link Here
207
                  yes: Display
207
                  yes: Display
208
                  no: "Don't display"
208
                  no: "Don't display"
209
            - acquisition details on the biblio detail page.
209
            - acquisition details on the biblio detail page.
210
        -
211
            - Allow a maximum of
212
            - pref: MaxSearchCookies
213
              class: Integer
214
            - search history cookies to be stored.
210
    Importing:
215
    Importing:
211
        -
216
        -
212
            - When matching on ISBN with the record import tool,
217
            - When matching on ISBN with the record import tool,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Catalog &rsaquo;
3
<title>Koha &rsaquo; Catalog &rsaquo;
3
  [% IF ( unknownbiblionumber ) %]
4
  [% IF ( unknownbiblionumber ) %]
Lines 14-20 Link Here
14
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
15
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
15
<script type="text/javascript">
16
<script type="text/javascript">
16
//<![CDATA[
17
//<![CDATA[
17
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
18
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
18
    browser.show();
19
    browser.show();
19
//]]>
20
//]]>
20
</script>
21
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Catalog &rsaquo;
3
<title>Koha &rsaquo; Catalog &rsaquo;
3
  [% IF ( unknownbiblionumber ) %]
4
  [% IF ( unknownbiblionumber ) %]
Lines 14-20 Link Here
14
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
15
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
15
<script type="text/javascript">
16
<script type="text/javascript">
16
//<![CDATA[
17
//<![CDATA[
17
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
18
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
18
    browser.show();
19
    browser.show();
19
20
20
	 $(document).ready(function() {
21
	 $(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 192-198 function verify_images() { Link Here
192
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
192
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
193
<script type="text/javascript">
193
<script type="text/javascript">
194
//<![CDATA[
194
//<![CDATA[
195
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
195
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
196
    browser.show();
196
    browser.show();
197
197
198
    function activate_filters(id) {
198
    function activate_filters(id) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
3
3
<title>Koha &rsaquo; Catalog &rsaquo;
4
<title>Koha &rsaquo; Catalog &rsaquo;
Lines 17-23 Link Here
17
    <script type="text/javascript" src="[% interface %]/js/browser.js"></script>
18
    <script type="text/javascript" src="[% interface %]/js/browser.js"></script>
18
	<script type="text/javascript">
19
	<script type="text/javascript">
19
	//<![CDATA[
20
	//<![CDATA[
20
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
21
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
21
        browser.show();
22
        browser.show();
22
		function Changefwk(FwkList)
23
		function Changefwk(FwkList)
23
		{
24
		{
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
3
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 9-15 Link Here
9
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
10
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
10
<script type="text/javascript">
11
<script type="text/javascript">
11
//<![CDATA[
12
//<![CDATA[
12
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
13
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
13
    browser.show();
14
    browser.show();
14
//]]>
15
//]]>
15
</script>
16
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 / +1 lines)
Lines 139-145 $('#sort_by').change(function() { Link Here
139
                [%- result.biblionumber %],
139
                [%- result.biblionumber %],
140
            [%- END -%]
140
            [%- END -%]
141
        ];
141
        ];
142
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
142
        var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
143
        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]',
143
        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]',
144
               newresults, '[% total %]');
144
               newresults, '[% total %]');
145
    [% END %]
145
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +1 lines)
Lines 11-17 Link Here
11
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
11
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
12
<script type="text/javascript">
12
<script type="text/javascript">
13
//<![CDATA[
13
//<![CDATA[
14
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
14
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
15
    browser.show();
15
    browser.show();
16
16
17
    $(window).load(function(){
17
    $(window).load(function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-2 / +2 lines)
Lines 1-3 Link Here
1
[% Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Cataloging &rsaquo; [% title |html %] [% IF ( author ) %] by [% author %][% END %] (Record #[% biblionumber %]) &rsaquo; Items</title>
3
<title>Koha &rsaquo; Cataloging &rsaquo; [% title |html %] [% IF ( author ) %] by [% author %][% END %] (Record #[% biblionumber %]) &rsaquo; Items</title>
3
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
Lines 11-17 Link Here
11
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
12
<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
12
<script type="text/javascript">
13
<script type="text/javascript">
13
//<![CDATA[
14
//<![CDATA[
14
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
15
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10), '[% Koha.Preference("MaxSearchCookies") %]' );
15
    browser.show();
16
    browser.show();
16
17
17
$(document).ready(function(){
18
$(document).ready(function(){
18
- 

Return to bug 13265