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 / activecampaign / assets / js / automatorwp-activecampaign.min.js

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

6 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function($){var prefix='automatorwp-';var _prefix='automatorwp_activecampaign_';$('body').on('click','.automatorwp_settings #'+_prefix+'authorize',function(e){e.preventDefault();var button=$(this);var wrapper=button.parent();var url=$('#'+_prefix+'url').val();var key=$('#'+_prefix+'key').val();var response_wrap=wrapper.find('#'+_prefix+'response');if(!response_wrap.length){wrapper.append('<div id="'+_prefix+'response" style="display: none; margin-top: 10px;"></div>');response_wrap=wrapper.find('#'+_prefix+'response')}
2 if(url.length===0||key.length===0){response_wrap.addClass('automatorwp-notice-error');response_wrap.html('All fields are required to connect with ActiveCampaign');response_wrap.slideDown('fast');return}
3 response_wrap.slideUp('fast');response_wrap.attr('class','');wrapper.append('<span class="spinner is-active" style="float: none;"></span>');button.prop('disabled',!0);$.post(ajaxurl,{action:'automatorwp_activecampaign_authorize',nonce:automatorwp_activecampaign.nonce,url:url,key:key,},function(response){response_wrap.addClass('automatorwp-notice-'+(response.success===!0?'success':'error'));response_wrap.html((response.data.message!==undefined?response.data.message:response.data));response_wrap.slideDown('fast');wrapper.find('.spinner').remove();if(response.success===!0&&response.data.redirect_url!==undefined){window.location=response.data.redirect_url;return}
4 button.prop('disabled',!1)})});$('body').on('click','.automatorwp_settings #'+_prefix+'refresh',function(e){e.preventDefault();var button=$(this);var wrapper=button.parent();var webhook=$('#'+_prefix+'webhook').val();var response_wrap=wrapper.find('#'+_prefix+'response');if(!response_wrap.length){wrapper.append('<div id="'+_prefix+'response" style="display: none; margin-top: 10px;"></div>');response_wrap=wrapper.find('#'+_prefix+'response')}
5 response_wrap.slideUp('fast');response_wrap.attr('class','');$('<span class="spinner is-active" style="float: none;"></span>').insertAfter(button);button.prop('disabled',!0);$.post(ajaxurl,{action:'automatorwp_activecampaign_refresh',nonce:automatorwp_activecampaign.nonce,webhook:webhook,},function(response){response_wrap.addClass('automatorwp-notice-'+(response.success===!0?'success':'error'));response_wrap.html((response.data.message!==undefined?response.data.message:response.data));response_wrap.slideDown('fast');wrapper.find('.spinner').remove();if(response.success===!0&&response.data.redirect_url!==undefined){window.location=response.data.redirect_url;return}
6 button.prop('disabled',!1)})});$('body').on('click','.automatorwp-view-webhook',function(e){e.preventDefault();$(this).parent().next().slideDown('fast')})})(jQuery)