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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-6 / +10 lines)
Lines 414-419 Link Here
414
[% MACRO jsinclude BLOCK %]
414
[% MACRO jsinclude BLOCK %]
415
    [% INCLUDE 'datatables.inc' %]
415
    [% INCLUDE 'datatables.inc' %]
416
    [% INCLUDE 'calendar.inc' %]
416
    [% INCLUDE 'calendar.inc' %]
417
    <script>
418
        var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
419
        const uploadedbarcodesflag = [% uploadedbarcodesflag ? 1 : 0 | html %];
420
    </script>
417
    <script>
421
    <script>
418
        function checkForm() {
422
        function checkForm() {
419
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
423
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
Lines 466-486 Link Here
466
        }
470
        }
467
471
468
        $(document).ready(function(){
472
        $(document).ready(function(){
469
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
470
            inventorydt = $("#inventoryt").kohaTable({
473
            inventorydt = $("#inventoryt").kohaTable({
471
                pagingType: 'full_numbers',
474
                pagingType: 'full_numbers',
472
                bKohaColumnsUseNames: true,
475
                bKohaColumnsUseNames: true,
473
                [% IF uploadedbarcodesflag %]
476
                ...(uploadedbarcodesflag
477
                ? {
474
                    // sort on callnumber
478
                    // sort on callnumber
475
                    order: [[ 2, "asc" ]],
479
                    order: [[ 2, "asc" ]]
476
                [% ELSE %]
480
                }
481
                : {
477
                    // first column contains checkboxes
482
                    // first column contains checkboxes
478
                    columnDefs: [
483
                    columnDefs: [
479
                        { orderable: false, searchable:  false, targets: [ 0 ] }
484
                        { orderable: false, searchable:  false, targets: [ 0 ] }
480
                    ],
485
                    ],
481
                    // 3rd column is callnumber
486
                    // 3rd column is callnumber
482
                    order: [[ 2, "asc" ]],
487
                    order: [[ 2, "asc" ]],
483
                [% END %]
488
                }),
484
                drawCallback: function() {
489
                drawCallback: function() {
485
                    //bind the click handler script to the newly created elements held in the table
490
                    //bind the click handler script to the newly created elements held in the table
486
                    $('.openWin').bind('click',function(e){
491
                    $('.openWin').bind('click',function(e){
487
- 

Return to bug 41580