File "tribe-datatables.min.js"
Full Path: /home/londdqdw/public_html/06/wp-content/plugins/the-events-calendar/common/src/resources/js/tribe-datatables.min.js
File size: 4.27 KB
MIME-type: text/plain
Charset: utf-8
/**
* This JS file was auto-generated via Terser.
*
* Contributors should avoid editing this file, but instead edit the associated
* non minified file file. For more information, check out our engineering docs
* on how we handle JS minification in our engineering docs.
*
* @see: https://evnt.is/dev-docs-minification
*/
window.tribe_data_table=null,function($){"use strict";$.fn.tribeDataTable=function(options){var settings=$.extend({language:{lengthMenu:tribe_l10n_datatables.length_menu,emptyTable:tribe_l10n_datatables.emptyTable,info:tribe_l10n_datatables.info,infoEmpty:tribe_l10n_datatables.info_empty,infoFiltered:tribe_l10n_datatables.info_filtered,zeroRecords:tribe_l10n_datatables.zero_records,search:tribe_l10n_datatables.search,paginate:{next:tribe_l10n_datatables.pagination.next,previous:tribe_l10n_datatables.pagination.previous},aria:{sortAscending:tribe_l10n_datatables.aria.sort_ascending,sortDescending:tribe_l10n_datatables.aria.sort_descending},select:{rows:{0:tribe_l10n_datatables.select.rows[0],_:tribe_l10n_datatables.select.rows._,1:tribe_l10n_datatables.select.rows[1]}}},lengthMenu:[[10,25,50,-1],[10,25,50,tribe_l10n_datatables.pagination.all]]},options),only_data=!1;this.is(".dataTable")&&(only_data=!0);var methods={setVisibleCheckboxes:function($table,table,value){var $thead=$table.find("thead"),$tfoot=$table.find("tfoot"),$header_checkbox=$thead.find(".column-cb input:checkbox"),$footer_checkbox=$tfoot.find(".column-cb input:checkbox");void 0===value&&(value=!1),$table.find("tbody .check-column input:checkbox").prop("checked",value),$header_checkbox.prop("checked",value),$footer_checkbox.prop("checked",value),value?(table.rows({page:"current"}).select(),methods.addGlobalCheckboxLine($table,table)):($table.find(".tribe-datatables-all-pages-checkbox").remove(),table.rows().deselect())},addGlobalCheckboxLine:function($table,table){$table.find(".tribe-datatables-all-pages-checkbox").remove();var $thead=$table.find("thead"),$link=$("<a>").attr("href","#select-all").text(tribe_l10n_datatables.select_all_link),$text=$("<div>").css("text-align","center").text(tribe_l10n_datatables.all_selected_text).append($link),$column=$("<th>").attr("colspan",table.columns()[0].length).append($text),$row=$("<tr>").addClass("tribe-datatables-all-pages-checkbox").append($column);$link.one("click",(function(event){return table.rows().select(),$link.text(tribe_l10n_datatables.clear_selection).one("click",(function(){return methods.setVisibleCheckboxes($table,table,!1),event.preventDefault(),!1})),event.preventDefault(),!1})),$thead.append($row)},togglePageCheckbox:function($checkbox,table){var $table=$checkbox.closest(".dataTable");methods.setVisibleCheckboxes($table,table,$checkbox.is(":checked"))},toggleRowCheckbox:function($checkbox,table){var $row=$checkbox.closest("tr");if($checkbox.is(":checked")){table.row($row).select();let $checkCells=$checkbox.closest(".dataTable tbody").find(".check-column");for(let checkCell of $checkCells){let checkboxInput=checkCell.querySelector("input"),thisRow=checkCell.closest("tr");checkboxInput.checked&&table.row(thisRow).select()}}else table.row($row).deselect(),$checkbox.closest(".dataTable").find("thead .column-cb input:checkbox, tfoot .column-cb input:checkbox").prop("checked",!1)},toggleMultipleRowCheckboxes:function($checkbox,table){const $checkCells=$checkbox.closest(".dataTable tbody").find(".check-column");for(let checkCell of $checkCells){const checkboxInput=checkCell.querySelector("input"),thisRow=checkCell.closest("tr");checkboxInput.checked&&table.row(thisRow).select()}}};return this.each((function(){var table,$el=$(this);table=only_data?$el.DataTable():$el.DataTable(settings),window.tribe_data_table=table,void 0!==settings.data&&(table.clear().draw(),table.rows.add(settings.data),table.draw());var resetSelection=function(event,settings){methods.setVisibleCheckboxes($el,table,!1)};$el.on({"order.dt":resetSelection,"search.dt":resetSelection,"length.dt":resetSelection}),$el.on("click","thead .column-cb input:checkbox, tfoot .column-cb input:checkbox",(function(){methods.togglePageCheckbox($(this),table)})),$el.on("click","tbody .check-column input:checkbox",(function(){methods.toggleRowCheckbox($(this),table)})),$el.on("change","tbody .check-column input:checkbox",(function(){methods.toggleMultipleRowCheckboxes($(this),table)}))}))}}(jQuery);