Lines 20-25
Link Here
|
20 |
function Remove() { |
20 |
function Remove() { |
21 |
items = new Array; |
21 |
items = new Array; |
22 |
item_num = new Array; |
22 |
item_num = new Array; |
|
|
23 |
|
23 |
if(document.items.action.length > 0) { |
24 |
if(document.items.action.length > 0) { |
24 |
for (var i=0; i < document.items.action.length; i++) { |
25 |
for (var i=0; i < document.items.action.length; i++) { |
25 |
if (document.items.action[i].checked) { |
26 |
if (document.items.action[i].checked) { |
Lines 27-42
Link Here
|
27 |
item_num.push(i+1); |
28 |
item_num.push(i+1); |
28 |
} |
29 |
} |
29 |
} |
30 |
} |
30 |
if (items.length < 1) { |
|
|
31 |
alert(_("Please select at least one item to delete.")); |
32 |
return; // no item selected |
33 |
} |
34 |
getstr = items.join("&"); |
31 |
getstr = items.join("&"); |
35 |
item_msg = item_num.join(", "); |
32 |
item_msg = item_num.join(", "); |
36 |
var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg); |
33 |
var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg); |
|
|
34 |
} else if (document.items.action.checked) { |
35 |
alert(_("Deletion of item from a batch with only one item will delete the batch.\n\nIf this is what you want, select 'Delete batch' option from toolbar")); |
36 |
return; // no deletion for single item batch |
37 |
} |
37 |
} |
38 |
else { |
38 |
else { |
39 |
alert(_("Please select at least label to delete.")); |
39 |
alert(_("Please select at least one patron to delete.")); |
40 |
return; // no item selected |
40 |
return; // no item selected |
41 |
} |
41 |
} |
42 |
var answer = confirm(msg); |
42 |
var answer = confirm(msg); |
43 |
- |
|
|