|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/public_html/wp-content/plugins/security-malware-firewall/js/ |
Upload File : |
function spbc_reload_accordion(){spbc_sendAJAXRequest({action:"spbc_scanner_tab__reload_accordion"},{notJson:!0,callback:function(t,e,n,a){jQuery(a).accordion("destroy"),jQuery(a).html(t),jQuery(a).accordion({header:"h3",heightStyle:"content",collapsible:!0,active:!1}),spbc_tbl__bulk_actions__listen(),spbc_tbl__row_actions__listen(),spbc_tbl__pagination__listen(),spbc_tbl__sort__listen(),spbcStartShowHide()}},jQuery("#spbc_scan_accordion"))}function spbc_tbl__bulk_actions__listen(){jQuery(".tbl-bulk_actions-all--apply").off("click").on("click",function(){var n,t,e;spbc_scanner.active?alert(spbcTableLocalize.scannerIsActive):(e=jQuery(this),n=e.siblings("select").children()[e.siblings("select").first()[0].selectedIndex].value,console.log(e),-1!==["approve","disapprove","send","check_analysis_status"].indexOf(n)?confirm(spbcTable.warning_bulk)&&(console.log("spbc_tbl__bulk_action_all__listen click"),t={action:"spbc_tbl-action--bulk",add_action:n,status:e.parents(".tbl-root").attr("type")},e={button:this,spinner:e.children(".tbl-preloader--small"),callback:function(t){var e;spbc_reload_accordion(),"check_analysis_status"===n&&(e="<p> Analysis status updated. Total: "+t.counters.total+", updated: "+t.counters.updated+", skipped: "+t.counters.skipped+", failed: "+t.counters.failed+", queued: "+t.counters.queued+"</p>",spbcModal.open().put(e)),"send"===n&&(e="<p> Files have been sent: "+t.files_sent_counter+"</p>",spbcModal.open().put(e))},errorOutput:function(t,e){e&&(t=t+"<br>Additional information:<br>"+e),spbcModal.open().putError(t)},timeout:6e4},spbc_sendAJAXRequest(t,e)):alert("This action is not supported for all files yet =("))}),jQuery(".tbl-bulk_actions--apply").off("click").on("click",function(){var t,e;(spbc_bulk_action||confirm(spbcTable.warning_bulk))&&(t=spbc_bulk_action||jQuery(this),"-1"!==(e=(spbc_bulk_action=t).siblings("select").children()[t.siblings("select").first()[0].selectedIndex].value)&&t.parents(".tbl-root").find(".cb-select").is(":checked")?(t.children(".tbl-preloader--small").show(),t.parents(".tbl-root").find(".cb-select:checked").first().parents("tr").find(".tbl-row_action--"+e)[0]?(t.parents(".tbl-root").find(".cb-select:checked").first().parents("tr").find(".tbl-row_action--"+e).click(),t.parents(".tbl-root").find(".cb-select:checked").first().prop("checked",!1)):(t.parents(".tbl-root").find(".cb-select:checked").first().prop("checked",!1),t.click())):(t.children(".tbl-preloader--small").hide(),spbc_bulk_action=null,"check_analysis_status"===e&&spbcModal.open().put("<p> All available files are updated.</p>"),"send"===e&&spbcModal.open().put("<p> All available files are sent.</p>"),setTimeout(spbc_reload_accordion,1900)))})}function spbc_tbl__row_actions__listen(){jQuery(".tbl-row_action--ajax").off("click").on("click",function(){var t,e,n,a;console.log("spbc_tbl__row_actions__listen click"),spbc_scanner.active?alert(spbcTableLocalize.scannerIsActive):(e={action:"spbc_tbl-action--row",add_action:(t=jQuery(this)).attr("row-action"),id:t.parents(".row-actions").attr("uid"),cols:t.parents(".row-actions").attr("cols_amount")},n={callback:spbc_tbl__row_actions__callback,errorOutput:function(t){spbcModal.open().putError(t)},spinner:t.parents(".row-actions").children(".tbl-preloader--tiny")},!spbc_bulk_action&&(a=spbcTable["warning_"+t.attr("row-action")]||spbcTable.warning_default,"copy_file_info"===e.add_action||confirm(a))&&spbc_sendAJAXRequest(e,n,t.parents("tr")),spbc_bulk_action&&spbc_sendAJAXRequest(e,n,t.parents("tr")))})}function spbc_tbl__row_actions__callback(t,e,n,a){if(t.color&&a.css({background:t.background,color:t.color}),t.html&&(a.parent().parent().parent().prepend(t.html),setTimeout(function(){a.fadeOut(300)},1500),spbc_bulk_action||setTimeout(spbc_reload_accordion,1900)),"copy_file_info"===e.add_action&&(!0===t.success&&t.data.file_info?window.prompt("Copy the file info below and send it to support@cleantalk.org: ",t.data.file_info):(s=void 0!==t.data.error?t.data.error:"Unknown copy_file_info error",spbcModal.open().putError(s))),t.temp_html){var c=a.html();if(a.html(t.temp_html),void 0!==t.updated_template){var s=t.updated_template_type,t=t.updated_template,i=jQuery(t).find(".wp-list-table tbody tr").length,o=jQuery('[aria-controls="spbc_scan_accordion_tab_'+s+'"]');if(0<o.length){var l=jQuery("#spbc_tbl__scanner_"+s);jQuery(".spbc_bad_type_count."+s+"_counter").text(i);let n=l.find(".wp-list-table tbody tr").length;l.remove(),jQuery("#spbc_scan_accordion_tab_"+s).append(t),jQuery(jQuery("#spbc_scan_accordion_tab_"+s).find(".wp-list-table tbody tr")).each(function(t,e){++t>n&&jQuery(e).css("outline","1px solid green")}),o.click()}else"analysis_log"===s&&(l='<h3 class="ui-accordion-header ui-corner-top ui-state-default ui-accordion-icons ui-accordion-header-collapsed ui-corner-all" role="tab" id="ui-id-2" aria-controls="spbc_scan_accordion_tab_analysis_log" aria-selected="false" aria-expanded="false" tabindex="-1"><span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a href="#">Analysis Log (<span class="spbc_bad_type_count analysis_log_counter">'+i+"</span>)</a></h3>",s='<div id="spbc_scan_accordion_tab_analysis_log" class="ui-accordion-content ui-corner-bottom ui-helper-reset ui-widget-content" aria-labelledby="ui-id-2" role="tabpanel" aria-hidden="true" style="display: none;"><p class="spbc_hint">Files sent for analysis.</p><div id="spbc_tbl__scanner_analysis_log" type="analysis_log" class="tbl-root">'+t+"</div>",jQuery("#spbc_scan_accordion_tab_critical").after(l+s),o.click())}setTimeout(function(){a.html(c).css({background:"inherit"}).find(".column-primary .row-actions .tbl-row_action--"+e.add_action).remove(),spbc_tbl__bulk_actions__listen(),spbc_tbl__row_actions__listen(),spbcStartShowHide()},5e3)}spbc_bulk_action&&spbc_bulk_action.click()}function spbc_tbl__pagination__listen(){var n={action:"spbc_tbl-pagination"},a={callback:spbc_tbl__pagination__callback,notJson:!0};jQuery(".tbl-pagination--button").on("click",function(){jQuery(this).parents(".tbl-root").find(".tbl-pagination--button").attr("disabled","disabled")}),jQuery(".tbl-pagination--go").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root");n.page=t.siblings(".tbl-pagination--curr_page").val(),n.type=e.attr("type"),a.spinner=t.siblings(".tbl-preloader--small"),spbc_sendAJAXRequest(n,a,e)}),jQuery(".tbl-pagination--prev").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root");n.page=t.parents(".tbl-pagination--wrapper").attr("prev_page"),n.type=e.attr("type"),a.spinner=t.siblings(".tbl-preloader--small"),spbc_sendAJAXRequest(n,a,e)}),jQuery(".tbl-pagination--next").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root");n.page=t.parents(".tbl-pagination--wrapper").attr("next_page"),n.type=e.attr("type"),a.spinner=t.siblings(".tbl-preloader--small"),spbc_sendAJAXRequest(n,a,e)}),jQuery(".tbl-pagination--end").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root");n.page=t.parents(".tbl-pagination--wrapper").attr("last_page"),n.type=e.attr("type"),a.spinner=t.siblings(".tbl-preloader--small"),spbc_sendAJAXRequest(n,a,e)}),jQuery(".tbl-pagination--start").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root");n.page=1,n.type=e.attr("type"),a.spinner=t.siblings(".tbl-preloader--small"),spbc_sendAJAXRequest(n,a,e)})}function spbc_scanner__switch_table(t,e){t=jQuery(t),console.log(t.parents(".row-actions").attr("uid")),e={action:"spbc_tbl-switch",type:e,domain:t.parents(".row-actions").attr("uid")};spbc_sendAJAXRequest(e,{callback:spbc_tbl__pagination__callback,notJson:!0},t.parents(".tbl-root"))}function spbc_tbl__pagination__callback(t,e,n,a){jQuery(a).html(t).find(".tbl-pagination--button").removeAttr("disabled"),spbc_tbl__bulk_actions__listen(),spbc_tbl__row_actions__listen(),spbc_tbl__pagination__listen(),spbc_tbl__sort__listen(),spbcStartShowHide()}function spbc_tbl__sort__listen(){var n={callback:spbc_tbl__sort__callback,notJson:!0};jQuery(".tbl-column-sortable").on("click",function(){var t=jQuery(this),e=t.parents(".tbl-root"),t={action:"spbc_tbl-sort",order_by:t.attr("id"),order:t.attr("sort_direction"),type:e.attr("type")};spbc_sendAJAXRequest(t,n,e)})}function spbc_tbl__sort__callback(t,e,n,a){jQuery(a).html(t),spbc_tbl__bulk_actions__listen(),spbc_tbl__row_actions__listen(),spbc_tbl__pagination__listen(),spbc_tbl__sort__listen()}spbc_bulk_action=null,jQuery(document).ready(function(){spbc_tbl__bulk_actions__listen(),spbc_tbl__row_actions__listen(),spbc_tbl__pagination__listen(),spbc_tbl__sort__listen()});
//# sourceMappingURL=spbc-table.min.js.map