Add clear search button to data tables.

This commit is contained in:
JonnyWong16 2015-08-19 13:25:29 -07:00
commit 01b3ae377b
8 changed files with 43 additions and 11 deletions

View file

@ -314,6 +314,8 @@ from plexpy import helpers
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
$(colvis.button()).appendTo('#button-bar-history');
clearSearchButton('history_table', history_table);
});
$( "#ip-tab-btn" ).one( "click", function() {
@ -329,6 +331,8 @@ from plexpy import helpers
}
}
user_ip_table = $('#user_ip_table').DataTable(user_ip_table_options);
clearSearchButton('user_ip_table', user_ip_table);
});
$( "#sync-tab-btn" ).one( "click", function() {
@ -341,10 +345,12 @@ from plexpy import helpers
}
}
sync_table = $('#sync_table').DataTable(sync_table_options);
history_table.column(1).visible(false);
sync_table.column(1).visible(false);
var colvis_sync = new $.fn.dataTable.ColVis( sync_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' } );
$( colvis_sync.button() ).appendTo('#button-bar-sync');
clearSearchButton('sync_table', sync_table);
});
// Load edit user modal