Lines 42-47
Link Here
|
42 |
[% END %] |
42 |
[% END %] |
43 |
</select> |
43 |
</select> |
44 |
</li> |
44 |
</li> |
|
|
45 |
<li> |
46 |
<label for="sort1_filter">Sort1:</label> |
47 |
<select id="sort1_filter"> |
48 |
<option value="">Any</option> |
49 |
[% FOREACH sor IN sort1 %] |
50 |
<option value="[% sor | html %]">[% sor | html %]</option> |
51 |
[% END %] |
52 |
</select> |
53 |
</li> |
54 |
<li> |
55 |
<label for="sort2_filter">Sort2:</label> |
56 |
<select id="sort2_filter"> |
57 |
<option value="">Any</option> |
58 |
[% FOREACH sor IN sort2 %] |
59 |
<option value="[% sor | html %]">[% sor | html %]</option> |
60 |
[% END %] |
61 |
</select> |
62 |
</li> |
45 |
</ol> |
63 |
</ol> |
46 |
<fieldset class="action"> |
64 |
<fieldset class="action"> |
47 |
<input type="submit" value="Search" /> |
65 |
<input type="submit" value="Search" /> |
Lines 69-79
Link Here
|
69 |
|
87 |
|
70 |
<input type="hidden" id="firstletter_filter" value="" /> |
88 |
<input type="hidden" id="firstletter_filter" value="" /> |
71 |
<div id="searchresults"> |
89 |
<div id="searchresults"> |
|
|
90 |
<div class="searchheader fh-fixedHeader" id="searchheader"> |
91 |
<div> |
92 |
<a href="#" id="select_all"><i class="fa fa-check"></i> Select all</a> |
93 |
| |
94 |
<a href="#" id="clear_all"><i class="fa fa-remove"></i> Clear all</a> |
95 |
| |
96 |
<a href="#" class="btn btn-default btn-xs" id="add-selected">Add selected patrons</a> |
97 |
</div> |
98 |
</div> |
72 |
<table id="memberresultst"> |
99 |
<table id="memberresultst"> |
73 |
<thead> |
100 |
<thead> |
74 |
<tr> |
101 |
<tr> |
75 |
[% FOR column IN columns %] |
102 |
[% FOR column IN columns %] |
76 |
[% SWITCH column %] |
103 |
[% SWITCH column %] |
|
|
104 |
[% CASE 'select' %]<th> </th> |
77 |
[% CASE 'cardnumber' %]<th>Card</th> |
105 |
[% CASE 'cardnumber' %]<th>Card</th> |
78 |
[% CASE 'dateofbirth' %]<th>Date of birth</th> |
106 |
[% CASE 'dateofbirth' %]<th>Date of birth</th> |
79 |
[% CASE 'address' %]<th>Address</th> |
107 |
[% CASE 'address' %]<th>Address</th> |
Lines 150-155
Link Here
|
150 |
},{ |
178 |
},{ |
151 |
'name': 'branchcode', |
179 |
'name': 'branchcode', |
152 |
'value': $("#branchcode_filter").val() |
180 |
'value': $("#branchcode_filter").val() |
|
|
181 |
},{ |
182 |
'name': 'sort1', |
183 |
'value': $("#sort1_filter").val() |
184 |
},{ |
185 |
'name': 'sort2', |
186 |
'value': $("#sort2_filter").val() |
153 |
},{ |
187 |
},{ |
154 |
'name': 'name_sorton', |
188 |
'name': 'name_sorton', |
155 |
'value': 'borrowers.surname borrowers.firstname' |
189 |
'value': 'borrowers.surname borrowers.firstname' |
Lines 204-209
Link Here
|
204 |
[% FOR column IN columns %] |
238 |
[% FOR column IN columns %] |
205 |
[% IF column == 'action' %] |
239 |
[% IF column == 'action' %] |
206 |
{ 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' } |
240 |
{ 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' } |
|
|
241 |
[% ELSIF column == 'select' %] |
242 |
{ 'mDataProp': 'dt_select', 'bSortable': false, 'sClass': 'selections' } |
207 |
[% ELSIF column == 'address' %] |
243 |
[% ELSIF column == 'address' %] |
208 |
{ 'mDataProp': 'dt_address', 'bSortable': false } |
244 |
{ 'mDataProp': 'dt_address', 'bSortable': false } |
209 |
[% ELSE %] |
245 |
[% ELSE %] |
Lines 225-230
Link Here
|
225 |
e.preventDefault(); |
261 |
e.preventDefault(); |
226 |
filterByFirstLetterSurname($(this).text()); |
262 |
filterByFirstLetterSurname($(this).text()); |
227 |
}); |
263 |
}); |
|
|
264 |
$("#select_all").on("click",function(e){ |
265 |
e.preventDefault(); |
266 |
$("#searchresults .selection").prop("checked", true).change(); |
267 |
}); |
268 |
$("#clear_all").on("click",function(e){ |
269 |
e.preventDefault(); |
270 |
$("#searchresults .selection").prop("checked", false).change(); |
271 |
}); |
272 |
$("#add-selected").on('click', function(e){ |
273 |
$("#searchresults .selection:checked").each(function(){ |
274 |
var borrowernumber = $(this).data("borrowernumber"); |
275 |
var firstname = $(this).data("firstname"); |
276 |
var surname = $(this).data("surname"); |
277 |
add_user( borrowernumber, firstname + " " + surname ); |
278 |
}); |
279 |
}); |
228 |
$("body").on("click",".add_user",function(e){ |
280 |
$("body").on("click",".add_user",function(e){ |
229 |
e.preventDefault(); |
281 |
e.preventDefault(); |
230 |
var borrowernumber = $(this).data("borrowernumber"); |
282 |
var borrowernumber = $(this).data("borrowernumber"); |