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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-2 / +20 lines)
Lines 517-523 Link Here
517
                + '        </div>'
517
                + '        </div>'
518
                + '    </div>'
518
                + '    </div>'
519
                + '    <table id="results">'
519
                + '    <table id="results">'
520
                + '      <thead>' + tr + tr + '</thead>'
520
                + '      <thead>' + tr +  '</thead>'
521
                + '      <tfoot>' + tr + '</tfoot>'
521
                + '      <tbody></tbody>'
522
                + '      <tbody></tbody>'
522
                + '    </table>'
523
                + '    </table>'
523
                + '</div>';
524
                + '</div>';
Lines 619-624 Link Here
619
                "drawCallback": function( settings ) {
620
                "drawCallback": function( settings ) {
620
                    prepSelections();
621
                    prepSelections();
621
                },
622
                },
623
                "initComplete": function() {
624
                    $('#results').DataTable().columns().every(function () {
625
                        let column = this;
626
                        let columnName = $(column.footer()).data('colname');
627
                        let title = column.footer().textContent;
628
629
                        let input = document.createElement('input');
630
                        input.classList.add('text_filter', 'form-control' , 'search_init');
631
                        input.placeholder = title;
632
                        column.footer().replaceChildren(input);
633
634
                        input.addEventListener('keyup', () => {
635
                            if (column.search() !== this.value) {
636
                                column.search(input.value).draw();
637
                            }
638
                        });
639
                    });
640
                },
622
                fixedHeader: false // There is a bug on this view
641
                fixedHeader: false // There is a bug on this view
623
            }, table_settings ).columnFilter({
642
            }, table_settings ).columnFilter({
624
                'sPlaceHolder': 'head:after',
643
                'sPlaceHolder': 'head:after',
625
- 

Return to bug 37238