PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.4
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.4
6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 All 35 releases
automatorwp / integrations / mailchimp / assets / js / automatorwp-mailchimp.min.js

automatorwp-mailchimp.min.js in AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI 6.0.4, at integrations/mailchimp/assets/js/automatorwp-mailchimp.min.js

1 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(t){var a="automatorwp_mailchimp_";t("body").on("click","#automatorwp_save_mailchimp_oauth",(function(e){e.preventDefault();var i=t(this).parent().find("#awp_mailchimp_oauth_status"),o={action:"automatorwp_mailchimp_save_oauth_credentials",nonce:automatorwp_mailchimp.nonce,api_key:t("#"+a+"api_key").val(),server_prefix:t("#"+a+"server_prefix").val()};t.post(ajaxurl,o,(function(t){t.success?(i.css("width","fit-content"),i.addClass("automatorwp-notice-success"),i.html("Credentials Saved!"),i.slideDown("fast")):0==o.api_key.length||0==o.server_prefix.length?(i.css("width","fit-content"),i.addClass("automatorwp-notice-error"),i.html("All fields are required to connect with Mailchimp"),i.slideDown("fast")):(i.css("width","fit-content"),i.addClass("automatorwp-notice-error"),i.html("Either Credentials are invalid or Mailchimp API is not accessible"),i.slideDown("fast"))}))})),t("body").on("click","#automatorwp_remove_mailchimp_oauth",(function(a){a.preventDefault(),t("#awp_mailchimp_oauth_status").text("Removing Credentials...(wait)");var e={action:"automatorwp_mailchimp_delete_oauth_credentials",nonce:automatorwp_mailchimp.nonce};t.post(ajaxurl,e,(function(a){t("#awp_mailchimp_oauth_status").text("Credentials Removed! Refresh this page. "),setTimeout((function(){location.reload()}),100)}))})),t("body").on("change",".automatorwp-action-mailchimp-user-add-tag .cmb2-id-audience select",(function(a){var e=t(this).closest(".cmb-row"),i=e.next(".cmb2-id-tags"),o=t(this).val(),n=e.hasClass("is-option-change");if("any"===o||""===o)n?i.hide():i.slideUp("fast");else{var s=i.find("select.select2-hidden-accessible");s.next(".select2").remove(),s.data("table",o),s.removeAttr("data-select2-id"),automatorwp_ajax_selector(s),n?i.show():i.slideDown("fast")}e.removeClass("is-option-change")})),t("body").on("click",".automatorwp-automation-item-label > .automatorwp-option",(function(a){var e=t(this).closest(".automatorwp-automation-item"),i=t(this).data("option"),o=e.find('.automatorwp-option-form-container[data-option="'+i+'"]').find(".cmb2-id-audience");void 0!==o&&(o.addClass("is-option-change"),o.find("select.select2-hidden-accessible").trigger("change"))}))}(jQuery);