Lines 7-12
$(document).ready(function() {
Link Here
|
7 |
|
7 |
|
8 |
var onHoldDueDateSet = false; |
8 |
var onHoldDueDateSet = false; |
9 |
|
9 |
|
|
|
10 |
var show_confirm = true; |
11 |
|
10 |
var onHoldChecked = function() { |
12 |
var onHoldChecked = function() { |
11 |
var isChecked = false; |
13 |
var isChecked = false; |
12 |
$('input[data-on-reserve]').each(function() { |
14 |
$('input[data-on-reserve]').each(function() { |
Lines 152-166
$(document).ready(function() {
Link Here
|
152 |
|
154 |
|
153 |
var itemnumber = $(this).val(); |
155 |
var itemnumber = $(this).val(); |
154 |
|
156 |
|
155 |
var can_renew = true; |
157 |
if(show_confirm && parseFloat(fines) > parseFloat(amountlimit) ) { |
156 |
|
|
|
157 |
if( parseFloat(fines) > parseFloat(amountlimit) ) { |
158 |
var result = confirm(MSG_CONFRIM_RENEW); |
158 |
var result = confirm(MSG_CONFRIM_RENEW); |
159 |
if(result){ |
159 |
if(!result){ |
160 |
can_renew = true; |
160 |
return false; |
161 |
}else{ |
|
|
162 |
can_renew = false; |
163 |
} |
161 |
} |
|
|
162 |
// Prevent displaying confirm box again |
163 |
show_confirm = false; |
164 |
} |
164 |
} |
165 |
|
165 |
|
166 |
var params = { |
166 |
var params = { |
Lines 185-194
$(document).ready(function() {
Link Here
|
185 |
params.date_due = dueDate |
185 |
params.date_due = dueDate |
186 |
} |
186 |
} |
187 |
|
187 |
|
188 |
if(can_renew) { |
188 |
$(this).parent().parent().replaceWith("<img id='renew_" + itemnumber + "' src='" + interface + "/" + theme + "/img/spinner-small.gif' />"); |
189 |
$(this).parent().parent().replaceWith("<img id='renew_" + itemnumber + "' src='" + interface + "/" + theme + "/img/spinner-small.gif' />"); |
189 |
renew(params); |
190 |
renew(params); |
|
|
191 |
} |
192 |
}); |
190 |
}); |
193 |
|
191 |
|
194 |
// Refocus on barcode field if it exists |
192 |
// Refocus on barcode field if it exists |
195 |
- |
|
|