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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc (-37 lines)
Lines 1-40 Link Here
1
<script type="text/javascript">
2
	//<![CDATA[
3
4
    function confirm_close() {
5
        var is_confirmed = confirm(_("Are you sure you want to close this subscription?"));
6
        if (is_confirmed) {
7
            window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=close";
8
        }
9
    }
10
    function confirm_reopen() {
11
        var is_confirmed = confirm(_("Are you sure you want to reopen this subscription?"));
12
        if (is_confirmed) {
13
            window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=reopen";
14
        }
15
    }
16
17
	 $(document).ready(function() {
18
        $("#deletesub").click(function(){
19
            confirm_deletion();
20
            return false;
21
        });
22
        $("#reopen").click(function(){
23
            confirm_reopen();
24
            return false;
25
        });
26
        $("#close").click(function(){
27
            confirm_close();
28
            return false;
29
        });
30
        $("#renew").click(function(){
31
            popup([% subscriptionid %]);
32
            return false;
33
        })
34
	 });
35
	//]]>
36
	</script>
37
38
[% IF subscriptionid and ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription || CAN_user_serials_receive_serials ) %]
1
[% IF subscriptionid and ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription || CAN_user_serials_receive_serials ) %]
39
    <div id="toolbar" class="btn-toolbar">
2
    <div id="toolbar" class="btn-toolbar">
40
        [% IF CAN_user_serials_create_subscription %]
3
        [% IF CAN_user_serials_create_subscription %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt (-72 / +61 lines)
Lines 1-83 Link Here
1
[% USE AuthorisedValues %]
1
[% USE AuthorisedValues %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</title>
6
<title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</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" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10
11
<script type="text/javascript">
12
//<![CDATA[
13
function generateReceive(subscriptionid) {
14
    if(nbissues=prompt(_("How many issues do you want to receive ?"))){
15
        document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
16
    }
17
}
18
function print_slip(subscriptionid,issue){
19
    var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
20
    window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
21
}
22
function addsubscriptionid()
23
{
24
	var tab=new Array();
25
    var serialids = document.edition.serialid;
26
    for (i=0; i<serialids.length; i++){
27
      if (serialids[i].checked == true){
28
        var found=false;
29
        for (var val in tab){
30
          if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
31
        }
32
        if (found == false){
33
          tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
34
        }
35
      }
36
    }
37
    var string="";
38
    for (var val in tab){
39
      string = string + tab[val] + ",";
40
    }
41
    string=string.substring(0,string.length -1);
42
    document.edition.subscriptionid.value=string;
43
}
44
function popup(subscriptionid) {
45
    newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
46
}
47
48
function generateNext(subscriptionid) {
49
	if(confirm(_("Do you really want to generate next serial?"))){
50
		document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
51
	}
52
}
53
54
function CheckAll( node ) {
55
    $("#"+node).checkCheckboxes();
56
    return false;
57
}
58
function CheckNone( node ) {
59
    $("#"+node).unCheckCheckboxes();
60
    return false;
61
}
62
$(document).ready(function() {
63
    $('#subscription_years').tabs();
64
    $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
65
        "aoColumnDefs": [
66
            { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
67
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
68
        ],
69
        "aaSorting": [[0, 'desc']],
70
        "sDom": 't',
71
        "bAutoWidth": false,
72
        "bPaginate": false,
73
        "bInfo": false,
74
        "bFilter": false,
75
    } ));
76
});
77
78
//]]>
79
</script>
80
</head>
9
</head>
10
81
<body id="ser_serials-collection" class="ser">
11
<body id="ser_serials-collection" class="ser">
82
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
83
[% INCLUDE 'serials-search.inc' %]
13
[% INCLUDE 'serials-search.inc' %]
Lines 331-334 $(document).ready(function() { Link Here
331
[% INCLUDE 'serials-menu.inc' %]
261
[% INCLUDE 'serials-menu.inc' %]
332
</div>
262
</div>
333
</div>
263
</div>
264
265
[% MACRO jsinclude BLOCK %]
266
    [% INCLUDE 'datatables.inc' %]
267
    <script type="text/javascript">
268
        var subscriptionid = "[% subscriptionid %]";
269
        var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
270
        var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
271
        var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
272
    </script>
273
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar.js"></script>
274
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
275
    <script type="text/javascript">
276
        function generateReceive(subscriptionid) {
277
            if(nbissues=prompt(_("How many issues do you want to receive ?"))){
278
                document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
279
            }
280
        }
281
        function print_slip(subscriptionid,issue){
282
            var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
283
            window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
284
        }
285
286
        function popup(subscriptionid) {
287
            newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
288
        }
289
290
        function generateNext(subscriptionid) {
291
            if(confirm(_("Do you really want to generate next serial?"))){
292
                document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
293
            }
294
        }
295
296
        function CheckAll( node ) {
297
            $("#"+node).checkCheckboxes();
298
            return false;
299
        }
300
        function CheckNone( node ) {
301
            $("#"+node).unCheckCheckboxes();
302
            return false;
303
        }
304
        $(document).ready(function() {
305
            $('#subscription_years').tabs();
306
            $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
307
                "aoColumnDefs": [
308
                    { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
309
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
310
                ],
311
                "aaSorting": [[0, 'desc']],
312
                "sDom": 't',
313
                "bAutoWidth": false,
314
                "bPaginate": false,
315
                "bInfo": false,
316
                "bFilter": false,
317
            } ));
318
        });
319
320
    </script>
321
[% END %]
322
334
[% INCLUDE 'intranet-bottom.inc' %]
323
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt (-1 / +13 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Serials [% biblionumber %]</title>
4
<title>Koha &rsaquo; Serials [% biblionumber %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
</head>
6
</head>
Lines 20-23 Link Here
20
    [% INCLUDE 'serials-menu.inc' %]
21
    [% INCLUDE 'serials-menu.inc' %]
21
  </div>
22
  </div>
22
</div>
23
</div>
24
25
[% MACRO jsinclude BLOCK %]
26
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar.js"></script>
27
    <script type="text/javascript">
28
        var subscriptionid = "[% subscriptionid %]";
29
        var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
30
        var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
31
        var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
32
    </script>
33
[% END %]
34
23
[% INCLUDE 'intranet-bottom.inc' %]
35
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-35 / +46 lines)
Lines 1-45 Link Here
1
[% USE AuthorisedValues %]
1
[% USE Branches %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE AuthorisedValues %]
4
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Serials [% biblionumber %]</title>
6
<title>Koha &rsaquo; Serials [% biblionumber %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
<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" />
9
[% INCLUDE 'datatables.inc' %]
10
<script type="text/javascript">
11
//<![CDATA[
12
 $(document).ready(function() {
13
    var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
14
        "sPaginationType": "four_button",
15
        "aoColumnDefs": [
16
            { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
17
            { "sType": "title-string", "aTargets" : [ "title-string" ] },
18
            { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
19
        ]
20
    } ) );
21
22
    var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
23
        // FIXME sort function of additional_fields!
24
        "sPaginationType": "four_button",
25
        "aoColumnDefs": [
26
            { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
27
            { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
28
        ]
29
    } ) );
30
31
    osrlt.fnAddFilters("dt-filter", 750);
32
    csrlt.fnAddFilters("dt-filter", 750);
33
34
    $('#serialstabs').tabs();
35
    $("#reopensub").click(function(){
36
      return confirm(_("Are you sure you want to reopen this subscription?"));
37
    });
38
 });
39
 //]]>
40
</script>
41
<style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
9
<style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
42
</head>
10
</head>
11
43
<body id="ser_serials-home" class="ser">
12
<body id="ser_serials-home" class="ser">
44
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
45
[% INCLUDE 'serials-search.inc' %]
14
[% INCLUDE 'serials-search.inc' %]
Lines 445-448 Link Here
445
      [% END %]
414
      [% END %]
446
  </div>
415
  </div>
447
</div>
416
</div>
417
418
[% MACRO jsinclude BLOCK %]
419
    [% INCLUDE 'calendar.inc' %]
420
    [% INCLUDE 'datatables.inc' %]
421
    <script type="text/javascript">
422
        var subscriptionid = "[% subscriptionid %]";
423
        var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
424
        var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
425
        var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
426
    </script>
427
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar.js"></script>
428
    <script type="text/javascript">
429
        $(document).ready(function() {
430
            var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
431
                "sPaginationType": "four_button",
432
                "aoColumnDefs": [
433
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
434
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
435
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
436
                ]
437
            }));
438
439
            var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
440
                // FIXME sort function of additional_fields!
441
                "sPaginationType": "four_button",
442
                "aoColumnDefs": [
443
                    { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
444
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
445
                ]
446
            }));
447
448
            osrlt.fnAddFilters("dt-filter", 750);
449
            csrlt.fnAddFilters("dt-filter", 750);
450
451
            $('#serialstabs').tabs();
452
            $("#reopensub").click(function(){
453
                return confirm(_("Are you sure you want to reopen this subscription?"));
454
            });
455
        });
456
    </script>
457
[% END %]
458
448
[% INCLUDE 'intranet-bottom.inc' %]
459
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-25 / +25 lines)
Lines 1-35 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid %]</title>
6
<title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
<script type="text/javascript">
8
//<![CDATA[
9
// the english words used in display purposes
10
var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
11
"Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
12
13
14
function confirm_deletion() {
15
    var is_confirmed = confirm(_("Are you sure you want to delete this subscription?"));
16
    if (is_confirmed) {
17
        window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=del";
18
    }
19
}
20
function popup(subscriptionid) {
21
    newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes');
22
}
23
$(document).ready(function() {
24
    $("#subscription_description").tabs();
25
    $("#renewsub").click(function(){
26
        popup([% subscriptionid %]);
27
        return false;
28
    })
29
});
30
//]]>
31
</script>
32
</head>
8
</head>
9
33
<body id="ser_subscription-detail" class="ser">
10
<body id="ser_subscription-detail" class="ser">
34
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'header.inc' %]
35
[% INCLUDE 'serials-search.inc' %]
12
[% INCLUDE 'serials-search.inc' %]
Lines 393-396 $(document).ready(function() { Link Here
393
[% INCLUDE 'serials-menu.inc' %]
370
[% INCLUDE 'serials-menu.inc' %]
394
</div>
371
</div>
395
</div>
372
</div>
373
374
[% MACRO jsinclude BLOCK %]
375
    <script type="text/javascript">
376
        var subscriptionid = "[% subscriptionid %]";
377
        var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
378
        var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
379
        var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
380
    </script>
381
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar.js"></script>
382
    <script type="text/javascript">
383
        // the english words used in display purposes
384
        var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
385
        "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
386
        $(document).ready(function() {
387
            $("#subscription_description").tabs();
388
            $("#renewsub").click(function(){
389
                popup([% subscriptionid %]);
390
                return false;
391
            })
392
        });
393
    </script>
394
[% END %]
395
396
[% INCLUDE 'intranet-bottom.inc' %]
396
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js (-1 / +43 lines)
Line 0 Link Here
0
- 
1
/* global MSG_CLOSE_SUBSCRIPTION MSG_REOPEN_SUBSCRIPTION CONFIRM_DELETE_SUBSCRIPTION subscriptionid */
2
3
function confirm_close() {
4
    var is_confirmed = confirm( MSG_CLOSE_SUBSCRIPTION );
5
    if (is_confirmed) {
6
        window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=close";
7
    }
8
}
9
function confirm_reopen() {
10
    var is_confirmed = confirm( MSG_REOPEN_SUBSCRIPTION );
11
    if (is_confirmed) {
12
        window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=reopen";
13
    }
14
}
15
16
function confirm_deletion() {
17
    var is_confirmed = confirm( CONFIRM_DELETE_SUBSCRIPTION );
18
    if (is_confirmed) {
19
        window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=del";
20
    }
21
}
22
function popup(subscriptionid) {
23
    newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes');
24
}
25
26
 $(document).ready(function() {
27
    $("#deletesub").click(function(){
28
        confirm_deletion();
29
        return false;
30
    });
31
    $("#reopen").click(function(){
32
        confirm_reopen();
33
        return false;
34
    });
35
    $("#close").click(function(){
36
        confirm_close();
37
        return false;
38
    });
39
    $("#renew").click(function(){
40
        popup( subscriptionid );
41
        return false;
42
    });
43
 });

Return to bug 19777