Bug-fix-patch4

# handling exception in while adding language
# Implemented Yajra in users list table
# custom filter and veiw option in users list table
This commit is contained in:
Manish Verma
2016-12-20 19:33:23 +05:30
parent 1f8cda3875
commit 78f6a13528
11 changed files with 220 additions and 98 deletions

View File

@@ -7,8 +7,9 @@ foreach($segments as $seg){
?>
<script type="text/javascript">
jQuery(document).ready(function () {
var show = 'active';
oTable = myFunction(show);
var show = 'all';
var searchTerm = '';
oTable = myFunction(show, searchTerm);
$("select[name=type_of_profile]").change(function () {
//alert($('select[name=type_of_profile]').val());
@@ -19,29 +20,73 @@ foreach($segments as $seg){
function myFunction(show)
{
return jQuery('#chumper').dataTable({
"sDom": "<'row'<'col-xs-6'l><'col-xs-6'>r>"+
"t"+
"<'row'<'col-xs-6'i><'col-xs-6'p>>",
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"ajax": {
url: "{{url('user-list')}}",
data: function (d) {
d.profiletype = show;
d.searchTerm = searchTerm;
}
}
});
}
$('.active').on('click', function(){
$('.all').on('click', function(){
show = 'all';
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
});
$('.active-users').on('click', function(){
show = 'active';
$("#chumper").dataTable().fnDestroy();
myFunction(show);
myFunction(show, searchTerm);
});
$('.inactive').on('click', function(){
show = 'inactive';
$("#chumper").dataTable().fnDestroy();
myFunction(show);
myFunction(show, searchTerm);
});
});
$('.agents').on('click', function(){
show = 'agents';
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
});
$('.users').on('click', function(){
show = 'users';
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
});
$('.banned').on('click', function(){
show = 'banned';
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
});
$('.deleted').on('click', function(){
show = 'deleted';
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
});
document.getElementById('search-text').onkeypress = function(e){
if (!e) e = window.event;
var keyCode = e.keyCode || e.which;
if (keyCode == '13'){
searchTerm = $('input[name=search]').val();
$("#chumper").dataTable().fnDestroy();
myFunction(show, searchTerm);
}
}
});
</script>