|
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 == 12 ) { |
| 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 151-156
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
| 151 |
<th>Charge when?</th> |
162 |
<th>Charge when?</th> |
| 152 |
<th>Fine grace period</th> |
163 |
<th>Fine grace period</th> |
| 153 |
<th>Overdue fines cap (amount)</th> |
164 |
<th>Overdue fines cap (amount)</th> |
|
|
165 |
<th>Cap fine at replacement price</th> |
| 154 |
<th>Suspension in days (day)</th> |
166 |
<th>Suspension in days (day)</th> |
| 155 |
<th>Max. suspension duration (day)</th> |
167 |
<th>Max. suspension duration (day)</th> |
| 156 |
<th>Renewals allowed (count)</th> |
168 |
<th>Renewals allowed (count)</th> |
|
Lines 216-221
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
| 216 |
<td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
228 |
<td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
| 217 |
<td>[% rule.firstremind %]</td> |
229 |
<td>[% rule.firstremind %]</td> |
| 218 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
230 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
|
|
231 |
<td> |
| 232 |
[% IF rule.cap_fine_to_replacement_price %] |
| 233 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
| 234 |
[% ELSE %] |
| 235 |
<input type="checkbox" disabled="disabled" /> |
| 236 |
[% END %] |
| 237 |
</td> |
| 219 |
<td>[% rule.finedays %]</td> |
238 |
<td>[% rule.finedays %]</td> |
| 220 |
<td>[% rule.maxsuspensiondays %]</td> |
239 |
<td>[% rule.maxsuspensiondays %]</td> |
| 221 |
<td>[% rule.renewalsallowed %]</td> |
240 |
<td>[% rule.renewalsallowed %]</td> |
|
Lines 283-288
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
| 283 |
</td> |
302 |
</td> |
| 284 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
303 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
| 285 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
304 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
|
|
305 |
<td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td> |
| 286 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
306 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
| 287 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
307 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
| 288 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
308 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
|
Lines 329-334
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
| 329 |
<th>Charge when?</th> |
349 |
<th>Charge when?</th> |
| 330 |
<th>Fine grace period</th> |
350 |
<th>Fine grace period</th> |
| 331 |
<th>Overdue fines cap (amount)</th> |
351 |
<th>Overdue fines cap (amount)</th> |
|
|
352 |
<th>Cap fine at replacement price</th> |
| 332 |
<th>Suspension in days (day)</th> |
353 |
<th>Suspension in days (day)</th> |
| 333 |
<th>Max. suspension duration (day)</th> |
354 |
<th>Max. suspension duration (day)</th> |
| 334 |
<th>Renewals allowed (count)</th> |
355 |
<th>Renewals allowed (count)</th> |