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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc (-17 lines)
Lines 1-20 Link Here
1
<script type="text/javascript">//<![CDATA[
2
    $(document).ready(function() {
3
        var path = location.pathname.substring(1);
4
        if (path.indexOf("labels") >= 0 && path.indexOf("spine") < 0 ) {
5
          $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').css('font-weight','bold');
6
        } else if (path.indexOf("patroncards") >= 0 ) {
7
          $('#navmenulist a[href$="/cgi-bin/koha/patroncards/home.pl"]').css('font-weight','bold');
8
        } else if (path.indexOf("patron_lists") >= 0 ) {
9
          $('#navmenulist a[href$="/cgi-bin/koha/patron_lists/lists.pl"]').css('font-weight','bold');
10
        } else if ((path+location.search).indexOf("batchMod.pl?del=1") >= 0 ) {
11
          $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold');
12
        } else {
13
          $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold');
14
        }
15
    });
16
//]]>
17
</script>
18
<div id="navmenu">
1
<div id="navmenu">
19
<div id="navmenulist">
2
<div id="navmenulist">
20
<ul>
3
<ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt (+5 lines)
Lines 1-3 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo;
3
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo;
3
    [% IF list.patron_list_id %]
4
    [% IF list.patron_list_id %]
Lines 63-66 Link Here
63
        </form>
64
        </form>
64
    </div>
65
    </div>
65
66
67
[% MACRO jsinclude BLOCK %]
68
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
69
[% END %]
70
66
[% INCLUDE 'intranet-bottom.inc' %]
71
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-60 / +62 lines)
Lines 1-69 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name %] &rsaquo; Add patrons</title>
4
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name %] &rsaquo; Add patrons</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
6
6
<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" />
7
[% INCLUDE 'datatables.inc' %]
8
9
<script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
10
<script type="text/javascript">
11
//<![CDATA[
12
var MSG_REMOVE_PATRON = _("Remove");
13
$(document).ready(function() {
14
    $('#patrons_to_add_fieldset').hide();
15
16
        $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
17
            "order": [[ 3, "asc" ]],
18
            "aoColumns": [
19
                null,null,null,null,null,null,null,{ "sType": "title-string" },null
20
            ],
21
            "aoColumnDefs": [
22
                { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
23
            ],
24
            "sPaginationType": "four_button"
25
        } ));
26
27
    patron_autocomplete({
28
        patron_container: $("#patrons_to_add"),
29
        input_autocomplete: $("#find_patron"),
30
        patron_input_name: 'patrons_to_add'
31
    });
32
33
    var checkBoxes = $("input[type='checkbox']","#patron-list-table");
34
35
    $("#CheckAll").click(function(e){
36
        e.preventDefault();
37
        checkBoxes.each(function(){
38
            $(this).prop("checked",1);
39
        });
40
    });
41
    $("#CheckNone").click(function(e){
42
        e.preventDefault();
43
        checkBoxes.each(function(){
44
            $(this).prop("checked",0);
45
        });
46
    });
47
48
    $("#remove_patrons").submit(function(){
49
        var checkedItems = $("input:checked");
50
        if ($(checkedItems).size() == 0) {
51
            alert(_("You must select one or more patrons to remove"));
52
            return false;
53
        }
54
        $(checkedItems).parents('tr').addClass("warn");
55
        if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
56
            return true;
57
        } else {
58
            $(checkedItems).parents('tr').removeClass("warn");
59
            return false;
60
        }
61
    });
62
});
63
64
//]]>
65
</script>
66
67
</head>
8
</head>
68
9
69
<body id="patlist_list" class="pat patlist">
10
<body id="patlist_list" class="pat patlist">
Lines 161-164 $(document).ready(function() { Link Here
161
            [% INCLUDE 'tools-menu.inc' %]
102
            [% INCLUDE 'tools-menu.inc' %]
162
        </div>
103
        </div>
163
    </div>
104
    </div>
105
106
[% MACRO jsinclude BLOCK %]
107
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
108
    [% INCLUDE 'datatables.inc' %]
109
110
    <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
111
    <script type="text/javascript">
112
        var MSG_REMOVE_PATRON = _("Remove");
113
        $(document).ready(function() {
114
            $('#patrons_to_add_fieldset').hide();
115
116
                $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
117
                    "order": [[ 3, "asc" ]],
118
                    "aoColumns": [
119
                        null,null,null,null,null,null,null,{ "sType": "title-string" },null
120
                    ],
121
                    "aoColumnDefs": [
122
                        { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
123
                    ],
124
                    "sPaginationType": "four_button"
125
                } ));
126
127
            patron_autocomplete({
128
                patron_container: $("#patrons_to_add"),
129
                input_autocomplete: $("#find_patron"),
130
                patron_input_name: 'patrons_to_add'
131
            });
132
133
            var checkBoxes = $("input[type='checkbox']","#patron-list-table");
134
135
            $("#CheckAll").click(function(e){
136
                e.preventDefault();
137
                checkBoxes.each(function(){
138
                    $(this).prop("checked",1);
139
                });
140
            });
141
            $("#CheckNone").click(function(e){
142
                e.preventDefault();
143
                checkBoxes.each(function(){
144
                    $(this).prop("checked",0);
145
                });
146
            });
147
148
            $("#remove_patrons").submit(function(){
149
                var checkedItems = $("input:checked");
150
                if ($(checkedItems).size() == 0) {
151
                    alert(_("You must select one or more patrons to remove"));
152
                    return false;
153
                }
154
                $(checkedItems).parents('tr').addClass("warn");
155
                if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
156
                    return true;
157
                } else {
158
                    $(checkedItems).parents('tr').removeClass("warn");
159
                    return false;
160
                }
161
            });
162
        });
163
    </script>
164
[% END %]
165
164
[% INCLUDE 'intranet-bottom.inc' %]
166
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-50 / +53 lines)
Lines 1-58 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Patron lists</title>
3
<title>Koha &rsaquo; Tools &rsaquo; Patron lists</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'greybox.inc' %]
5
[% INCLUDE 'greybox.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
[% INCLUDE 'datatables.inc' %]
7
8
<script type="text/javascript">
9
//<![CDATA[
10
    $(document).ready(function() {
11
        var patronExportModal = $("#patronExportModal");
12
        var patronExportModalBody = $("#patronExportModal .modal-body")
13
14
        $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
15
            "autoWidth": false,
16
            "aoColumnDefs": [
17
                { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
18
            ],
19
            "sPaginationType": "four_button"
20
        } ));
21
        $(".delete_patron").on("click", function(){
22
            $(".dropdown").removeClass("open");
23
            var list = $(this).data("list-name");
24
            return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
25
        });
26
27
        $(".print_cards").on("click", function(e){
28
            e.preventDefault();
29
            var page = $(this).attr("href");
30
            patronExportModalBody.load(page + " #exportingf");
31
            patronExportModal.modal("show");
32
        });
33
34
        patronExportModal.on("hidden", function(){
35
            patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
36
        });
37
38
        patronExportModal.on("submit", "#exportingf", function(e){
39
            e.preventDefault();
40
            modal_body = patronExportModalBody;
41
            modal_body.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
42
            target_url = $(this).attr("action");
43
            params =  $( this ).serialize();
44
            modal_body.load( target_url + "?" + params + " #custom-doc");
45
        });
46
47
        patronExportModal.on("click",".closebtn,.gb-close",function(e){
48
            e.preventDefault();
49
            patronExportModal.modal("hide");
50
        });
51
52
    });
53
//]]>
54
</script>
55
56
</head>
7
</head>
57
8
58
<body id="patlist_lists" class="pat patlist">
9
<body id="patlist_lists" class="pat patlist">
Lines 151-154 Link Here
151
            [% INCLUDE 'tools-menu.inc' %]
102
            [% INCLUDE 'tools-menu.inc' %]
152
        </div>
103
        </div>
153
    </div>
104
    </div>
105
106
[% MACRO jsinclude BLOCK %]
107
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
108
    [% INCLUDE 'datatables.inc' %]
109
110
    <script type="text/javascript">
111
        $(document).ready(function() {
112
            var patronExportModal = $("#patronExportModal");
113
            var patronExportModalBody = $("#patronExportModal .modal-body")
114
115
            $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
116
                "autoWidth": false,
117
                "aoColumnDefs": [
118
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
119
                ],
120
                "sPaginationType": "four_button"
121
            } ));
122
            $(".delete_patron").on("click", function(){
123
                $(".dropdown").removeClass("open");
124
                var list = $(this).data("list-name");
125
                return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
126
            });
127
128
            $(".print_cards").on("click", function(e){
129
                e.preventDefault();
130
                var page = $(this).attr("href");
131
                patronExportModalBody.load(page + " #exportingf");
132
                patronExportModal.modal("show");
133
            });
134
135
            patronExportModal.on("hidden", function(){
136
                patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
137
            });
138
139
            patronExportModal.on("submit", "#exportingf", function(e){
140
                e.preventDefault();
141
                modal_body = patronExportModalBody;
142
                modal_body.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
143
                target_url = $(this).attr("action");
144
                params =  $( this ).serialize();
145
                modal_body.load( target_url + "?" + params + " #custom-doc");
146
            });
147
148
            patronExportModal.on("click",".closebtn,.gb-close",function(e){
149
                e.preventDefault();
150
                patronExportModal.modal("hide");
151
            });
152
153
        });
154
    </script>
155
[% END %]
156
154
[% INCLUDE 'intranet-bottom.inc' %]
157
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js (-1 / +14 lines)
Line 0 Link Here
0
- 
1
  $(document).ready(function() {
2
      var path = location.pathname.substring(1);
3
      if (path.indexOf("labels") >= 0 && path.indexOf("spine") < 0 ) {
4
        $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').css('font-weight','bold');
5
      } else if (path.indexOf("patroncards") >= 0 ) {
6
        $('#navmenulist a[href$="/cgi-bin/koha/patroncards/home.pl"]').css('font-weight','bold');
7
      } else if (path.indexOf("patron_lists") >= 0 ) {
8
        $('#navmenulist a[href$="/cgi-bin/koha/patron_lists/lists.pl"]').css('font-weight','bold');
9
      } else if ((path+location.search).indexOf("batchMod.pl?del=1") >= 0 ) {
10
        $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold');
11
      } else {
12
        $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold');
13
      }
14
  });

Return to bug 19647