|
Lines 713-725
$(document).ready(function () {
Link Here
|
| 713 |
return toggle_suspend(this, inputs); |
713 |
return toggle_suspend(this, inputs); |
| 714 |
}); |
714 |
}); |
| 715 |
|
715 |
|
| 716 |
var MSG_SUSPEND_SELECTED = __("Suspend selected (%s)"); |
|
|
| 717 |
var MSG_SUSPEND_SELECTED_HOLDS = __("selected holds"); |
716 |
var MSG_SUSPEND_SELECTED_HOLDS = __("selected holds"); |
| 718 |
$(".suspend_selected_holds").html( |
|
|
| 719 |
MSG_SUSPEND_SELECTED.format( |
| 720 |
$(".holds_table .select_hold:checked").length |
| 721 |
) |
| 722 |
); |
| 723 |
|
717 |
|
| 724 |
$(".suspend_selected_holds").click(function (e) { |
718 |
$(".suspend_selected_holds").click(function (e) { |
| 725 |
e.preventDefault(); |
719 |
e.preventDefault(); |
|
Lines 743-749
$(document).ready(function () {
Link Here
|
| 743 |
return toggle_suspend(this, inputs); |
737 |
return toggle_suspend(this, inputs); |
| 744 |
}); |
738 |
}); |
| 745 |
|
739 |
|
| 746 |
var MSG_CANCEL_SELECTED = __("Cancel selected (%s)"); |
|
|
| 747 |
var MSG_MOVE_SELECTED = __("Move selected (%s)"); |
740 |
var MSG_MOVE_SELECTED = __("Move selected (%s)"); |
| 748 |
var MSG_CANCEL_ALERT = __( |
741 |
var MSG_CANCEL_ALERT = __( |
| 749 |
"This action will cancel <span class='badge bg-danger'>%s</span> hold(s)." |
742 |
"This action will cancel <span class='badge bg-danger'>%s</span> hold(s)." |
|
Lines 804-832
$(document).ready(function () {
Link Here
|
| 804 |
}); |
797 |
}); |
| 805 |
} |
798 |
} |
| 806 |
|
799 |
|
| 807 |
var MSG_GROUP_SELECTED = _("Group selected (%s)"); |
|
|
| 808 |
|
| 809 |
function updateSelectedHoldsButtonCounters() { |
800 |
function updateSelectedHoldsButtonCounters() { |
| 810 |
$(".cancel_selected_holds").html( |
|
|
| 811 |
MSG_CANCEL_SELECTED.format( |
| 812 |
$(".holds_table .select_hold:checked").length |
| 813 |
) |
| 814 |
); |
| 815 |
$(".move_selected_holds").html( |
801 |
$(".move_selected_holds").html( |
| 816 |
MSG_MOVE_SELECTED.format( |
802 |
MSG_MOVE_SELECTED.format( |
| 817 |
$(".holds_table .select_hold:checked").length |
803 |
$(".holds_table .select_hold:checked").length |
| 818 |
) |
804 |
) |
| 819 |
); |
805 |
); |
| 820 |
$(".suspend_selected_holds").html( |
806 |
$(".selected_holds_count").html( |
| 821 |
MSG_SUSPEND_SELECTED.format( |
807 |
$(".holds_table .select_hold:checked").length |
| 822 |
$(".holds_table .select_hold:checked").length |
|
|
| 823 |
) |
| 824 |
); |
| 825 |
$(".group_selected_holds").html( |
| 826 |
MSG_GROUP_SELECTED.format( |
| 827 |
$(".holds_table .select_hold:checked").length |
| 828 |
) |
| 829 |
); |
808 |
); |
|
|
809 |
if (patron_page) { |
| 810 |
if ($(".holds_table .select_hold:checked").length == 0) { |
| 811 |
$(".cancel_selected_holds").prop("disabled", true); |
| 812 |
$(".suspend_selected_holds").prop("disabled", true); |
| 813 |
$(".group_selected_holds").prop("disabled", true); |
| 814 |
} else { |
| 815 |
if ($(".holds_table .select_hold:checked").length >= 2) { |
| 816 |
$(".group_selected_holds").prop("disabled", false); |
| 817 |
} |
| 818 |
$(".suspend_selected_holds").prop("disabled", false); |
| 819 |
$(".cancel_selected_holds").prop("disabled", false); |
| 820 |
} |
| 821 |
} |
| 830 |
} |
822 |
} |
| 831 |
|
823 |
|
| 832 |
function updateMoveButtons(table) { |
824 |
function updateMoveButtons(table) { |
|
Lines 1160-1169
$(document).ready(function () {
Link Here
|
| 1160 |
); |
1152 |
); |
| 1161 |
} |
1153 |
} |
| 1162 |
|
1154 |
|
| 1163 |
$(".group_selected_holds").html( |
|
|
| 1164 |
MSG_GROUP_SELECTED.format($(".holds_table .select_hold:checked").length) |
| 1165 |
); |
| 1166 |
|
| 1167 |
$(".group_selected_holds").click(function (e) { |
1155 |
$(".group_selected_holds").click(function (e) { |
| 1168 |
if ($(".holds_table .select_hold:checked").length > 1) { |
1156 |
if ($(".holds_table .select_hold:checked").length > 1) { |
| 1169 |
let selected_holds = get_selected_holds_data(); |
1157 |
let selected_holds = get_selected_holds_data(); |
| 1170 |
- |
|
|