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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt (-94 / +97 lines)
Lines 2-8 Link Here
2
[% USE ItemTypes %]
2
[% USE ItemTypes %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Article requests</title>
7
<title>Koha &rsaquo; Circulation &rsaquo; Article requests</title>
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
Lines 13-111 Link Here
13
    [% INCLUDE 'header.inc' %]
13
    [% INCLUDE 'header.inc' %]
14
    [% INCLUDE 'cat-search.inc' %]
14
    [% INCLUDE 'cat-search.inc' %]
15
15
16
    <script type="text/javascript">//<![CDATA[
17
        $(document).ready(function() {
18
            $('#article-request-tabs').tabs();
19
20
            [% IF article_requests_pending.count %]
21
                $(".ar-pending-none").hide();
22
            [% END %]
23
24
            [% IF article_requests_processing.count %]
25
                $(".ar-processing-none").hide();
26
            [% END %]
27
        });
28
29
        function PrintSlip(link) {
30
            window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
31
        }
32
33
        function Cancel( id, a ) {
34
            notes = prompt(_("Reason for cancellation:"));
35
            if ( notes == null ) {
36
                return;
37
            }
38
39
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
40
            a.closest('div').hide();
41
            $.ajax({
42
                type: "POST",
43
                url: '/cgi-bin/koha/svc/article_request',
44
                data: {
45
                    action: 'cancel',
46
                    id: id,
47
                    notes: notes
48
                },
49
                success: function( data ) {
50
                    a.closest('tr').remove();
51
                    UpdateTabCounts()
52
                },
53
                dataType: 'json'
54
            });
55
        }
56
57
        function Process( id, a ) {
58
            var table_row = a.closest('tr').clone();
59
            table_row.find('.ar-process-request').remove();
60
61
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
62
            a.closest('div').hide();
63
            $.ajax({
64
                type: "POST",
65
                url: '/cgi-bin/koha/svc/article_request',
66
                data: {
67
                    action: 'process',
68
                    id: id,
69
                },
70
                success: function( data ) {
71
                    a.closest('tr').remove();
72
                    $("#article-requests-processing-table").append( table_row );
73
                    $("#article-requests-processing-table .ar-processing-none").hide();
74
                    UpdateTabCounts()
75
                },
76
                dataType: 'json'
77
            });
78
        }
79
80
        function Complete( id, a ) {
81
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
82
            a.closest('div').hide();
83
            $.ajax({
84
                type: "POST",
85
                url: '/cgi-bin/koha/svc/article_request',
86
                data: {
87
                    action: 'complete',
88
                    id: id,
89
                },
90
                success: function( data ) {
91
                    a.closest('tr').remove();
92
                    UpdateTabCounts()
93
                },
94
                dataType: 'json'
95
            });
96
        }
97
98
        function UpdateTabCounts() {
99
            var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length;
100
            $("#ar_pending_count").html( pending_count );
101
            if ( pending_count == 0 ) $(".ar-pending-none").show();
102
103
            var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length;
104
            $("#ar_processing_count").html( processing_count );
105
            if ( processing_count == 0 ) $(".ar-processing-none").show();
106
        }
107
    //]]></script>
108
109
    <div id="breadcrumbs">
16
    <div id="breadcrumbs">
110
        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
17
        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
111
        &rsaquo;
18
        &rsaquo;
Lines 406-409 Link Here
406
            </div>
313
            </div>
407
        </div>
314
        </div>
408
    </div>
315
    </div>
316
317
[% MACRO jsinclude BLOCK %]
318
    <script type="text/javascript">
319
        $(document).ready(function() {
320
            $('#article-request-tabs').tabs();
321
322
            [% IF article_requests_pending.count %]
323
                $(".ar-pending-none").hide();
324
            [% END %]
325
326
            [% IF article_requests_processing.count %]
327
                $(".ar-processing-none").hide();
328
            [% END %]
329
        });
330
331
        function PrintSlip(link) {
332
            window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
333
        }
334
335
        function Cancel( id, a ) {
336
            notes = prompt(_("Reason for cancellation:"));
337
            if ( notes == null ) {
338
                return;
339
            }
340
341
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
342
            a.closest('div').hide();
343
            $.ajax({
344
                type: "POST",
345
                url: '/cgi-bin/koha/svc/article_request',
346
                data: {
347
                    action: 'cancel',
348
                    id: id,
349
                    notes: notes
350
                },
351
                success: function( data ) {
352
                    a.closest('tr').remove();
353
                    UpdateTabCounts()
354
                },
355
                dataType: 'json'
356
            });
357
        }
358
359
        function Process( id, a ) {
360
            var table_row = a.closest('tr').clone();
361
            table_row.find('.ar-process-request').remove();
362
363
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
364
            a.closest('div').hide();
365
            $.ajax({
366
                type: "POST",
367
                url: '/cgi-bin/koha/svc/article_request',
368
                data: {
369
                    action: 'process',
370
                    id: id,
371
                },
372
                success: function( data ) {
373
                    a.closest('tr').remove();
374
                    $("#article-requests-processing-table").append( table_row );
375
                    $("#article-requests-processing-table .ar-processing-none").hide();
376
                    UpdateTabCounts()
377
                },
378
                dataType: 'json'
379
            });
380
        }
381
382
        function Complete( id, a ) {
383
            a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
384
            a.closest('div').hide();
385
            $.ajax({
386
                type: "POST",
387
                url: '/cgi-bin/koha/svc/article_request',
388
                data: {
389
                    action: 'complete',
390
                    id: id,
391
                },
392
                success: function( data ) {
393
                    a.closest('tr').remove();
394
                    UpdateTabCounts()
395
                },
396
                dataType: 'json'
397
            });
398
        }
399
400
        function UpdateTabCounts() {
401
            var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length;
402
            $("#ar_pending_count").html( pending_count );
403
            if ( pending_count == 0 ) $(".ar-pending-none").show();
404
405
            var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length;
406
            $("#ar_processing_count").html( processing_count );
407
            if ( processing_count == 0 ) $(".ar-processing-none").show();
408
        }
409
    </script>
410
[% END %]
411
409
[% INCLUDE 'intranet-bottom.inc' %]
412
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt (-5 / +11 lines)
Lines 1-14 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Circulation &rsaquo; Circulation statistics for [% title |html %]</title>
5
<title>Koha &rsaquo; Circulation &rsaquo; Circulation statistics for [% title |html %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
<script type="text/javascript">
7
$(document).ready(function(){
8
    $("tr.mybranch td").css("background-color", "#CFE7FF");
9
});
10
</script>
11
</head>
7
</head>
8
12
<body id="circ_bookcount" class="circ">
9
<body id="circ_bookcount" class="circ">
13
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'circ-search.inc' %]
11
[% INCLUDE 'circ-search.inc' %]
Lines 63-66 $(document).ready(function(){ Link Here
63
[% INCLUDE 'biblio-view-menu.inc' %]
60
[% INCLUDE 'biblio-view-menu.inc' %]
64
</div>
61
</div>
65
</div>
62
</div>
63
64
[% MACRO jsinclude BLOCK %]
65
    <script type="text/javascript">
66
        $(document).ready(function(){
67
        $("tr.mybranch td").css("background-color", "#CFE7FF");
68
    });
69
    </script>
70
[% END %]
71
66
[% INCLUDE 'intranet-bottom.inc' %]
72
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-22 / +26 lines)
Lines 2-7 Link Here
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
[% USE Price %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% SET destination = "circ" %]
7
[% SET destination = "circ" %]
7
<title>Koha &rsaquo; Circulation
8
<title>Koha &rsaquo; Circulation
Lines 10-39 Link Here
10
[% END %]
11
[% END %]
11
</title>
12
</title>
12
[% INCLUDE 'doc-head-close.inc' %]
13
[% INCLUDE 'doc-head-close.inc' %]
13
[% INCLUDE 'calendar.inc' %]
14
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
14
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
15
[% INCLUDE 'datatables.inc' %]
16
<script type="text/javascript">
17
//<![CDATA[
18
$(document).ready(function() {
19
        if($('#barcodelist').length) {
20
            $('#barcodelist').focus();
21
        } else if ($('#checkoutrenew').length) {
22
            $('#checkoutrenew').focus();
23
        }
24
        $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, {
25
            "sDom": 't',
26
            "aaSorting": [],
27
            "aoColumnDefs": [
28
                { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
29
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
30
            ],
31
            "bPaginate": false
32
        }));
33
 });
34
//]]>
35
</script>
36
</head>
15
</head>
16
37
<body id="circ_circulation_batch_checkouts" class="circ">
17
<body id="circ_circulation_batch_checkouts" class="circ">
38
18
39
[% INCLUDE 'header.inc' %]
19
[% INCLUDE 'header.inc' %]
Lines 307-310 $(document).ready(function() { Link Here
307
    </div>
287
    </div>
308
[% END %]
288
[% END %]
309
</div>
289
</div>
290
291
[% MACRO jsinclude BLOCK %]
292
    [% INCLUDE 'calendar.inc' %]
293
    [% INCLUDE 'datatables.inc' %]
294
    <script type="text/javascript">
295
        $(document).ready(function() {
296
            if($('#barcodelist').length) {
297
                $('#barcodelist').focus();
298
            } else if ($('#checkoutrenew').length) {
299
                $('#checkoutrenew').focus();
300
            }
301
            $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, {
302
                "sDom": 't',
303
                "aaSorting": [],
304
                "aoColumnDefs": [
305
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
306
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
307
                ],
308
                "bPaginate": false
309
            }));
310
        });
311
    </script>
312
[% END %]
313
310
[% INCLUDE 'intranet-bottom.inc' %]
314
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt (-25 / +27 lines)
Lines 2-37 Link Here
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Circulation &rsaquo; Pending on-site checkouts</title>
7
<title>Koha &rsaquo; Circulation &rsaquo; Pending on-site checkouts</title>
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
8
<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" />
9
<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" />
9
[% INCLUDE 'datatables.inc' %]
10
<script type="text/javascript">
11
//<![CDATA[
12
13
$(document).ready(function(){
14
  if ( $("#pending_onsite_checkout").length ) {
15
    $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, {
16
        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
17
        "aoColumns": [
18
            { "sType": "title-string" },
19
            { "sType": "html" },
20
            { "sType": "html" },
21
            null,
22
            { "sType": "html" },
23
            null,
24
            null,
25
        ],
26
        'bAutoWidth': false,
27
        "sPaginationType": "four_button"
28
    }));
29
  }
30
});
31
//]]>
32
</script>
33
34
</head>
10
</head>
11
35
<body id="circ_stats" class="circ">
12
<body id="circ_stats" class="circ">
36
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
37
[% INCLUDE 'circ-search.inc' %]
14
[% INCLUDE 'circ-search.inc' %]
Lines 83-86 $(document).ready(function(){ Link Here
83
      [% IF Koha.Preference('CircSidebar') %][% INCLUDE 'circ-nav.inc' %][% END %]
60
      [% IF Koha.Preference('CircSidebar') %][% INCLUDE 'circ-nav.inc' %][% END %]
84
    </div>
61
    </div>
85
  </div>
62
  </div>
63
64
[% MACRO jsinclude BLOCK %]
65
    [% INCLUDE 'datatables.inc' %]
66
    <script type="text/javascript">
67
        $(document).ready(function(){
68
            if ( $("#pending_onsite_checkout").length ) {
69
                $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, {
70
                    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
71
                    "aoColumns": [
72
                        { "sType": "title-string" },
73
                        { "sType": "html" },
74
                        { "sType": "html" },
75
                        null,
76
                        { "sType": "html" },
77
                        null,
78
                        null,
79
                    ],
80
                    'bAutoWidth': false,
81
                    "sPaginationType": "four_button"
82
                }));
83
            }
84
        });
85
    </script>
86
[% END %]
87
86
[% INCLUDE 'intranet-bottom.inc' %]
88
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-70 / +70 lines)
Lines 1-82 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[%- USE Branches -%]
3
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
5
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[%- USE Branches -%]
9
<script type="text/javascript">
10
 //<![CDATA[
11
     function clone_parent(node) {
12
        var parent = node.parentNode;
13
        var clone = parent.cloneNode(true);
14
        parent.parentNode.insertBefore(clone, parent.nextSibling);
15
        $("a", clone).attr("style", "visibility: visible");
16
        $("input", clone).attr("value", "");
17
18
19
        var theid = $("span", clone).attr("id") || "";
20
        var theid = $("span", clone).attr("id") || "";
21
        var parts = theid.match(/^pattrodue-getready-(.*)$/);
22
        if (parts && parts.length > 1)
23
        {
24
            var appendid = "-" + Math.floor(Math.random()*1000+1);
25
            $("span", clone).attr("id",theid+appendid);
26
27
            theid = $("input", clone).attr("id");
28
            $("input", clone).attr("id",theid+appendid);
29
30
            theid = $("div[id]", clone).attr("id");
31
            $("div[id]", clone).attr("id",theid+appendid);
32
33
            var attrcode = $("script", clone).attr("x-code");
34
            var newsuffix = parts[1] + appendid;
35
            create_auto_completion_responder(newsuffix,attrcode);
36
        }
37
38
    }
39
40
41
    function delete_parent(node) {
42
        var parent = node.parentNode;
43
        parent.parentNode.removeChild(parent);
44
    }
45
46
    function create_auto_completion_responder(uniqueid,attrcode) {
47
       $("#pattrodue-getready-" + uniqueid).ready(function(){
48
            $( "#pattrodue-input-" + uniqueid ).autocomplete({
49
                source: "/cgi-bin/koha/circ/ypattrodue-attr-search-authvalue.pl/"+attrcode,
50
                select: function( event, ui ) {
51
                    $( "#pattrodue-input-"+uniqueid ).val( ui.item.description );
52
                    return false;
53
                }
54
            })
55
            .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
56
                return $( "<li></li>" )
57
                .data( "ui-autocomplete-item", item )
58
                .append( "<a>" + item.description + " (" + item.authorised_value + ")</a>" )
59
                .appendTo( ul )
60
                .css("font-size","90%").css("width","13em");
61
            };
62
        });
63
    }
64
65
    $(document).ready(function(){
66
        $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, {
67
            "sPaginationType": "four_button",
68
            "aaSorting": [[0, 'asc']],
69
            "aoColumnDefs": [
70
                { "sType": "title-string", "aTargets": [ "title-string" ] }
71
            ]
72
        }));
73
    });
74
//]]>
75
</script>
76
<style type="text/css">
8
<style type="text/css">
77
    .sql {display:none;}
9
    .sql {display:none;}
78
</style>
10
</style>
79
</head>
11
</head>
12
80
<body id="circ_overdue" class="circ">
13
<body id="circ_overdue" class="circ">
81
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
82
[% INCLUDE 'circ-search.inc' %]
15
[% INCLUDE 'circ-search.inc' %]
Lines 262-265 Link Here
262
</div>
195
</div>
263
</div>
196
</div>
264
197
198
[% MACRO jsinclude BLOCK %]
199
    [% INCLUDE 'calendar.inc' %]
200
    [% INCLUDE 'datatables.inc' %]
201
    <script type="text/javascript">
202
        function clone_parent(node) {
203
            var parent = node.parentNode;
204
            var clone = parent.cloneNode(true);
205
            parent.parentNode.insertBefore(clone, parent.nextSibling);
206
            $("a", clone).attr("style", "visibility: visible");
207
            $("input", clone).attr("value", "");
208
209
            var theid = $("span", clone).attr("id") || "";
210
            var theid = $("span", clone).attr("id") || "";
211
            var parts = theid.match(/^pattrodue-getready-(.*)$/);
212
            if (parts && parts.length > 1){
213
                var appendid = "-" + Math.floor(Math.random()*1000+1);
214
                $("span", clone).attr("id",theid+appendid);
215
216
                theid = $("input", clone).attr("id");
217
                $("input", clone).attr("id",theid+appendid);
218
219
                theid = $("div[id]", clone).attr("id");
220
                $("div[id]", clone).attr("id",theid+appendid);
221
222
                var attrcode = $("script", clone).attr("x-code");
223
                var newsuffix = parts[1] + appendid;
224
                create_auto_completion_responder(newsuffix,attrcode);
225
            }
226
        }
227
228
229
        function delete_parent(node) {
230
            var parent = node.parentNode;
231
            parent.parentNode.removeChild(parent);
232
        }
233
234
        function create_auto_completion_responder(uniqueid,attrcode) {
235
            $("#pattrodue-getready-" + uniqueid).ready(function(){
236
                $( "#pattrodue-input-" + uniqueid ).autocomplete({
237
                    source: "/cgi-bin/koha/circ/ypattrodue-attr-search-authvalue.pl/"+attrcode,
238
                    select: function( event, ui ) {
239
                        $( "#pattrodue-input-"+uniqueid ).val( ui.item.description );
240
                        return false;
241
                    }
242
                })
243
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
244
                    return $( "<li></li>" )
245
                    .data( "ui-autocomplete-item", item )
246
                    .append( "<a>" + item.description + " (" + item.authorised_value + ")</a>" )
247
                    .appendTo( ul )
248
                    .css("font-size","90%").css("width","13em");
249
                };
250
            });
251
        }
252
253
        $(document).ready(function(){
254
            $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, {
255
                "sPaginationType": "four_button",
256
                "aaSorting": [[0, 'asc']],
257
                "aoColumnDefs": [
258
                    { "sType": "title-string", "aTargets": [ "title-string" ] }
259
                ]
260
            }));
261
        });
262
  </script>
263
[% END %]
264
265
[% INCLUDE 'intranet-bottom.inc' %]
265
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-64 / +67 lines)
Lines 3-77 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[%- USE Branches -%]
4
[%- USE Branches -%]
5
[%- USE ItemTypes -%]
5
[%- USE ItemTypes -%]
6
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
8
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'calendar.inc' %]
10
<!-- Plugin datatables -->
11
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
10
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12
[% INCLUDE 'datatables.inc' %]
13
[% INCLUDE 'columns_settings.inc' %]
14
<script type="text/JavaScript">
15
//<![CDATA[
16
$(document).ready(function() {
17
  var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %];
18
  var holdst = KohaTable("#holdst", {
19
    "aoColumnDefs": [
20
        { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
21
        { "sType": "title-string", "aTargets" : [ "title-string" ] },
22
        { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
23
    ],
24
    "sPaginationType": "full_numbers"
25
  }, columns_settings);
26
  holdst.fnAddFilters("filter");
27
  [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
28
  function separateData ( ColumnData ){
29
    var cD = ColumnData;
30
    var new_array = new Array();
31
    for ( j=0 ; j<cD.length ; j++ ) {
32
        var split_array = cD[j].split(/<br>/gi);
33
        for ( k=0 ; k<split_array.length ; k++ ){
34
            var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
35
            if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
36
                new_array.push(str);
37
            }
38
        }
39
    }
40
    new_array.sort();
41
    return new_array;
42
  }
43
  [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
44
  function createSelect( data ) {
45
      data = separateData(data);
46
      var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
47
      for ( i=0 ; i<len ; i++ ) {
48
          r += '<option value="'+data[i]+'">'+data[i]+'</option>';
49
      }
50
      return r+'</select>';
51
  }
52
  $("#homebranchfilter").each( function () {
53
      $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
54
      $('select', this).change( function () {
55
          var filter_value = $(this).val();
56
          holdst.fnFilter( filter_value, 5, true );
57
      } );
58
  } );
59
  $("#itypefilter").each( function () {
60
      $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
61
      $('select', this).change( function () {
62
          holdst.fnFilter( $(this).val(), 9 );
63
      } );
64
  } );
65
  $("#locationfilter").each( function () {
66
      $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
67
      $('select', this).change( function () {
68
          holdst.fnFilter( $(this).val(), 10 );
69
      } );
70
  } );
71
});
72
//]]>
73
</script>
74
</head>
11
</head>
12
75
<body id="circ_pendingreserves" class="circ">
13
<body id="circ_pendingreserves" class="circ">
76
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
77
[% INCLUDE 'circ-search.inc' %]
15
[% INCLUDE 'circ-search.inc' %]
Lines 209-212 $(document).ready(function() { Link Here
209
</div>
147
</div>
210
</div>
148
</div>
211
</div>
149
</div>
150
151
[% MACRO jsinclude BLOCK %]
152
    [% INCLUDE 'calendar.inc' %]
153
    [% INCLUDE 'datatables.inc' %]
154
    [% INCLUDE 'columns_settings.inc' %]
155
    <script type="text/javascript">
156
        $(document).ready(function() {
157
          var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %];
158
          var holdst = KohaTable("#holdst", {
159
            "aoColumnDefs": [
160
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
161
                { "sType": "title-string", "aTargets" : [ "title-string" ] },
162
                { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
163
            ],
164
            "sPaginationType": "full_numbers"
165
          }, columns_settings);
166
          holdst.fnAddFilters("filter");
167
          [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
168
          function separateData ( ColumnData ){
169
            var cD = ColumnData;
170
            var new_array = new Array();
171
            for ( j=0 ; j<cD.length ; j++ ) {
172
                var split_array = cD[j].split(/<br>/gi);
173
                for ( k=0 ; k<split_array.length ; k++ ){
174
                    var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
175
                    if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
176
                        new_array.push(str);
177
                    }
178
                }
179
            }
180
            new_array.sort();
181
            return new_array;
182
          }
183
          [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
184
          function createSelect( data ) {
185
              data = separateData(data);
186
              var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
187
              for ( i=0 ; i<len ; i++ ) {
188
                  r += '<option value="'+data[i]+'">'+data[i]+'</option>';
189
              }
190
              return r+'</select>';
191
          }
192
          $("#homebranchfilter").each( function () {
193
              $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
194
              $('select', this).change( function () {
195
                  var filter_value = $(this).val();
196
                  holdst.fnFilter( filter_value, 5, true );
197
              });
198
          });
199
          $("#itypefilter").each( function () {
200
              $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
201
              $('select', this).change( function () {
202
                  holdst.fnFilter( $(this).val(), 9 );
203
              });
204
          });
205
          $("#locationfilter").each( function () {
206
              $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
207
              $('select', this).change( function () {
208
                  holdst.fnFilter( $(this).val(), 10 );
209
              });
210
          });
211
        });
212
    </script>
213
[% END %]
214
212
[% INCLUDE 'intranet-bottom.inc' %]
215
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-13 / +11 lines)
Lines 1-22 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
3
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
5
6
<title>Koha &rsaquo; Circulation &rsaquo; Renew [% title |html %]</title>
6
<title>Koha &rsaquo; Circulation &rsaquo; Renew [% title |html %]</title>
7
8
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
9
10
[% IF error %]
11
    <script type="text/javascript">
12
    //<![CDATA[
13
        $( document ).ready(function() {
14
            removeFocus()
15
        });
16
    //]]>
17
    </script>
18
[% END %]
19
20
</head>
8
</head>
21
9
22
<body id="circ_renew" class="circ">
10
<body id="circ_renew" class="circ">
Lines 174-177 Link Here
174
[% END %]
162
[% END %]
175
<div>
163
<div>
176
164
165
[% MACRO jsinclude BLOCK %]
166
    [% IF error %]
167
        <script type="text/javascript">
168
            $( document ).ready(function() {
169
                removeFocus();
170
            });
171
        </script>
172
    [% END %]
173
[% END %]
174
177
[% INCLUDE 'intranet-bottom.inc' %]
175
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt (-84 / +87 lines)
Lines 1-96 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE ItemTypes %]
3
[% USE ItemTypes %]
4
[% SET footerjs = 1 %]
4
[% SET article_requests_view = 1 %]
5
[% SET article_requests_view = 1 %]
5
[% SET biblionumber = biblio.biblionumber %]
6
[% SET biblionumber = biblio.biblionumber %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Request article</title>
8
<title>Koha &rsaquo; Circulation &rsaquo; Request article</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
9
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10
[% INCLUDE 'datatables.inc' %]
11
12
<script type="text/javascript">
13
// <![CDATA[
14
$('#current-article-requests').ready(function() {
15
    $(".hide").hide();
16
});
17
18
$(document).ready(function() {
19
    $( "#patron" ).autocomplete({
20
        source: "/cgi-bin/koha/circ/ysearch.pl",
21
        minLength: 3,
22
        select: function( event, ui ) {
23
            $( "#patron" ).val( ui.item.cardnumber );
24
            $( "#holds_patronsearch" ).submit();
25
            return false;
26
        }
27
    })
28
    .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
29
        return $( "<li></li>" )
30
        .data( "ui-autocomplete-item", item )
31
        .append( "<a>" + item.surname + ", " + item.firstname +
32
                 " (" + item.cardnumber + ") <small>" + item.address +
33
                 " " + item.city + " " + item.zipcode + " " +
34
                 item.country + "</small></a>" )
35
        .appendTo( ul );
36
    };
37
38
    $( ".ar-update-branchcode" ).on('focus', function(){
39
        previous_branchcode = this.value;
40
    }).on('change', function(){
41
        var branchcode = this.value;
42
        var c = confirm(_("Are you sure you want to change the pickup library from %s to %s for this request?").format( previous_branchcode, branchcode ));
43
44
        if ( c ) {
45
            var id = this.id.split("branchcode-")[1];
46
            $("#update-processing-" + id ).css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 200);
47
48
            $.ajax({
49
                type: "POST",
50
                url: '/cgi-bin/koha/svc/article_request',
51
                data: {
52
                    action: 'update_branchcode',
53
                    id: id,
54
                    branchcode: branchcode,
55
                },
56
                success: function( data ) {
57
                    $("#update-processing-" + id ).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);
58
                },
59
                dataType: 'json'
60
            });
61
62
        } else {
63
            this.value = previous_branchcode;
64
        }
65
    });
66
67
    $(".ar-cancel-request").on("click", function(){
68
        var a = $(this);
69
        var notes = prompt(_("Reason for cancellation:"));
70
71
        if ( notes != null ) {
72
            var id = this.id.split("cancel-")[1];
73
            $("#cancel-processing-" + id ).hide('slow');
74
            $("#cancel-processing-spinner-" + id ).show('slow');
75
76
            $.ajax({
77
                type: "POST",
78
                url: '/cgi-bin/koha/svc/article_request',
79
                data: {
80
                    action: 'cancel',
81
                    id: id,
82
                    notes: notes
83
                },
84
                success: function( data ) {
85
                    a.parents('tr').hide('slow');
86
                },
87
                dataType: 'json'
88
            });
89
        }
90
    });
91
});
92
// ]]>
93
</script>
94
</head>
11
</head>
95
12
96
<body id="circ_request-article" class="circ">
13
<body id="circ_request-article" class="circ">
Lines 377-380 $(document).ready(function() { Link Here
377
            </div>
294
            </div>
378
        </div>
295
        </div>
379
    </div>
296
    </div>
297
298
[% MACRO jsinclude BLOCK %]
299
    [% INCLUDE 'datatables.inc' %]
300
301
    <script type="text/javascript">
302
        $('#current-article-requests').ready(function() {
303
            $(".hide").hide();
304
        });
305
306
        $(document).ready(function() {
307
            $( "#patron" ).autocomplete({
308
                source: "/cgi-bin/koha/circ/ysearch.pl",
309
                minLength: 3,
310
                select: function( event, ui ) {
311
                    $( "#patron" ).val( ui.item.cardnumber );
312
                    $( "#holds_patronsearch" ).submit();
313
                    return false;
314
                }
315
            })
316
            .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
317
                return $( "<li></li>" )
318
                .data( "ui-autocomplete-item", item )
319
                .append( "<a>" + item.surname + ", " + item.firstname +
320
                         " (" + item.cardnumber + ") <small>" + item.address +
321
                         " " + item.city + " " + item.zipcode + " " +
322
                         item.country + "</small></a>" )
323
                .appendTo( ul );
324
            };
325
326
            $( ".ar-update-branchcode" ).on('focus', function(){
327
                previous_branchcode = this.value;
328
            }).on('change', function(){
329
                var branchcode = this.value;
330
                var c = confirm(_("Are you sure you want to change the pickup library from %s to %s for this request?").format( previous_branchcode, branchcode ));
331
332
                if ( c ) {
333
                    var id = this.id.split("branchcode-")[1];
334
                    $("#update-processing-" + id ).css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 200);
335
336
                    $.ajax({
337
                        type: "POST",
338
                        url: '/cgi-bin/koha/svc/article_request',
339
                        data: {
340
                            action: 'update_branchcode',
341
                            id: id,
342
                            branchcode: branchcode,
343
                        },
344
                        success: function( data ) {
345
                            $("#update-processing-" + id ).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);
346
                        },
347
                        dataType: 'json'
348
                    });
349
350
                } else {
351
                    this.value = previous_branchcode;
352
                }
353
            });
354
355
            $(".ar-cancel-request").on("click", function(){
356
                var a = $(this);
357
                var notes = prompt(_("Reason for cancellation:"));
358
359
                if ( notes != null ) {
360
                    var id = this.id.split("cancel-")[1];
361
                    $("#cancel-processing-" + id ).hide('slow');
362
                    $("#cancel-processing-spinner-" + id ).show('slow');
363
364
                    $.ajax({
365
                        type: "POST",
366
                        url: '/cgi-bin/koha/svc/article_request',
367
                        data: {
368
                            action: 'cancel',
369
                            id: id,
370
                            notes: notes
371
                        },
372
                        success: function( data ) {
373
                            a.parents('tr').hide('slow');
374
                        },
375
                        dataType: 'json'
376
                    });
377
                }
378
            });
379
        });
380
    </script>
381
[% END %]
382
380
[% INCLUDE 'intranet-bottom.inc' %]
383
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-23 / +27 lines)
Lines 2-34 Link Here
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE ItemTypes %]
4
[% USE ItemTypes %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
7
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'calendar.inc' %]
9
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
10
[% INCLUDE 'datatables.inc' %]
11
<script type="text/javascript">
12
//<![CDATA[
13
     $(document).ready(function() {
14
        $(".ratiolimit").click(function () {
15
            $("#ratio").val($(this).html());
16
        });
17
        $(".ratiolimit").hover(
18
            function () { $(this).toggleClass("ulined") },
19
            function () { $(this).toggleClass("ulined") }
20
        );
21
        $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
22
            "aaSorting": [ [2,'desc'], [3,'asc'] ],
23
            "aoColumnDefs": [
24
                { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
25
                { "aTargets": [ 3 ], "sType": "anti-the" },
26
            ],
27
            "sPaginationType": "four_button"
28
        }));
29
     });
30
//]]>
31
</script>
32
<style type="text/css">
10
<style type="text/css">
33
    .sql { display: none; }
11
    .sql { display: none; }
34
    .ulined { text-decoration: underline; }
12
    .ulined { text-decoration: underline; }
Lines 36-41 Link Here
36
    #holdst ul li {  list-style: outside url("[% interface %]/[% theme %]/img/item-bullet.gif") disc; }
14
    #holdst ul li {  list-style: outside url("[% interface %]/[% theme %]/img/item-bullet.gif") disc; }
37
</style>
15
</style>
38
</head>
16
</head>
17
39
<body id="circ_reserveratios" class="circ">
18
<body id="circ_reserveratios" class="circ">
40
[% INCLUDE 'header.inc' %]
19
[% INCLUDE 'header.inc' %]
41
[% INCLUDE 'circ-search.inc' %]
20
[% INCLUDE 'circ-search.inc' %]
Lines 163-166 Link Here
163
142
164
</div>
143
</div>
165
</div>
144
</div>
145
146
[% MACRO jsinclude BLOCK %]
147
  [% INCLUDE 'calendar.inc' %]
148
  [% INCLUDE 'datatables.inc' %]
149
  <script type="text/javascript">
150
       $(document).ready(function() {
151
          $(".ratiolimit").click(function () {
152
              $("#ratio").val($(this).html());
153
          });
154
          $(".ratiolimit").hover(
155
              function () { $(this).toggleClass("ulined") },
156
              function () { $(this).toggleClass("ulined") }
157
          );
158
          $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
159
              "aaSorting": [ [2,'desc'], [3,'asc'] ],
160
              "aoColumnDefs": [
161
                  { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
162
                  { "aTargets": [ 3 ], "sType": "anti-the" },
163
              ],
164
              "sPaginationType": "four_button"
165
          }));
166
       });
167
  </script>
168
[% END %]
169
166
[% INCLUDE 'intranet-bottom.inc' %]
170
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-123 / +129 lines)
Lines 5-11 Link Here
5
[% USE ItemTypes %]
5
[% USE ItemTypes %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[% USE ColumnsSettings %]
7
[% USE ColumnsSettings %]
8
8
[% SET footerjs = 1 %]
9
[% BLOCK display_bormessagepref %]
9
[% BLOCK display_bormessagepref %]
10
    [% IF ( bormessagepref ) %]
10
    [% IF ( bormessagepref ) %]
11
        <li>Patron notification:
11
        <li>Patron notification:
Lines 33-161 Link Here
33
<title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
33
<title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
34
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
34
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
35
[% INCLUDE 'doc-head-close.inc' %]
35
[% INCLUDE 'doc-head-close.inc' %]
36
[% INCLUDE 'datatables.inc' %]
37
[% INCLUDE 'columns_settings.inc' %]
38
[% INCLUDE 'calendar.inc' %]
39
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
40
[% INCLUDE 'timepicker.inc' %]
41
42
<script type="text/javascript">
43
//<![CDATA[
44
function Dopop(link) {
45
    var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
46
    $("#barcode").focus();
47
}
48
$(document).ready(function () {
49
    $(".modal").modal({ backdrop: 'static' }).on('shown', function() {
50
        $("#barcode").prop("disabled", true);
51
    }).on('hidden', function() {
52
        $("#barcode").prop("disabled", false).focus();
53
    });
54
55
    $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
56
57
    [% IF print_slip %]
58
        Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
59
    [% END %]
60
61
    var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
62
    var returns_table = KohaTable("#checkedintable", {
63
            "bFilter":false,
64
            "bPaginate":false,
65
            "bInfo":false,
66
            "bSort":false,
67
            "dom": 'B<"clearfix">t',
68
            }, columns_settings);
69
70
    $("#return_date_override").datetimepicker({
71
        onClose: function(dateText, inst) {
72
            if (validate_date(dateText, inst) ) {
73
                $("#barcode").focus();
74
            }
75
        },
76
        defaultDate: -1,
77
        hour: 23,
78
        minute: 59,
79
        maxDate: 0
80
    }).on("change", function(e, value) {
81
        if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
82
    });
83
    $("#return_date_override").on("blur", function() {
84
            check_valid_return_date();
85
    });
86
    $("#checkin-form").submit(function( event ) {
87
        if ( !check_valid_return_date() ) {
88
            event.preventDefault();
89
        }
90
    });
91
92
    function check_valid_return_date() {
93
        if ( $("#return_date_override").val() ) {
94
            var datetime = DateTime_from_syspref( $("#return_date_override").val() );
95
            var now = new Date();
96
            if ( !datetime || datetime > now ) {
97
                alert("Invalid return date/time!");
98
                $("#return_date_override").val("")
99
                return false;
100
            }
101
        }
102
        return true;
103
    }
104
105
    $("#exemptcheck").change(function () {
106
        if (this.checked == true) {
107
            $("#barcode").addClass("alert");
108
            $("#exemptfines").show();
109
        } else {
110
            $("#barcode").removeClass("alert");
111
            $("#exemptfines").hide();
112
        }
113
        $("#barcode").focus();
114
    });
115
    $("#dropboxcheck").change(function () {
116
        if (this.checked == true) {
117
            $("#barcode").addClass("alert");
118
            $("#dropboxmode").show();
119
120
            $("#return_date_override_fields :input").prop('disabled', true);
121
            $("#return_date_override").datetimepicker("disable");
122
        } else {
123
            $("#barcode").removeClass("alert");
124
            $("#dropboxmode").hide();
125
126
            $("#return_date_override_fields :input").prop('disabled', false);
127
            $("#return_date_override").datetimepicker("enable");
128
        }
129
        $("#barcode").focus();
130
    });
131
    $("#forgivemanualholdsexpire").change(function () {
132
        if (this.checked == true) {
133
            $("#barcode").addClass("alert");
134
            $("#forgivemanualholdsexpire-alert").show();
135
        } else {
136
            $("#barcode").removeClass("alert");
137
            $("#forgivemanualholdsexpire-alert").hide();
138
        }
139
        $("#barcode").focus();
140
    });
141
    [% IF(overduecharges) %] $("#barcode").focus(function () {
142
        if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
143
            $("#barcode").addClass("alert");
144
        } else {
145
            $("#barcode").removeClass("alert");
146
        }
147
    });
148
    $("#barcode").blur(function () {
149
        $("#barcode").removeClass("alert");
150
    });
151
    [% END %]
152
    $('.openWin').on("click",function(e){
153
        Dopop( $(this).data("url") );
154
    });
155
});
156
//]]>
157
</script>
158
</head>
36
</head>
37
159
<body id="circ_returns" class="circ">
38
<body id="circ_returns" class="circ">
160
<span class="audio-alert-success"></span>
39
<span class="audio-alert-success"></span>
161
40
Lines 809-812 $(document).ready(function () { Link Here
809
</div>
688
</div>
810
</div>
689
</div>
811
</div>
690
</div>
691
692
[% MACRO jsinclude BLOCK %]
693
    [% INCLUDE 'datatables.inc' %]
694
    [% INCLUDE 'columns_settings.inc' %]
695
    [% INCLUDE 'calendar.inc' %]
696
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
697
    [% INCLUDE 'timepicker.inc' %]
698
699
    <script type="text/javascript">
700
        function Dopop(link) {
701
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
702
            $("#barcode").focus();
703
        }
704
        $(document).ready(function () {
705
            $(".modal").modal({ backdrop: 'static' }).on('shown', function() {
706
                $("#barcode").prop("disabled", true);
707
            }).on('hidden', function() {
708
                $("#barcode").prop("disabled", false).focus();
709
            });
710
711
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
712
713
            [% IF print_slip %]
714
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
715
            [% END %]
716
717
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
718
            var returns_table = KohaTable("#checkedintable", {
719
                    "bFilter":false,
720
                    "bPaginate":false,
721
                    "bInfo":false,
722
                    "bSort":false,
723
                    "dom": 'B<"clearfix">t',
724
                    }, columns_settings);
725
726
            $("#return_date_override").datetimepicker({
727
                onClose: function(dateText, inst) {
728
                    if (validate_date(dateText, inst) ) {
729
                        $("#barcode").focus();
730
                    }
731
                },
732
                defaultDate: -1,
733
                hour: 23,
734
                minute: 59,
735
                maxDate: 0
736
            }).on("change", function(e, value) {
737
                if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
738
            });
739
            $("#return_date_override").on("blur", function() {
740
                check_valid_return_date();
741
            });
742
            $("#checkin-form").submit(function( event ) {
743
                if ( !check_valid_return_date() ) {
744
                    event.preventDefault();
745
                }
746
            });
747
748
            function check_valid_return_date() {
749
                if ( $("#return_date_override").val() ) {
750
                    var datetime = DateTime_from_syspref( $("#return_date_override").val() );
751
                    var now = new Date();
752
                    if ( !datetime || datetime > now ) {
753
                        alert("Invalid return date/time!");
754
                        $("#return_date_override").val("")
755
                        return false;
756
                    }
757
                }
758
                return true;
759
            }
760
761
            $("#exemptcheck").change(function () {
762
                if (this.checked == true) {
763
                    $("#barcode").addClass("alert");
764
                    $("#exemptfines").show();
765
                } else {
766
                    $("#barcode").removeClass("alert");
767
                    $("#exemptfines").hide();
768
                }
769
                $("#barcode").focus();
770
            });
771
            $("#dropboxcheck").change(function () {
772
                if (this.checked == true) {
773
                    $("#barcode").addClass("alert");
774
                    $("#dropboxmode").show();
775
776
                    $("#return_date_override_fields :input").prop('disabled', true);
777
                    $("#return_date_override").datetimepicker("disable");
778
                } else {
779
                    $("#barcode").removeClass("alert");
780
                    $("#dropboxmode").hide();
781
782
                    $("#return_date_override_fields :input").prop('disabled', false);
783
                    $("#return_date_override").datetimepicker("enable");
784
                }
785
                $("#barcode").focus();
786
            });
787
            $("#forgivemanualholdsexpire").change(function () {
788
                if (this.checked == true) {
789
                    $("#barcode").addClass("alert");
790
                    $("#forgivemanualholdsexpire-alert").show();
791
                } else {
792
                    $("#barcode").removeClass("alert");
793
                    $("#forgivemanualholdsexpire-alert").hide();
794
                }
795
                $("#barcode").focus();
796
            });
797
798
            [% IF(overduecharges) %]
799
                $("#barcode").focus(function () {
800
                    if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
801
                        $("#barcode").addClass("alert");
802
                    } else {
803
                        $("#barcode").removeClass("alert");
804
                    }
805
                });
806
                $("#barcode").blur(function () {
807
                    $("#barcode").removeClass("alert");
808
                });
809
            [% END %]
810
811
            $('.openWin').on("click",function(e){
812
                Dopop( $(this).data("url") );
813
            });
814
        });
815
    </script>
816
[% END %]
817
812
[% INCLUDE 'intranet-bottom.inc' %]
818
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt (-18 / +22 lines)
Lines 1-29 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Circulation &rsaquo; Transfers to receive</title>
6
<title>Koha &rsaquo; Circulation &rsaquo; Transfers to receive</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'datatables.inc' %]
9
<script type="text/javascript">
10
//<![CDATA[
11
$(document).ready(function() {
12
    [% FOREACH branchesloo IN branchesloop %]
13
    $("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, {
14
        "aoColumnDefs": [
15
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
16
            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
17
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
18
        ],
19
        "sDom": 't',
20
        "bPaginate": false
21
    }));
22
    [% END %]
23
});
24
//]]>
25
</script>
26
</head>
9
</head>
10
27
<body id="circ_transferstoreceive" class="circ">
11
<body id="circ_transferstoreceive" class="circ">
28
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
29
[% INCLUDE 'circ-search.inc' %]
13
[% INCLUDE 'circ-search.inc' %]
Lines 104-107 $(document).ready(function() { Link Here
104
</div>
88
</div>
105
[% END %]
89
[% END %]
106
</div>
90
</div>
91
92
[% MACRO jsinclude BLOCK %]
93
    [% INCLUDE 'datatables.inc' %]
94
    <script type="text/javascript">
95
        $(document).ready(function() {
96
            [% FOREACH branchesloo IN branchesloop %]
97
            $("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, {
98
                "aoColumnDefs": [
99
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
100
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
101
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
102
                ],
103
                "sDom": 't',
104
                "bPaginate": false
105
            }));
106
            [% END %]
107
        });
108
    </script>
109
[% END %]
110
107
[% INCLUDE 'intranet-bottom.inc' %]
111
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-33 / +38 lines)
Lines 5-49 Link Here
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE ColumnsSettings %]
6
[% USE ColumnsSettings %]
7
[% USE Koha %]
7
[% USE Koha %]
8
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
10
<title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
10
[% INCLUDE 'doc-head-close.inc' %]
11
[% INCLUDE 'doc-head-close.inc' %]
11
<style type="text/css"> p { margin-top: 0; }</style>
12
<style type="text/css"> p { margin-top: 0; }</style>
12
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
13
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
13
[% INCLUDE 'datatables.inc' %]
14
[% INCLUDE 'columns_settings.inc' %]
15
<script type="text/javascript">//<![CDATA[
16
$(document).ready(function() {
17
    var holdst;
18
19
    // Setup filters before DataTables initialisation, in case some columns are
20
    // hidden by default
21
    var filterColumnTimeoutId;
22
    var filterColumn = function(e) {
23
        clearTimeout(filterColumnTimeoutId);
24
        filterColumnTimeoutId = setTimeout(function() {
25
            var input = $(e.target);
26
            var idx = input.parents('td').index();
27
            holdst.api().column(idx + ':visible').search(input.val()).draw();
28
        }, 200);
29
    };
30
    $('#holdst thead input').on('change keyup keydown', filterColumn);
31
32
    var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %];
33
    var holdst = KohaTable("#holdst", {
34
        "aaSorting": [[ 3, "asc" ]],
35
        "aoColumns": [
36
            { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null
37
        ],
38
        "sDom": 'B<"clearfix">t',
39
        "bSortCellsTop": true,
40
        "bPaginate": false
41
    }, columns_settings);
42
43
});
44
//]]>
45
</script>
46
</head>
14
</head>
15
47
<body id="circ_view_holdsqueue" class="circ">
16
<body id="circ_view_holdsqueue" class="circ">
48
[% INCLUDE 'header.inc' %]
17
[% INCLUDE 'header.inc' %]
49
[% INCLUDE 'cat-search.inc' %]
18
[% INCLUDE 'cat-search.inc' %]
Lines 224-227 $(document).ready(function() { Link Here
224
</div>
193
</div>
225
[% END %]
194
[% END %]
226
</div>
195
</div>
196
197
[% MACRO jsinclude BLOCK %]
198
    [% INCLUDE 'datatables.inc' %]
199
    [% INCLUDE 'columns_settings.inc' %]
200
    <script type="text/javascript">
201
        $(document).ready(function() {
202
            var holdst;
203
204
            // Setup filters before DataTables initialisation, in case some columns are
205
            // hidden by default
206
            var filterColumnTimeoutId;
207
            var filterColumn = function(e) {
208
                clearTimeout(filterColumnTimeoutId);
209
                filterColumnTimeoutId = setTimeout(function() {
210
                    var input = $(e.target);
211
                    var idx = input.parents('td').index();
212
                    holdst.api().column(idx + ':visible').search(input.val()).draw();
213
                }, 200);
214
            };
215
            $('#holdst thead input').on('change keyup keydown', filterColumn);
216
217
            var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %];
218
            var holdst = KohaTable("#holdst", {
219
                "aaSorting": [[ 3, "asc" ]],
220
                "aoColumns": [
221
                    { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null
222
                ],
223
                "sDom": 'B<"clearfix">t',
224
                "bSortCellsTop": true,
225
                "bPaginate": false
226
            }, columns_settings);
227
228
        });
229
    </script>
230
[% END %]
231
227
[% INCLUDE 'intranet-bottom.inc' %]
232
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt (-18 / +21 lines)
Lines 1-28 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
6
<title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'datatables.inc' %]
9
<script type="text/javascript">
10
//<![CDATA[
11
     $(document).ready(function() {
12
         $('#resultlist').tabs();
13
         $("th a").hide();
14
        $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
15
            "aoColumnDefs": [
16
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
17
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
18
                { "sType": "title-string", "aTargets" : [ "title-string" ] }
19
            ],
20
            "sPaginationType": "four_button"
21
        }));
22
      });
23
//]]>
24
</script>
25
</head>
9
</head>
10
26
<body id="circ_waitingreserves" class="circ">
11
<body id="circ_waitingreserves" class="circ">
27
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
28
[% INCLUDE 'circ-search.inc' %]
13
[% INCLUDE 'circ-search.inc' %]
Lines 213-216 Link Here
213
</div>
198
</div>
214
[% END %]
199
[% END %]
215
</div>
200
</div>
201
202
[% MACRO jsinclude BLOCK %]
203
    [% INCLUDE 'datatables.inc' %]
204
    <script type="text/javascript">
205
        $(document).ready(function() {
206
            $('#resultlist').tabs();
207
            $("th a").hide();
208
            $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
209
                "aoColumnDefs": [
210
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
211
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
212
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
213
                ],
214
                "sPaginationType": "four_button"
215
            }));
216
        });
217
    </script>
218
[% END %]
219
216
[% INCLUDE 'intranet-bottom.inc' %]
220
[% INCLUDE 'intranet-bottom.inc' %]
217
- 

Return to bug 19700