Sha256: 059b197eb289f160990a2cbcc0d093d90030a00ec289d54046ca4f887e55a1b1
Contents?: true
Size: 771 Bytes
Versions: 11
Compression:
Stored size: 771 Bytes
Contents
$(document).on 'click', '.dataTables_wrapper a.buttons-reset-search', (event) -> event.preventDefault() # prevent the click # Reset the HTML $table = $(event.currentTarget).closest('.dataTables_wrapper').find('table.dataTable').first() $thead = $table.children('thead').first() # Reset all inputs $thead.find('select').val('').trigger('change.select2') $inputs = $thead.find('input') $inputs.val('').removeAttr('checked').removeAttr('selected') # Reset the datatable datatable = $table.DataTable() # Reset search datatable.search('').columns().search('') # Reset to default visibility $.each $table.data('default-visibility'), (index, visible) => datatable.column(index).visible(visible, false) # Don't pass up the click false
Version data entries
11 entries across 11 versions & 1 rubygems