Lines 1-10
Link Here
|
|
|
1 |
/* global APIClient __ confirmDelete */ |
1 |
$(document).ready(function () { |
2 |
$(document).ready(function () { |
2 |
const client = APIClient.recall; |
3 |
const client = APIClient.recall; |
3 |
|
4 |
|
4 |
$(".cancel_recall").click(function (e) { |
5 |
$(".cancel_recall").click(function () { |
5 |
if (confirmDelete(__("Are you sure you want to remove this recall?"))) { |
6 |
if (confirmDelete(__("Are you sure you want to remove this recall?"))) { |
6 |
let td_node = $(this).parents("td"); |
7 |
let td_node = $(this).parents("td"); |
7 |
let recall_id = $(this).data("id"); |
8 |
let recall_id = $(this).data("id"); |
|
|
9 |
let message; |
8 |
client.recalls.cancel(recall_id).then( |
10 |
client.recalls.cancel(recall_id).then( |
9 |
success => { |
11 |
success => { |
10 |
if (success.success == 0) { |
12 |
if (success.success == 0) { |
Lines 23-32
$(document).ready(function () {
Link Here
|
23 |
} |
25 |
} |
24 |
}); |
26 |
}); |
25 |
|
27 |
|
26 |
$(".expire_recall").click(function (e) { |
28 |
$(".expire_recall").click(function () { |
27 |
if (confirmDelete(__("Are you sure you want to expire this recall?"))) { |
29 |
if (confirmDelete(__("Are you sure you want to expire this recall?"))) { |
28 |
let td_node = $(this).parents("td"); |
30 |
let td_node = $(this).parents("td"); |
29 |
let recall_id = $(this).data("id"); |
31 |
let recall_id = $(this).data("id"); |
|
|
32 |
let message; |
30 |
client.recalls.expire(recall_id).then( |
33 |
client.recalls.expire(recall_id).then( |
31 |
success => { |
34 |
success => { |
32 |
if (success.success == 0) { |
35 |
if (success.success == 0) { |
Lines 45-51
$(document).ready(function () {
Link Here
|
45 |
} |
48 |
} |
46 |
}); |
49 |
}); |
47 |
|
50 |
|
48 |
$(".revert_recall").click(function (e) { |
51 |
$(".revert_recall").click(function () { |
49 |
if ( |
52 |
if ( |
50 |
confirmDelete( |
53 |
confirmDelete( |
51 |
__( |
54 |
__( |
Lines 55-60
$(document).ready(function () {
Link Here
|
55 |
) { |
58 |
) { |
56 |
let td_node = $(this).parents("td"); |
59 |
let td_node = $(this).parents("td"); |
57 |
let recall_id = $(this).data("id"); |
60 |
let recall_id = $(this).data("id"); |
|
|
61 |
let message; |
58 |
client.recalls.revert(recall_id).then( |
62 |
client.recalls.revert(recall_id).then( |
59 |
success => { |
63 |
success => { |
60 |
if (success.success == 0) { |
64 |
if (success.success == 0) { |
Lines 73-79
$(document).ready(function () {
Link Here
|
73 |
} |
77 |
} |
74 |
}); |
78 |
}); |
75 |
|
79 |
|
76 |
$(".overdue_recall").click(function (e) { |
80 |
$(".overdue_recall").click(function () { |
77 |
if ( |
81 |
if ( |
78 |
confirmDelete( |
82 |
confirmDelete( |
79 |
__("Are you sure you want to mark this recall as overdue?") |
83 |
__("Are you sure you want to mark this recall as overdue?") |
Lines 81-86
$(document).ready(function () {
Link Here
|
81 |
) { |
85 |
) { |
82 |
let td_node = $(this).parents("td"); |
86 |
let td_node = $(this).parents("td"); |
83 |
let recall_id = $(this).data("id"); |
87 |
let recall_id = $(this).data("id"); |
|
|
88 |
let message; |
84 |
client.recalls.overdue(recall_id).then( |
89 |
client.recalls.overdue(recall_id).then( |
85 |
success => { |
90 |
success => { |
86 |
if (success.success == 0) { |
91 |
if (success.success == 0) { |
Lines 99-105
$(document).ready(function () {
Link Here
|
99 |
} |
104 |
} |
100 |
}); |
105 |
}); |
101 |
|
106 |
|
102 |
$(".transit_recall").click(function (e) { |
107 |
$(".transit_recall").click(function () { |
103 |
if ( |
108 |
if ( |
104 |
confirmDelete( |
109 |
confirmDelete( |
105 |
__( |
110 |
__( |
Lines 109-114
$(document).ready(function () {
Link Here
|
109 |
) { |
114 |
) { |
110 |
let td_node = $(this).parents("td"); |
115 |
let td_node = $(this).parents("td"); |
111 |
let recall_id = $(this).data("id"); |
116 |
let recall_id = $(this).data("id"); |
|
|
117 |
let message; |
112 |
client.recalls.transit(recall_id).then( |
118 |
client.recalls.transit(recall_id).then( |
113 |
success => { |
119 |
success => { |
114 |
if (success.success == 0) { |
120 |
if (success.success == 0) { |
Lines 133-139
$(document).ready(function () {
Link Here
|
133 |
pagingType: "full_numbers", |
139 |
pagingType: "full_numbers", |
134 |
}); |
140 |
}); |
135 |
|
141 |
|
136 |
$("#cancel_selected").click(function (e) { |
142 |
$("#cancel_selected").click(function () { |
137 |
if ($("input[name='recall_ids']:checked").length > 0) { |
143 |
if ($("input[name='recall_ids']:checked").length > 0) { |
138 |
return confirmDelete( |
144 |
return confirmDelete( |
139 |
__("Are you sure you want to remove the selected recall(s)?") |
145 |
__("Are you sure you want to remove the selected recall(s)?") |
140 |
- |
|
|