Files
old-gravityflow/js/frontend.min.js
Almira Krdzic 60fe7f93e5 Initial commit
2018-08-06 15:41:19 +02:00

1 line
1.2 KiB
JavaScript

!function(e,r){r(document).ready(function(){var i,t,n,o,h=!1;r("tbody").children().children(".check-column").find(":checkbox").click(function(e){if("undefined"==e.shiftKey)return!0;if(e.shiftKey){if(!h)return!0;i=r(h).closest("form").find(":checkbox"),t=i.index(h),n=i.index(this),o=r(this).prop("checked"),0<t&&0<n&&t!=n&&(t<n?i.slice(t,n):i.slice(n,t)).prop("checked",function(){return!!r(this).closest("tr").is(":visible")&&o})}var c=r(h=this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return r(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),r("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(e){var c=r(this),i=c.closest("table"),t=c.prop("checked"),n=e.shiftKey||c.data("wp-toggle");i.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!r(this).is(":hidden")&&(n?!r(this).prop("checked"):!!t)}),i.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!n&&!!t})})})}(window.GravityFlowFrontEnd=window.GravityFlowFrontEnd||{},jQuery);