|
Lines 368-384
Link Here
|
| 368 |
are_you_sure_no_item: [% I18N.t("Are you sure you want to delete this course?") | html %], |
368 |
are_you_sure_no_item: [% I18N.t("Are you sure you want to delete this course?") | html %], |
| 369 |
}; |
369 |
}; |
| 370 |
</script> |
370 |
</script> |
| 371 |
|
|
|
| 372 |
<script> |
371 |
<script> |
| 373 |
$(document).ready(function(){ |
372 |
$(document).ready(function () { |
| 374 |
|
373 |
$("#delete_course_button").on("click", function (e) { |
| 375 |
$("#delete_course_button").on( 'click', function(e){ |
|
|
| 376 |
e.preventDefault(); |
374 |
e.preventDefault(); |
| 377 |
$('#delete_course').submit(); |
375 |
$("#delete_course").submit(); |
| 378 |
}); |
376 |
}); |
| 379 |
$("#rm_items_button").on( 'click', function(e){ |
377 |
$("#rm_items_button").on("click", function (e) { |
| 380 |
e.preventDefault(); |
378 |
e.preventDefault(); |
| 381 |
$('#rm_items').submit(); |
379 |
$("#rm_items").submit(); |
| 382 |
}); |
380 |
}); |
| 383 |
|
381 |
|
| 384 |
var rtable = $("#course_reserves_table").kohaTable( |
382 |
var rtable = $("#course_reserves_table").kohaTable( |
|
Lines 389-407
Link Here
|
| 389 |
table_settings |
387 |
table_settings |
| 390 |
); |
388 |
); |
| 391 |
|
389 |
|
| 392 |
$("#course_reserves_table").on( 'click', " .delete_item", function(e){ |
390 |
$("#course_reserves_table").on("click", " .delete_item", function (e) { |
| 393 |
e.preventDefault(); |
391 |
e.preventDefault(); |
| 394 |
if (confirmDelete(_("Are you sure you want to remove this item from the course?") )) { |
392 |
if (confirmDelete(_("Are you sure you want to remove this item from the course?"))) { |
| 395 |
cr_id = $(this).data('cr-id'); |
393 |
cr_id = $(this).data("cr-id"); |
| 396 |
$("#del_reserve_" + cr_id ).submit(); |
394 |
$("#del_reserve_" + cr_id).submit(); |
| 397 |
} |
395 |
} |
| 398 |
}); |
396 |
}); |
| 399 |
|
397 |
|
| 400 |
$("#rm_items").click(function(){ |
398 |
$("#rm_items").click(function () { |
| 401 |
return confirmDelete(_("Are you sure you want to remove all items from the course?")); |
399 |
return confirmDelete(_("Are you sure you want to remove all items from the course?")); |
| 402 |
}); |
400 |
}); |
| 403 |
|
401 |
|
| 404 |
$("#delete_course").click(function(){ |
402 |
$("#delete_course").click(function () { |
| 405 |
return confirmDelete(course_reserves_size > 0 ? i18n.are_you_sure_items : i18n.are_you_sure_no_item); |
403 |
return confirmDelete(course_reserves_size > 0 ? i18n.are_you_sure_items : i18n.are_you_sure_no_item); |
| 406 |
}); |
404 |
}); |
| 407 |
}); |
405 |
}); |