Bug-fix-patch-6
# Style and UI enhancement in users table for view filteration option.
This commit is contained in:
@@ -39,44 +39,52 @@ foreach($segments as $seg){
|
||||
|
||||
$('.all').on('click', function(){
|
||||
show = 'all';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
$('.active-users').on('click', function(){
|
||||
show = 'active';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
show = 'active-users';
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
|
||||
});
|
||||
|
||||
$('.inactive').on('click', function(){
|
||||
show = 'inactive';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
$('.agents').on('click', function(){
|
||||
show = 'agents';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
$('.users').on('click', function(){
|
||||
show = 'users';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
$('.banned').on('click', function(){
|
||||
show = 'banned';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
$('.deleted').on('click', function(){
|
||||
show = 'deleted';
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
classname = '.'+show;
|
||||
filterTable(show);
|
||||
toggleActiveClass(classname);
|
||||
});
|
||||
|
||||
document.getElementById('search-text').onkeypress = function(e){
|
||||
@@ -88,5 +96,15 @@ foreach($segments as $seg){
|
||||
myFunction(show, searchTerm);
|
||||
}
|
||||
}
|
||||
|
||||
function filterTable(show) {
|
||||
$("#chumper").dataTable().fnDestroy();
|
||||
myFunction(show, searchTerm);
|
||||
}
|
||||
|
||||
function toggleActiveClass(classname) {
|
||||
$('.active').removeClass('active');
|
||||
$(classname).parent('li').addClass('active');
|
||||
}
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user