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 != 5 ) { |
47 |
if ( i == 5 ) { |
|
|
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 == 10 ) { |
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 149-154
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
149 |
<th>Fine charging interval</th> |
160 |
<th>Fine charging interval</th> |
150 |
<th>Fine grace period (day)</th> |
161 |
<th>Fine grace period (day)</th> |
151 |
<th>Overdue fines cap (amount)</th> |
162 |
<th>Overdue fines cap (amount)</th> |
|
|
163 |
<th>Cap fine at replacement price</th> |
152 |
<th>Suspension in days (day)</th> |
164 |
<th>Suspension in days (day)</th> |
153 |
<th>Max. suspension duration (day)</th> |
165 |
<th>Max. suspension duration (day)</th> |
154 |
<th>Renewals allowed (count)</th> |
166 |
<th>Renewals allowed (count)</th> |
Lines 207-212
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
207 |
<td>[% rule.chargeperiod %]</td> |
219 |
<td>[% rule.chargeperiod %]</td> |
208 |
<td>[% rule.firstremind %]</td> |
220 |
<td>[% rule.firstremind %]</td> |
209 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
221 |
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td> |
|
|
222 |
<td> |
223 |
[% IF rule.cap_fine_to_replacement_price %] |
224 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
225 |
[% ELSE %] |
226 |
<input type="checkbox" disabled="disabled" /> |
227 |
[% END %] |
228 |
</td> |
210 |
<td>[% rule.finedays %]</td> |
229 |
<td>[% rule.finedays %]</td> |
211 |
<td>[% rule.maxsuspensiondays %]</td> |
230 |
<td>[% rule.maxsuspensiondays %]</td> |
212 |
<td>[% rule.renewalsallowed %]</td> |
231 |
<td>[% rule.renewalsallowed %]</td> |
Lines 267-272
for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
Link Here
|
267 |
<td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> |
286 |
<td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> |
268 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
287 |
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> |
269 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
288 |
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> |
|
|
289 |
<td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td> |
270 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
290 |
<td><input type="text" name="finedays" id="fined" size="3" /> </td> |
271 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
291 |
<td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> |
272 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
292 |
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> |
273 |
- |
|
|