PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins
/
sf-booking
/
admin
/
modules
/
notifications
/
resources
/***************************************************************************** * * copyright(c) - aonetheme.com - Service Finder Team * More Info: http://aonetheme.com/ * Coder: Service Finder Team * Email: contact@aonetheme.com * ******************************************************************************/ // When the browser is ready... jQuery(function() { 'use strict'; var dataTable = ''; dataTable = jQuery('#admin-notifications-grid').DataTable({ "processing": true, "dom": '<"fixed-table-toolbar clearfix"lf><"table-responsive"t><"fixed-table-pagination clearfix"pi>', "order": [[ 0, "desc" ]], "columns": [ { "data": "notificationid", "visible": false}, { "class": 'delete-control', "orderable": false, "data": "delete", "defaultContent": '' }, { "data": "date" }, { "data": "title"}, { "data": "notice"}, ], "columnDefs": [ { "targets": [ 1 ], "searchable": false, "orderable": false, }, { "targets": [ 2 ], "searchable": true, "orderable": true, }, { "targets": [ 3 ], "searchable": true, "orderable": true }, { "targets": [ 4 ], "searchable": true, "orderable": true } ], "language": { "processing": "<div></div><div></div><div></div><div></div><div></div>", "paginate": { "next": "<i class='fa fa-angle-right'></i>", "previous": "<i class='fa fa-angle-left'></i>" }, "sEmptyTable": param.sEmptyTable, "sInfo": param.sInfo, "sInfoEmpty": param.sInfoEmpty, "sInfoFiltered": param.sInfoFiltered, "sInfoPostFix": "", "sInfoThousands": ",", "sLengthMenu": param.sLengthMenu, "sLoadingRecords": param.sLoadingRecords, "sProcessing": param.sProcessing, "sSearch": param.sSearch, "sZeroRecords": param.sZeroRecords, "oPaginate": { "sFirst": param.sFirst, "sLast": param.sLast, "sNext": param.sNext, "sPrevious": param.sPrevious, }, "oAria": { "sSortAscending": param.sSortAscending, "sSortDescending": param.sSortDescending } }, "ajax":{ url :ajaxurl, type: "post", data: {"action": "get_admin_notifications"}, error: function(){ }, }, "initComplete": function( settings, json ) { var rowCount = jQuery(this).find('>tbody >tr').length; if(rowCount == 1) { jQuery(this).find('>tbody >tr').addClass('sf-single-tablerow'); } jQuery('[data-toggle="tooltip"]').tooltip(); jQuery('select').selectpicker(); jQuery("[data-toggle=popover]").each(function() { jQuery(this).popover({ html: true, content: function() { var id = jQuery(this).attr('id') return jQuery('#popover-content-' + id).html(); } }); }); }, "drawCallback": function( settings, json ) { jQuery('[data-toggle="tooltip"]').tooltip(); jQuery('select').selectpicker(); jQuery("[data-toggle=popover]").each(function() { jQuery(this).popover({ html: true, content: function() { var id = jQuery(this).attr('id') return jQuery('#popover-content-' + id).html(); } }); }); } }); function updatepopupover() { jQuery("[data-toggle=popover]").each(function() { jQuery(this).popover({ html: true, content: function() { var id = jQuery(this).attr('id') return jQuery('#popover-content-' + id).html(); } }); }); } jQuery("#bulkAdminNotificationDelete").on('click',function() { // bulk checked var status = this.checked; jQuery(".deleteNotificationRow").each( function() { jQuery(this).prop("checked",status); }); }); jQuery('#deleteNotificationTriger').on("click", function(event){ // triggering delete one by one if( jQuery('.deleteNotificationRow:checked').length > 0 ){ // at-least one checkbox checked bootbox.confirm(param.are_you_sure, function(result) { if(result){ var ids = []; jQuery('.deleteNotificationRow').each(function(){ if(jQuery(this).is(':checked')) { ids.push(jQuery(this).val()); } }); var ids_string = ids.toString(); // array to string conversion jQuery.ajax({ type: "POST", url: ajaxurl, data: {action: "delete_admin_notifications", data_ids:ids_string}, success: function(result) { dataTable.ajax.reload(updatepopupover, false); }, async:false }); } }); }else{ bootbox.alert(param.select_checkbox); } }); /*End City Table*/ });
[+]
..
[-] notifications.js
[edit]