Sha256: dd0e06216d0c465c17f1d99a09ebe288d6321a1dfb8170cfe54966dd2a066bcd
Contents?: true
Size: 1006 Bytes
Versions: 25
Compression:
Stored size: 1006 Bytes
Contents
@UiBibzTable = class Table constructor: -> @submitPerPageSelect() @clearSearch() @animeSearchInput() @focusSearchInput() @initializeSearchInput() # Submit form when per_page select changing submitPerPageSelect: -> $('.table-pagination-per-page select').change () -> $(this).parents('form').submit() # Clear search clearSearch: -> $('.table-search-field .clear-search-btn').click () -> $(this).prev().val('') $(this).parents('form').submit() # Resize search field animeSearchInput: -> $('.table-card input[type=search]').blur -> $parent = $(this).parent() $parent.removeClass('has-value') if $(this).val() == '' $parent.removeClass('is-focused') focusSearchInput: -> $('.table-card input[type=search]').focus -> $(this).parent().addClass('is-focused has-value') initializeSearchInput: -> $('.table-card input[type=search]').each -> $(this).parent().addClass('has-value') if $(this).val() != ''
Version data entries
25 entries across 25 versions & 1 rubygems