index of
/
home
/
thefkyzp
/
www
/
wp-content
/
plugins
/
ocean-extra
/
includes
/
panel
/
assets
/
js
/
File: /home/thefkyzp/www/wp-content/plugins/ocean-extra/includes/panel/assets/js/installer.min.js
var oe_installer=oe_installer||{};jQuery(document).ready(function(a){"use strict";var b=!1;oe_installer.install_plugin=function(c,d){var e=confirm(oe_installer_localize.install_now);e&&(b=!0,c.addClass("installing"),a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_installer",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status?(c.attr("class","activate button button-primary"),c.html(oe_installer_localize.activate_btn)):c.removeClass("installing"),b=!1},error:function(a,d,e){console.log(d),c.removeClass("installing"),b=!1}}))},oe_installer.activate_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},oe_installer.activate_premium_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_premium_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},a(document).on("click",".oe-plugin-installer a.button:not(.premium-link)",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("install")&&oe_installer.install_plugin(d,e),d.hasClass("activate")&&oe_installer.activate_plugin(d,e)}}),a(document).on("click",".oe-plugin-installer a.button.premium-activation",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("activate")&&oe_installer.activate_premium_plugin(d,e)}})});