Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ var ajaxurl=saswp_install_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new i(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function n(){var n=e(".merlin__body"),i=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){n.addClass("loaded")},100),i.on("click",function(){n.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");n.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){n.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){n.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(n){if(n.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var i=e(this).data("callback");return!i||void 0===t[i]||(t[i](this),!1)})}function i(){var t,n=e(".merlin__body"),i=e("#child-theme-text");function a(e){void 0!==e.done?(setTimeout(function(){i.addClass("lead")},0),setTimeout(function(){i.addClass("success"),i.html(e.message)},600),t()):(i.addClass("lead error"),i.html(e.error))}return{init:function(i){var s;t=function(){setTimeout(function(){e(".saswp_branding").hide(),e(".merlin__body").addClass("js--finished")},0),n.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},1200),setTimeout(function(){window.location.href=i.href},1200)},s={action:"saswp_save_installer",wpnonce:saswp_install_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":s[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?s[jQuery(this).attr("name")]=1:s[jQuery(this).attr("name")]=0;break;default:s[jQuery(this).attr("name")]=jQuery(this).val()}}),jQuery.post(saswp_install_params.ajaxurl,s,a).fail(a)}}}return{init:function(){this,e(n)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".saswp-social-fields").find("input[type=text]").show()}else e.parent(".saswp-social-fields").find("input[type=text]").val("").hide()}e(".saswp-social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".saswp-social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var n=t.attr("name");n=n.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()})});