Lines 16-21
function clear_edit(){
Link Here
|
16 |
$(this).val(""); |
16 |
$(this).val(""); |
17 |
$(this).removeAttr("disabled"); |
17 |
$(this).removeAttr("disabled"); |
18 |
} |
18 |
} |
|
|
19 |
if ( type == "checkbox" ) { |
20 |
$(this).attr('checked', false); |
21 |
} |
19 |
}); |
22 |
}); |
20 |
$(edit_row).find("select").removeAttr("disabled"); |
23 |
$(edit_row).find("select").removeAttr("disabled"); |
21 |
$(edit_row).find("select option:first").attr("selected", "selected"); |
24 |
$(edit_row).find("select option:first").attr("selected", "selected"); |
Lines 23-28
function clear_edit(){
Link Here
|
23 |
} |
26 |
} |
24 |
|
27 |
|
25 |
$(document).ready(function() { |
28 |
$(document).ready(function() { |
|
|
29 |
$('#cap_fine_to_replacement_price').on('change', function(){ |
30 |
$('#overduefinescap').prop('disabled', $(this).is(':checked') ); |
31 |
}); |
26 |
$('#selectlibrary').find("input:submit").hide(); |
32 |
$('#selectlibrary').find("input:submit").hide(); |
27 |
$('#branch').change(function() { |
33 |
$('#branch').change(function() { |
28 |
$('#selectlibrary').submit(); |
34 |
$('#selectlibrary').submit(); |
Lines 38-44
$(document).ready(function() {
Link Here
|
38 |
itm = $(this).text(); |
44 |
itm = $(this).text(); |
39 |
itm = itm.replace(/^\s*|\s*$/g,''); |
45 |
itm = itm.replace(/^\s*|\s*$/g,''); |
40 |
var current_column = $("#edit_row td:eq("+i+")"); |
46 |
var current_column = $("#edit_row td:eq("+i+")"); |
41 |
if ( i != 6 ) { |
47 |
if ( i == 6 ) { |
|
|
48 |
// specific processing for the Hard due date column |
49 |
var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); |
50 |
var input_value = ''; |
51 |
if (typeof select_value === 'undefined'){ |
52 |
select_value = '-1'; |
53 |
}else { |
54 |
input_value = itm.split(' ')[1]; |
55 |
} |
56 |
$(current_column).find("input[type='text']").val(input_value); |
57 |
$(current_column).find("select").val(select_value); |
58 |
} else if ( i == 11 ) { |
59 |
// specific processing for cap_fine_to_replacement_price |
60 |
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); |
61 |
$('#cap_fine_to_replacement_price').attr('checked', cap_fine_to_replacement_price.is(':checked') ); |
62 |
$('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') ); |
63 |
} else { |
42 |
$(current_column).find("input[type='text']").val(itm); |
64 |
$(current_column).find("input[type='text']").val(itm); |
43 |
// select the corresponding option |
65 |
// select the corresponding option |
44 |
$(current_column).find("select option").each(function(){ |
66 |
$(current_column).find("select option").each(function(){ |
Lines 66-82
$(document).ready(function() {
Link Here
|
66 |
$(current_column).find("input[type='text']").val(""); |
88 |
$(current_column).find("input[type='text']").val(""); |
67 |
} |
89 |
} |
68 |
} |
90 |
} |
69 |
} else { |
|
|
70 |
// specific processing for the Hard due date column |
71 |
var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); |
72 |
var input_value = ''; |
73 |
if (typeof select_value === 'undefined'){ |
74 |
select_value = '-1'; |
75 |
}else { |
76 |
input_value = itm.split(' ')[1]; |
77 |
} |
78 |
$(current_column).find("input[type='text']").val(input_value); |
79 |
$(current_column).find("select").val(select_value); |
80 |
} |
91 |
} |
81 |
}); |
92 |
}); |
82 |
$("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled'); |
93 |
$("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled'); |
Lines 150-155
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
150 |
<th>Fine charging interval</th> |
161 |
<th>Fine charging interval</th> |
151 |
<th>Fine grace period</th> |
162 |
<th>Fine grace period</th> |
152 |
<th>Overdue fines cap (amount)</th> |
163 |
<th>Overdue fines cap (amount)</th> |
|
|
164 |
<th>Cap fine at replacement price</th> |
153 |
<th>Suspension in days (day)</th> |
165 |
<th>Suspension in days (day)</th> |
154 |
<th>Max. suspension duration (day)</th> |
166 |
<th>Max. suspension duration (day)</th> |
155 |
<th>Renewals allowed (count)</th> |
167 |
<th>Renewals allowed (count)</th> |
Lines 214-219
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
214 |
<td>[% rule.chargeperiod %]</td> |
226 |
<td>[% rule.chargeperiod %]</td> |
215 |
<td>[% rule.firstremind %]</td> |
227 |
<td>[% rule.firstremind %]</td> |
216 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
228 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
|
|
229 |
<td> |
230 |
[% IF rule.cap_fine_to_replacement_price %] |
231 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
232 |
[% ELSE %] |
233 |
<input type="checkbox" disabled="disabled" /> |
234 |
[% END %] |
235 |
</td> |
217 |
<td>[% rule.finedays %]</td> |
236 |
<td>[% rule.finedays %]</td> |
218 |
<td>[% rule.maxsuspensiondays %]</td> |
237 |
<td>[% rule.maxsuspensiondays %]</td> |
219 |
<td>[% rule.renewalsallowed %]</td> |
238 |
<td>[% rule.renewalsallowed %]</td> |
Lines 275-280
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
275 |
<td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> |
294 |
<td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> |
276 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
295 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
277 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
296 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
|
|
297 |
<td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td> |
278 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
298 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
279 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
299 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
280 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
300 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
Lines 309-335
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
309 |
</tr> |
329 |
</tr> |
310 |
<tfoot> |
330 |
<tfoot> |
311 |
<tr> |
331 |
<tr> |
312 |
<th>Patron category</th> |
332 |
<th>Patron category</th> |
313 |
<th>Item type</th> |
333 |
<th>Item type</th> |
314 |
<th>Current checkouts allowed</th> |
334 |
<th>Current checkouts allowed</th> |
315 |
<th>Loan period</th> |
335 |
<th>Current on-site checkouts allowed</th> |
316 |
<th>Unit</th> |
336 |
<th>Loan period</th> |
317 |
<th>Hard due date</th> |
337 |
<th>Unit</th> |
318 |
<th>Fine amount</th> |
338 |
<th>Hard due date</th> |
319 |
<th>Fine charging interval</th> |
339 |
<th>Fine amount</th> |
320 |
<th>Fine grace period</th> |
340 |
<th>Fine charging interval</th> |
321 |
<th>Overdue fines cap (amount)</th> |
341 |
<th>Fine grace period</th> |
322 |
<th>Suspension in days (day)</th> |
342 |
<th>Overdue fines cap (amount)</th> |
323 |
<th>Max. suspension duration (day)</th> |
343 |
<th>Cap fine at replacement price</th> |
324 |
<th>Renewals allowed (count)</th> |
344 |
<th>Suspension in days (day)</th> |
325 |
<th>Renewal period</th> |
345 |
<th>Max. suspension duration (day)</th> |
326 |
<th>No renewal before</th> |
346 |
<th>Renewals allowed (count)</th> |
327 |
<th>Automatic renewal</th> |
347 |
<th>Renewal period</th> |
328 |
<th>Holds allowed (count)</th> |
348 |
<th>No renewal before</th> |
329 |
<th>On shelf holds allowed</th> |
349 |
<th>Automatic renewal</th> |
330 |
<th>Item level holds</th> |
350 |
<th>Holds allowed (count)</th> |
331 |
<th>Rental discount (%)</th> |
351 |
<th>On shelf holds allowed</th> |
332 |
<th colspan="2"> </th> |
352 |
<th>Item level holds</th> |
|
|
353 |
<th>Rental discount (%)</th> |
354 |
<th colspan="2"> </th> |
333 |
</tr> |
355 |
</tr> |
334 |
</tfoot> |
356 |
</tfoot> |
335 |
</tbody> |
357 |
</tbody> |
336 |
- |
|
|