View | Details | Raw Unified | Return to bug 15663
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-5 / +14 lines)
Lines 8-13 Link Here
8
    <script type="text/javascript">
8
    <script type="text/javascript">
9
    //<![CDATA[
9
    //<![CDATA[
10
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
10
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
11
        function DeleteConfirm() {
12
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
13
            var answer = confirm(msg);
14
            if (answer) {
15
                window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=batch&amp;element_id=[% batch_id %]";
16
            }
17
            else {
18
                return; // abort delete
19
            }
20
        };
11
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
21
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
12
            $(".focus:last").select();
22
            $(".focus:last").select();
13
        }
23
        }
Lines 30-42 Link Here
30
                            item_num.push(i+1);
40
                            item_num.push(i+1);
31
                        }
41
                        }
32
                    }
42
                    }
33
                    if (items.length < 1) {
34
                        alert(_("Please select at least one item to delete."));
35
                        return;     // no item selected
36
                    }
37
                    getstr = items.join("&");
43
                    getstr = items.join("&");
38
                    item_msg = item_num.join(", ");
44
                    item_msg = item_num.join(", ");
39
                    var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?"
45
                    var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?"
46
                } else if (document.items.action.checked) {
47
		    alert(_("Deletion of label from a batch with only one label will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar"));
48
                    return; // no deletion for single item batch
40
                }
49
                }
41
                else {
50
                else {
42
                    alert(_("Please select at least label to delete."));
51
                    alert(_("Please select at least label to delete."));
Lines 211-216 Link Here
211
                            <div id="batch-manage" class="btn-toolbar">
220
                            <div id="batch-manage" class="btn-toolbar">
212
                                <a class="btn btn-small" id="additems" href="#"><icon class="fa fa-plus"></icon> Add item(s)</a>[% IF ( table_loop ) %]
221
                                <a class="btn btn-small" id="additems" href="#"><icon class="fa fa-plus"></icon> Add item(s)</a>[% IF ( table_loop ) %]
213
                                <a class="btn btn-small" id="removeitems" href="#"><icon class="fa fa-trash"></icon> Remove selected items</a>
222
                                <a class="btn btn-small" id="removeitems" href="#"><icon class="fa fa-trash"></icon> Remove selected items</a>
223
				<a class="btn btn-small" id="deletebatch" href="#"><icon class="fa fa-minus-square"></icon> Delete batch</a>
214
                                <a class="btn btn-small" id="deduplicate" href="#"><icon class="fa fa-minus"></icon> Remove duplicates</a>
224
                                <a class="btn btn-small" id="deduplicate" href="#"><icon class="fa fa-minus"></icon> Remove duplicates</a>
215
                                <a class="btn btn-small" id="exportitems" href="#"><icon class="fa fa-share-square-o"></icon> Export selected items</a>
225
                                <a class="btn btn-small" id="exportitems" href="#"><icon class="fa fa-share-square-o"></icon> Export selected items</a>
216
                                <a class="btn btn-small" id="exportbatch" href="#"><icon class="fa fa-share-square-o"></icon> Export full batch</a>[% END %]
226
                                <a class="btn btn-small" id="exportbatch" href="#"><icon class="fa fa-share-square-o"></icon> Export full batch</a>[% END %]
217
- 

Return to bug 15663