|
Lines 699-711
$(document).ready(function () {
Link Here
|
| 699 |
return toggle_suspend(this, inputs); |
699 |
return toggle_suspend(this, inputs); |
| 700 |
}); |
700 |
}); |
| 701 |
|
701 |
|
| 702 |
var MSG_SUSPEND_SELECTED = _("Suspend selected (%s)"); |
|
|
| 703 |
var MSG_SUSPEND_SELECTED_HOLDS = _("selected holds"); |
702 |
var MSG_SUSPEND_SELECTED_HOLDS = _("selected holds"); |
| 704 |
$(".suspend_selected_holds").html( |
|
|
| 705 |
MSG_SUSPEND_SELECTED.format( |
| 706 |
$(".holds_table .select_hold:checked").length |
| 707 |
) |
| 708 |
); |
| 709 |
|
703 |
|
| 710 |
$(".suspend_selected_holds").click(function (e) { |
704 |
$(".suspend_selected_holds").click(function (e) { |
| 711 |
e.preventDefault(); |
705 |
e.preventDefault(); |
|
Lines 729-735
$(document).ready(function () {
Link Here
|
| 729 |
return toggle_suspend(this, inputs); |
723 |
return toggle_suspend(this, inputs); |
| 730 |
}); |
724 |
}); |
| 731 |
|
725 |
|
| 732 |
var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); |
|
|
| 733 |
var MSG_CANCEL_ALERT = _( |
726 |
var MSG_CANCEL_ALERT = _( |
| 734 |
"This action will cancel <span class='badge bg-danger'>%s</span> hold(s)." |
727 |
"This action will cancel <span class='badge bg-danger'>%s</span> hold(s)." |
| 735 |
); |
728 |
); |
|
Lines 789-812
$(document).ready(function () {
Link Here
|
| 789 |
}); |
782 |
}); |
| 790 |
} |
783 |
} |
| 791 |
|
784 |
|
| 792 |
var MSG_GROUP_SELECTED = _("Group selected (%s)"); |
|
|
| 793 |
|
| 794 |
function updateSelectedHoldsButtonCounters() { |
785 |
function updateSelectedHoldsButtonCounters() { |
| 795 |
$(".cancel_selected_holds").html( |
786 |
$(".selected_holds_count").html( |
| 796 |
MSG_CANCEL_SELECTED.format( |
787 |
$(".holds_table .select_hold:checked").length |
| 797 |
$(".holds_table .select_hold:checked").length |
|
|
| 798 |
) |
| 799 |
); |
| 800 |
$(".suspend_selected_holds").html( |
| 801 |
MSG_SUSPEND_SELECTED.format( |
| 802 |
$(".holds_table .select_hold:checked").length |
| 803 |
) |
| 804 |
); |
| 805 |
$(".group_selected_holds").html( |
| 806 |
MSG_GROUP_SELECTED.format( |
| 807 |
$(".holds_table .select_hold:checked").length |
| 808 |
) |
| 809 |
); |
788 |
); |
|
|
789 |
if (patron_page) { |
| 790 |
if ($(".holds_table .select_hold:checked").length == 0) { |
| 791 |
$(".cancel_selected_holds").prop("disabled", true); |
| 792 |
$(".suspend_selected_holds").prop("disabled", true); |
| 793 |
$(".group_selected_holds").prop("disabled", true); |
| 794 |
} else { |
| 795 |
if ($(".holds_table .select_hold:checked").length >= 2) { |
| 796 |
$(".group_selected_holds").prop("disabled", false); |
| 797 |
} |
| 798 |
$(".suspend_selected_holds").prop("disabled", false); |
| 799 |
$(".cancel_selected_holds").prop("disabled", false); |
| 800 |
} |
| 801 |
} |
| 810 |
} |
802 |
} |
| 811 |
|
803 |
|
| 812 |
updateSelectedHoldsButtonCounters(); |
804 |
updateSelectedHoldsButtonCounters(); |
|
Lines 938-947
$(document).ready(function () {
Link Here
|
| 938 |
); |
930 |
); |
| 939 |
} |
931 |
} |
| 940 |
|
932 |
|
| 941 |
$(".group_selected_holds").html( |
|
|
| 942 |
MSG_GROUP_SELECTED.format($(".holds_table .select_hold:checked").length) |
| 943 |
); |
| 944 |
|
| 945 |
$(".group_selected_holds").click(function (e) { |
933 |
$(".group_selected_holds").click(function (e) { |
| 946 |
if ($(".holds_table .select_hold:checked").length > 1) { |
934 |
if ($(".holds_table .select_hold:checked").length > 1) { |
| 947 |
let selected_holds = get_selected_holds_data(); |
935 |
let selected_holds = get_selected_holds_data(); |
| 948 |
- |
|
|