woocommerce/assets/js/admin/meta-boxes.min.js

1 line
1.6 KiB
JavaScript
Raw Normal View History

2017-06-19 11:49:34 +00:00
jQuery(function(t){t("#tiptip_holder").removeAttr("style"),t("#tiptip_arrow").removeAttr("style"),t(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),t("#titlediv").find("#title").keyup(function(e){if("9"===(e.keyCode||e.which)&&t("#woocommerce-coupon-description").length>0)return e.stopPropagation(),t("#woocommerce-coupon-description").focus(),!1}),t(".wc-metaboxes-wrapper").on("click",".wc-metabox > h3",function(){t(this).parent(".wc-metabox").toggleClass("closed").toggleClass("open")}),t(document.body).on("wc-init-tabbed-panels",function(){t("ul.wc-tabs").show(),t("ul.wc-tabs a").click(function(e){e.preventDefault();var o=t(this).closest("div.panel-wrap");t("ul.wc-tabs li",o).removeClass("active"),t(this).parent().addClass("active"),t("div.panel",o).hide(),t(t(this).attr("href")).show()}),t("div.panel-wrap").each(function(){t(this).find("ul.wc-tabs li").eq(0).find("a").click()})}).trigger("wc-init-tabbed-panels"),t(document.body).on("wc-init-datepickers",function(){t(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),t(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(e){t(e.target).filter(":input, option, .sort").length||t(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return t(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return t(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),t(".wc-metabox.closed").each(function(){t(this).find(".wc-metabox-content").hide()})});