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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-8 / +12 lines)
Lines 231-236 Link Here
231
[% MACRO jsinclude BLOCK %]
231
[% MACRO jsinclude BLOCK %]
232
    [% INCLUDE 'datatables.inc' %]
232
    [% INCLUDE 'datatables.inc' %]
233
    [% Asset.js("js/labels-menu.js") | $raw %]
233
    [% Asset.js("js/labels-menu.js") | $raw %]
234
    <script>
235
        const batch_id = "[% batch_id | html %]";
236
        const has_entries = [% table_loop ? 1 : 0 | html %];
237
    </script>
238
234
    <script>
239
    <script>
235
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
240
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
236
            $(".focus:last").select();
241
            $(".focus:last").select();
Lines 278-284 Link Here
278
        function Add() {
283
        function Add() {
279
            var number_list = document.getElementById("number_list");
284
            var number_list = document.getElementById("number_list");
280
            if (number_list.value == '') {
285
            if (number_list.value == '') {
281
                window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=[% batch_id | html %]&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
286
                window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=" + batch_id + "&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
282
            } else {
287
            } else {
283
                document.forms["add_by_number"].submit();
288
                document.forms["add_by_number"].submit();
284
            }
289
            }
Lines 290-296 Link Here
290
        }
295
        }
291
296
292
        function DeDuplicate() {
297
        function DeDuplicate() {
293
            window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&amp;batch_id=[% batch_id | html %]";
298
            window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&amp;batch_id=" + batch_id;
294
        }
299
        }
295
300
296
        function Xport(mode) {
301
        function Xport(mode) {
Lines 314-322 Link Here
314
                    alert(_("Please select at least one label to export."));
319
                    alert(_("Please select at least one label to export."));
315
                    return;     // no batch selected
320
                    return;     // no batch selected
316
                }
321
                }
317
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]&" + getstr;
322
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&" + getstr;
318
            } else if (mode == 'batch') {
323
            } else if (mode == 'batch') {
319
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]";
324
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id;
320
            } else {
325
            } else {
321
                // some pass-through error trapping just in case...
326
                // some pass-through error trapping just in case...
322
            }
327
            }
Lines 340-350 Link Here
340
345
341
        $(document).ready(function() {
346
        $(document).ready(function() {
342
            $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
347
            $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
343
            [% IF table_loop %]
348
            if (has_entries){
344
                $("#description").show();
349
                $("#description").show();
345
            [% ELSE %]
350
            } else {
346
                $("#description").hide();
351
                $("#description").hide();
347
            [% END %]
352
            }
348
            $("#batcht").kohaTable({
353
            $("#batcht").kohaTable({
349
                dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>',
354
                dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>',
350
                autoWidth: false,
355
                autoWidth: false,
351
- 

Return to bug 41571