Files
faveo/resources/views/vendor/Chumper/user-javascript.blade.php
Manish Verma 2d8e640e9b Updates
2016-12-13 18:18:25 +05:30

47 lines
1.2 KiB
PHP

<?php
$segments = \Request::segments();
$segment = "";
foreach($segments as $seg){
$segment.="/".$seg;
}
?>
<script type="text/javascript">
jQuery(document).ready(function () {
var show = 'active';
oTable = myFunction(show);
$("select[name=type_of_profile]").change(function () {
//alert($('select[name=type_of_profile]').val());
$("#chumper").dataTable().fnDestroy();
myFunction();
});
function myFunction(show)
{
return jQuery('#chumper').dataTable({
"sPaginationType": "full_numbers",
"bProcessing": true,
"ajax": {
url: "{{url('user-list')}}",
data: function (d) {
d.profiletype = show;
}
}
});
}
$('.active').on('click', function(){
show = 'active';
$("#chumper").dataTable().fnDestroy();
myFunction(show);
});
$('.inactive').on('click', function(){
show = 'inactive';
$("#chumper").dataTable().fnDestroy();
myFunction(show);
});
});
</script>