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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-13 / +19 lines)
Lines 864-880 function _dt_add_filters(table_node, table_dt, filters_options = {}) { Link Here
864
                }
864
                }
865
            }
865
            }
866
866
867
            var search = $.fn.dataTable.util.throttle( function ( i, val ) {
867
            function delay(callback, ms) {
868
                table_dt
868
                var timer = 0;
869
                    .column( i )
869
                return function () {
870
                    .search( val )
870
                    var context = this, args = arguments;
871
                    .draw();
871
                    clearTimeout(timer);
872
            }, 500);
872
                    timer = setTimeout(function () {
873
873
                        callback.apply(context, args);
874
            $( input_type, this ).on( 'keyup change', function () {
874
                    }, ms || 0);
875
                if ( table_dt.column(i).search() !== this.value ) {
875
                };
876
                    if ( input_type == "input" ) {
876
            }
877
                        search(i, this.value)
877
878
            $(input_type, this).on('keyup change', (delay(function () {
879
                if (table_dt.column(i).search() !== this.value) {
880
                    if (input_type == "input") {
881
                        table_dt
882
                            .column(i)
883
                            .search(this.value)
884
                            .draw();
878
                    } else {
885
                    } else {
879
                        table_dt
886
                        table_dt
880
                            .column(i)
887
                            .column(i)
Lines 882-888 function _dt_add_filters(table_node, table_dt, filters_options = {}) { Link Here
882
                            .draw();
889
                            .draw();
883
                    }
890
                    }
884
                }
891
                }
885
            } );
892
            }, 500)));
886
        } else {
893
        } else {
887
            $(this).html('');
894
            $(this).html('');
888
        }
895
        }
889
- 

Return to bug 35396