|
Lines 89-95
KOHA.RecordedBooks = new function() {
Link Here
|
| 89 |
$('<div id="action_'+item.isbn+'" class="actions-menu">') |
89 |
$('<div id="action_'+item.isbn+'" class="actions-menu">') |
| 90 |
.append(actions) |
90 |
.append(actions) |
| 91 |
.appendTo(line); |
91 |
.appendTo(line); |
| 92 |
|
92 |
$('<span id="waiting_'+item.isbn+'" style="display:none;"><img class="throbber" src="/opac-tmpl/lib/jquery/plugins/themes/classic/throbber.gif" /></span>').appendTo(line); |
| 93 |
$(ul_el).append(line); |
93 |
$(ul_el).append(line); |
| 94 |
} |
94 |
} |
| 95 |
|
95 |
|
|
Lines 156-161
KOHA.RecordedBooks = new function() {
Link Here
|
| 156 |
|
156 |
|
| 157 |
function item_action (params, el) { |
157 |
function item_action (params, el) { |
| 158 |
var isbn = params.isbn; |
158 |
var isbn = params.isbn; |
|
|
159 |
$("#action_"+isbn).hide(); |
| 160 |
$("#waiting_"+isbn).show(); |
| 159 |
svc_ajax('post', params, function(data) { |
161 |
svc_ajax('post', params, function(data) { |
| 160 |
if (data.checkouts) { |
162 |
if (data.checkouts) { |
| 161 |
details.checkouts = data.checkouts; |
163 |
details.checkouts = data.checkouts; |
|
Lines 164-169
KOHA.RecordedBooks = new function() {
Link Here
|
| 164 |
details.holds = data.holds; |
166 |
details.holds = data.holds; |
| 165 |
} |
167 |
} |
| 166 |
display_actions(el, isbn); |
168 |
display_actions(el, isbn); |
|
|
169 |
$("#action_"+isbn).show(); |
| 170 |
$("#waiting_"+isbn).hide(); |
| 167 |
}); |
171 |
}); |
| 168 |
} |
172 |
} |
| 169 |
|
173 |
|
|
Lines 233-238
KOHA.RecordedBooks = new function() {
Link Here
|
| 233 |
if(checkout_popup) { |
237 |
if(checkout_popup) { |
| 234 |
$(el).append( ajax_button(MSG_CHECK_OUT, function() { |
238 |
$(el).append( ajax_button(MSG_CHECK_OUT, function() { |
| 235 |
if( confirm(MSG_CHECK_OUT_CONFIRM) ) { |
239 |
if( confirm(MSG_CHECK_OUT_CONFIRM) ) { |
|
|
240 |
$("#action_"+isbn).hide(); |
| 241 |
$("#waiting_"+isbn).show(); |
| 236 |
svc_ajax('post', {action: "checkout", isbn: isbn}, function(data) { |
242 |
svc_ajax('post', {action: "checkout", isbn: isbn}, function(data) { |
| 237 |
if (data.checkouts) { |
243 |
if (data.checkouts) { |
| 238 |
details.checkouts = data.checkouts; |
244 |
details.checkouts = data.checkouts; |
|
Lines 241-246
KOHA.RecordedBooks = new function() {
Link Here
|
| 241 |
details.holds = data.holds; |
247 |
details.holds = data.holds; |
| 242 |
} |
248 |
} |
| 243 |
item = display_actions(el, isbn); |
249 |
item = display_actions(el, isbn); |
|
|
250 |
$("#action_"+isbn).show(); |
| 251 |
$("#waiting_"+isbn).hide(); |
| 244 |
}); |
252 |
}); |
| 245 |
} |
253 |
} |
| 246 |
}) ); |
254 |
}) ); |
|
Lines 304-309
KOHA.RecordedBooks = new function() {
Link Here
|
| 304 |
$('<div id="action_'+isbn+'" class="actions-menu">') |
312 |
$('<div id="action_'+isbn+'" class="actions-menu">') |
| 305 |
.append(actions) |
313 |
.append(actions) |
| 306 |
.appendTo(el); |
314 |
.appendTo(el); |
|
|
315 |
$("#action_"+isbn).before('<span id="waiting_'+isbn+'" style="display:none;"><img class="throbber" src="/opac-tmpl/lib/jquery/plugins/themes/classic/throbber.gif" /></span>'); |
| 307 |
}; |
316 |
}; |
| 308 |
|
317 |
|
| 309 |
this.search = function( q, page_size, page, callback ) { |
318 |
this.search = function( q, page_size, page, callback ) { |
| 310 |
- |
|
|