Current File : /home/kelaby89/muzza.fit/wp-content/plugins/mp-timetable/media/js/mptt-option-ajax.min.js |
window.wp=window.wp||{},window.wp["./media/js/mptt-option-ajax.min.js"]=function(t){var e={};function n(a){if(e[a])return e[a].exports;var s=e[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(a,s,function(e){return t[e]}.bind(null,s));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}({4:function(t,e){!function(t){"use strict";t(document).ready((function(){var e;t(document).on("click",".motopress-offer-secondary .plugin-item .action-button .button",(function(n){var a=this;n.preventDefault();var s=t(this).closest(".actions").find(".status-label"),i=t(this).data("path");if(s.hasClass("inactive"))e="activate";else{if(!s.hasClass("not-installed"))return;e="install"}t.post({url:MPTT.ajax_url,data:{nonce:MPTT.nonce,action:"install_plugin_ajax",status:e,plugin:i},beforeSend:function(){t(a).html("".concat(MPTT.status_loading))},success:function(e){e.success?e.data.is_activated?(s.removeClass("inactive").addClass("active").html("".concat(MPTT.status_active)),t(a).addClass("disabled").html("".concat(MPTT.status_activated))):(s.removeClass("not-installed").addClass("inactive").html("".concat(MPTT.status_inactive)),t(a).removeClass("button button-primary").addClass("button button-secondary").html("".concat(MPTT.status_activate))):(t(".wp-heading-inline")[0]&&t(".wp-heading-inline").after('<div class="error notice is-dismissible"><p>'+e.data+'</p><button id="my-dismiss-admin-message" class="notice-dismiss" type="button"><span class="screen-reader-text">Dismiss this notice.</span></button></div>'),t(a).html("".concat(MPTT.status_download)))}}).fail((function(t){console.log(t.responseText)}))}))}))}(window.jQuery)}});