| 5 |
"use strict";function wow_attach_tooltips(e){e.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"wow-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function itemadd(e){e="adding-menu-"+e;var s=1*jQuery("."+e+" fieldset").length+1;jQuery("#"+e+" .item").text(s),jQuery("#"+e).clone().removeAttr("id").appendTo("."+e),refreashel()}function refreashel(){jQuery(".icons").css("display","none"),jQuery(".wp-color-picker-field").not("#clone .wp-color-picker-field").wpColorPicker(),jQuery(".icons").not("#clone .icons").fontIconPicker({theme:"fip-darkgrey",emptyIcon:!1,allCategoryText:"Show all"}),wow_attach_tooltips(jQuery(".wow-help").not("#clone .wow-help"))}function itemremove(e){e="adding-menu-"+e;jQuery("."+e+" fieldset").last().remove()}function checkboxchecked(e){jQuery(e).prop("checked")?jQuery(e).siblings('input[type="hidden"]').val("1"):jQuery(e).siblings('input[type="hidden"]').val("0")}function itemtype(e){var s=jQuery(e).val(),i=jQuery(e).parents(".container");jQuery(i).find(".type-link-blank").css("visibility","hidden "),jQuery(e).parents(".menu_block").find(".button_id").css("visibility","visible"),jQuery(e).parents(".menu_block").find(".button_class").css("visibility","visible"),"link"===s||"smoothscroll"===s||"email"===s||"telephone"===s?(jQuery(i).find(".type-link").css("display","block"),jQuery(i).find(".type-share").css("display","none"),jQuery(i).find(".type-modal").css("display","none"),jQuery(i).find(".type-link-text").text("Link"),"link"===s?jQuery(i).find(".type-link-blank").css("visibility","visible"):"email"===s?jQuery(i).find(".type-link-text").text("Email"):"telephone"===s&&jQuery(i).find(".type-link-text").text("Telephone")):"share"===s?(jQuery(i).find(".type-link").css("display","none"),jQuery(i).find(".type-share").css("display","block"),jQuery(i).find(".type-modal").css("display","none")):"login"===s||"logout"===s||"lostpassword"===s?(jQuery(i).find(".type-link").css("display","block"),jQuery(i).find(".type-share").css("display","none"),jQuery(i).find(".type-link-text").text("Redirect URL"),jQuery(i).find(".type-modal").css("display","none")):"id"==s||"class"==s||"modal"==s?(jQuery(i).find(".type-link").css("display","none"),jQuery(i).find(".type-share").css("display","none"),jQuery(i).find(".type-modal").css("display","block"),jQuery(e).parents(".menu_block").find(".button_id").css("visibility","hidden"),jQuery(e).parents(".menu_block").find(".button_class").css("visibility","hidden")):(jQuery(i).find(".type-link").css("display","none"),jQuery(i).find(".type-share").css("display","none"),jQuery(i).find(".type-modal").css("display","none"))}function itemtooltip(e){jQuery(e).is(":checked")?jQuery(e).siblings(".item-tooltip").css("display","block"):jQuery(e).siblings(".item-tooltip").css("display","none")}function customicon(e){jQuery(".icons").css("display","none"),jQuery(e).is(":checked")?(jQuery(e).siblings(".custom-icon-url").css("display","block"),jQuery(e).siblings(".icons-selector").css("display","none")):(jQuery(e).siblings(".custom-icon-url").css("display","none"),jQuery(e).siblings(".icons-selector").css("display","block"))}function languages(e){jQuery(e).is(":checked")?jQuery("#language").css("display",""):jQuery("#language").css("display","none")}function showchange(e){var s=jQuery(e).val();"posts"===s||"pages"===s||"expost"===s||"expage"===s||"taxonomy"===s?(jQuery("#id_post").css("display",""),jQuery("#shortcode").css("display","none")):"shortecode"===s?(jQuery("#shortcode").css("display",""),jQuery("#id_post").css("display","none")):(jQuery("#shortcode").css("display","none"),jQuery("#id_post").css("display","none")),"taxonomy"===s?jQuery("#taxonomy").css("display",""):jQuery("#taxonomy").css("display","none")}function screen_less(e){jQuery(e).is(":checked")?jQuery("#screen").css("display",""):jQuery("#screen").css("display","none")}function screen_more(e){jQuery(e).is(":checked")?jQuery("#screenmore").css("display",""):jQuery("#screenmore").css("display","none")}function mobileRules(e){jQuery(e).is(":checked")?jQuery("#mobile_screen_block").css("display",""):jQuery("#mobile_screen_block").css("display","none")}function usersroles(e){2==jQuery(e).val()?jQuery("#users_roles").css("display",""):jQuery("#users_roles").css("display","none")}jQuery(document).ready((function(e){e("#wow-plugin").on("submit",(function(s){s.preventDefault();let i=e(this).serialize(),t="action="+e("#prefix").val()+"_item_save&"+i;e(".wow-plugin .saving").animate({opacity:"0.75"}),e.post(ajaxurl,t,(function(s){if("OK"==s.status){e("#wow-message").addClass("notice notice-success is-dismissible"),e("#wow-message").html("<p>"+s.message+"</p>"),e("#add_action").val(2);let i=e("#tool_id").val();e(".nav-tab.nav-tab-active").text("Update #"+i)}else e("#wow-message").addClass("notice notice-error is-dismissible"),e("#wow-message").html("<p>"+s.message+"</p>");e(".wow-plugin .saving").animate({opacity:"0"})}))})),e(".wow-plugin .tab-nav li:first").addClass("select"),e(".wow-plugin .tab-panels>div").hide().filter(":first").show(),e(".wow-plugin .tab-nav a").click((function(){return e(".wow-plugin .tab-panels>div").hide().filter(this.hash).show(),e(".wow-plugin .tab-nav li").removeClass("select"),e(this).parent().addClass("select"),!1})),e(".wow-plugin input:checkbox:checked").each((function(){e(this).siblings('input[type="hidden"]').val("1")})),e(".wow-plugin input:checkbox").change((function(){checkboxchecked(this)})),e(".wp-color-picker-field").not("#clone .wp-color-picker-field").wpColorPicker(),e(".adding-menu-1").sortable(),e("body").on("click",".item-del",(function(){e(this).closest(".itembox").remove()})),e("body").on("click",".toogle",(function(){var s=e(this).closest(".itembox");e(s).children(".menu_block").toggle(),e(this).siblings(".toogle").toggle(),e(this).toggle()})),e(".icons").not("#clone .icons").fontIconPicker({theme:"fip-darkgrey",emptyIcon:!1,allCategoryText:"Show all"}),wow_attach_tooltips(e(".wow-help").not("#clone .wow-help")),e("body").on("hover",".wow-help",(function(){e(this).hasClass("dashicons-lock")?(e(this).removeClass("dashicons-lock"),e(this).addClass("dashicons-unlock")):e(this).hasClass("dashicons-unlock")&&(e(this).removeClass("dashicons-unlock"),e(this).addClass("dashicons-lock"))})),e("input.tooltip-include:checkbox").each((function(){itemtooltip(this)})),e("select.item-type").each((function(){itemtype(this)})),e("input#depending_language:checkbox").each((function(){languages(this)})),e("select#show").each((function(){showchange(this)})),e("input.item_user:radio:checked").each((function(){usersroles(this)})),e("input#include_mobile:checkbox").each((function(){screen_less(this)})),e("input#include_more_screen:checkbox").each((function(){screen_more(this)})),e("input#mobile_rules:checkbox").each((function(){mobileRules(this)})),e(".icons").css("display","none"),e("input.custom-icon:checkbox").each((function(){customicon(this)})),e(".item-title").children(".faq-title").click((function(){var s=e(this).closest(".items");e(s).children(".inside").toggle(500),e(this).hasClass("togglehide")?(e(this).removeClass("togglehide"),e(this).addClass("toggleshow"),e(this).attr("title","Show")):(e(this).removeClass("toggleshow"),e(this).addClass("togglehide"),e(this).attr("title","Hide"))})),e("[data-share]").on("click",(function(s){s.preventDefault();let i,t=e(this).data("share"),n=e("#wp-url").val(),o=e("#wp-title").val();switch(t){case"facebook":i="https://www.facebook.com/sharer/sharer.php?u="+n;break;case"vk":i="http://vk.com/share.php?url="+n;break;case"twitter":i="https://twitter.com/share?url="+n+"&text="+o;break;case"linkedin":i="https://www.linkedin.com/shareArticle?url="+n+"&title="+o;break;case"pinterest":i="https://pinterest.com/pin/create/button/?url="+n;break;case"xing":i="https://www.xing.com/spi/shares/new?url="+n;break;case"reddit":i="http://www.reddit.com/submit?url="+n+"&title="+o;break;case"blogger":i="https://www.blogger.com/blog-this.g?u="+n+"&n="+o;break;case"telegram":i="https://telegram.me/share/url?url="+n+"&text="+o;break;default:i=""}let l="width=550, height=450, top="+(screen.height-450)/2+", left="+(screen.width-550)/2+", scrollbars=0, resizable=1, menubar=0, toolbar=0, status=0";window.open(i,null,l)}))})); |