mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Add clear search button to data tables.
This commit is contained in:
parent
5a1516286c
commit
01b3ae377b
8 changed files with 43 additions and 11 deletions
|
@ -348,3 +348,12 @@ Accordion.prototype.dropdown = function(e) {
|
|||
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
|
||||
};
|
||||
}
|
||||
|
||||
function clearSearchButton(tableName, table) {
|
||||
$('#' + tableName + '_filter').find('input[type=search]')
|
||||
.wrap('<div class="input-group" role="group" aria-label="Search"></div>')
|
||||
.after('<span class="input-group-btn"><button class="btn btn-form" data-toggle="button" aria-pressed="false" autocomplete="off" id="clear-search-' + tableName + '"><i class="fa fa-remove"></i></button></span>')
|
||||
$('#clear-search-' + tableName).click(function() {
|
||||
table.search('').draw();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue