| 1 |
!function(t){t("body").on("change",".automatorwp-action-wordpress-create-post .cmb2-id-taxonomy select, .automatorwp-action-wordpress-update-post .cmb2-id-taxonomy select, .automatorwp-action-wordpress-update-multiple-posts .cmb2-id-taxonomy select, .automatorwp-action-posts-create-post .cmb2-id-taxonomy select, .automatorwp-action-posts-update-post .cmb2-id-taxonomy select, .automatorwp-action-posts-update-multiple-posts .cmb2-id-taxonomy select",function(o){var a=t(this).closest(".cmb-row"),e=a.next(".cmb2-id-post-terms"),s=t(this).val(),i=a.hasClass("is-option-change");if("any"===s||""===s)i?e.hide():e.slideUp("fast");else{var c=e.find("select.select2-hidden-accessible");c.next(".select2").remove(),c.data("table",s),c.removeAttr("data-select2-id"),automatorwp_ajax_selector(c),i?e.show():e.slideDown("fast")}a.removeClass("is-option-change")}),t("body").on("click",".automatorwp-automation-item-label > .automatorwp-option",function(o){var a=t(this).closest(".automatorwp-automation-item"),e=t(this).data("option"),s=a.find('.automatorwp-option-form-container[data-option="'+e+'"]').find(".cmb2-id-taxonomy");void 0!==s&&(s.addClass("is-option-change"),s.find("select.select2-hidden-accessible").trigger("change"))})}(jQuery); |