Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new a(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 s(){var s=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){s.addClass("loaded")},100),a.on("click",function(){s.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");s.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){s.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){s.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(s){if(s.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 a=e(this).data("callback");return!a||void 0===t[a]||(t[a](this),!1)})}function a(){var t,s=e(".merlin__body"),a=e("#child-theme-text");function n(e){void 0!==e.done?(setTimeout(function(){a.addClass("lead")},0),setTimeout(function(){a.addClass("success"),a.html(e.message)},600),t()):(a.addClass("lead error"),a.html(e.error))}return{init:function(a){var i;t=function(){setTimeout(function(){e(".saswp_branding").hide(),e(".merlin__body").addClass("js--finished")},0),s.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},1200),setTimeout(function(){window.location.href=a.href},1200)},i={action:"saswp_add_new_save_steps_data",wpnonce:saswp_add_new_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select, textarea").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":i[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?i[jQuery(this).attr("name")]=1:i[jQuery(this).attr("name")]=0;break;default:0==jQuery(this).prop("disabled")&&(i[jQuery(this).attr("name")]=jQuery(this).val())}}),jQuery.post(saswp_add_new_params.ajaxurl,i,n).fail(n)}}}return{init:function(){this,e(s)},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(".social-fields").find("input[type=text]").show()}else e.parent(".social-fields").find("input[type=text]").val("").hide()}function s(){var t="";e("select#schema_type option:selected").val()&&(t=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(t=e(".saswp-tab-links.selected").attr("saswp-schema-type")),t&&e(".saswp-enable-rating-review-"+t.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).hide()}).change()}e(".social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".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 s=t.attr("name");s=s.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()}),e(".saswp-schame-type-select").select2(),e(".saswp-schame-type-select").change(function(){var t=e(this).val();e(".saswp-option-table-class tr").each(function(t,s){t>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==t||"Article"==t||"Blogposting"==t||"NewsArticle"==t||"WebPage"==t?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==t&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Review"==t&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),e(".saswp-schem-type-note").addClass("saswp_hide"),s()}).change(),e(".saswp-local-sub-type-2").select2(),e("#saswp_business_type").select2(),e("#saswp_business_type").change(function(){var t=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(t,s){t>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+t+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+t+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),s()}).change(),s()});