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 › Tools › Patron lists › [% list.name %] › Add patrons</title> |
4 |
<title>Koha › Tools › Patron lists › [% list.name %] › 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' %] |