File "term-ordering.min.js"

Full Path: /home/warrior1/public_html/languages/wp-content-20241001222009/plugins/woocommerce/assets/js/admin/term-ordering.min.js
File size: 2.45 KB
MIME-type: text/plain
Charset: utf-8

jQuery(function(c){var l="table.wp-list-table",s='.column-handle input[name="term_id"]',i='<td class="column-handle"></td>';0===c(l).find(".column-handle").length&&(c(l).find("tr:not(.inline-edit-row)").append(i),s=".check-column input"),window.wcTracks=window.wcTracks||{},window.wcTracks.recordEvent=window.wcTracks.recordEvent||function(){},c(l).find(".column-handle").show(),c.wc_add_missing_sort_handles=function(){var e=c(l).find("tbody > tr"),n=c(l).find("tbody > tr > td.column-handle").parent();e.length!==n.length&&e.each(function(e,t){n.is(t)||c(t).append(i)}),c(l).find(".column-handle").show()},c(document).ajaxComplete(function(e,t,n){t&&4===t.readyState&&200===t.status&&n.data&&(0<=n.data.indexOf("_inline_edit")||0<=n.data.indexOf("add-tag"))&&(c.wc_add_missing_sort_handles(),c(document.body).trigger("init_tooltips"))}),c(l).sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",handle:".column-handle",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(e,t){t.item.hasClass("alternate")||t.item.css("background-color","#ffffff"),t.item.children("td, th").css("border-bottom-width","0"),t.item.css("outline","1px solid #aaa")},stop:function(e,t){t.item.removeAttr("style"),t.item.children("td, th").css("border-bottom-width","1px")},update:function(e,t){var n,i,d=t.item.find(s).val(),o=t.item.find(".parent").html(),a=t.item.prev().find(s).val(),r=t.item.next().find(s).val();a!==undefined&&(n=t.item.prev().find(".parent").html())!==o&&(a=undefined),r!==undefined&&(i=t.item.next().find(".parent").html())!==o&&(r=undefined),a===undefined&&r===undefined||r===undefined&&i===a||r!==undefined&&n===d?c(l).sortable("cancel"):(window.wcTracks.recordEvent("product_attributes_ordering_term",{is_category:"product_cat"===woocommerce_term_ordering_params.taxonomy?"yes":"no"}),t.item.find(".check-column input").hide(),t.item.find(".check-column").append('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),c.post(ajaxurl,{action:"woocommerce_term_ordering",id:d,nextid:r,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(e){"children"===e?window.location.reload():(t.item.find(".check-column input").show(),t.item.find(".check-column").find("img").remove())}),c("table.widefat tbody tr").each(function(){jQuery("table.widefat tbody tr").index(this)%2==0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});