PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / 5.0.1
Floating Button – Easily Create Sticky, Fixed & Floating Buttons v5.0.1
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
floating-button / admin / assets / js / script.min.js

script.min.js in Floating Button – Easily Create Sticky, Fixed & Floating Buttons 5.0.1, at admin/assets/js/script.min.js

1 lines 8.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";!function(e){function n(n){n.tooltip({content:function(){return e(this).prop("title")},tooltipClass:"wow-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function t(n){e(n).find("input").prop("checked")?e(n).parent().find(".field").removeClass("is-hidden"):e(n).parent().find(".field").addClass("is-hidden")}function i(n){e(n).find("input").prop("checked")?e(n).closest(".columns").children(".blockHidden").removeClass("is-hidden"):e(n).closest(".columns").children(".blockHidden").addClass("is-hidden")}function o(n){e(n).find("input").prop("checked")?e(n).closest(".toogle-content").children(".blockHidden").removeClass("is-hidden"):e(n).closest(".toogle-content").children(".blockHidden").addClass("is-hidden")}function c(){const n=e("#show").val();switch(e("#taxonomy, #id-post, #shortcode").hide(),n){case"shortecode":e("#shortcode").fadeIn();break;case"taxonomy":e("#taxonomy, #id-post").fadeIn();break;case"posts":case"pages":case"expost":case"expage":case"postsincat":e("#id-post").fadeIn();break;default:e("#taxonomy, #id-post, #shortcode").hide()}}function s(){const n=e("#item_user").val();e(".item-user").fadeOut("200"),"2"==n&&e(".item-user").fadeIn("200")}function a(n){const t=e(n).val(),i=e(n).find("option:selected").text(),o=e(n).parents(".tabs-content"),c=e(o).find(".item-link"),s=e(o).find(".item-share"),a=e(o).find(".item-translate"),d=e(o).find(".item-link-blank"),l=e(o).find(".item-type-menu"),h=e(o).find(".item-link-text"),p=e(o).find(".item-hold-btns-open");switch(e(n).parents(".panel").find(".element-type").text(i),e(c).hide(),e(s).hide(),e(a).hide(),e(d).hide(),e(l).hide(),e(p).hide(),t){case"link":case"smoothscroll":case"email":case"telephone":case"login":case"logout":case"lostpassword":e(c).show();break;case"share":e(s).show();break;case"menu":e(l).show();break;case"main":e(p).show();break;case"translate":e(a).show()}switch(t){case"link":case"smoothscroll":case"login":case"logout":case"lostpassword":e(h).text("Link");break;case"email":e(h).text("Email");break;case"telephone":e(h).text("Telephone")}"link"!==t&&"dynamic"!==t||e(d).show()}function d(){const n=e("[data-content=1] .item-type").val(),t=e("#tab [data-tab=2], #tab [data-tab=3]");e(t).hide(),"main"===n&&e(t).show()}function l(n){const t=e(n).parents(".panel");e(n).prop("checked")?e(t).find(".is-submenu").removeClass("is-hidden"):e(t).find(".is-submenu").addClass("is-hidden")}function h(n){const t=e(n).parents(".tabs-content"),i=e(t).find(".icon-default"),o=e(t).find(".icon-custom"),c=e(t).find(".icon-text"),s=e(t).find(".icon-text-field"),a=e(t).find(".custom-icon-text");e(n).prop("checked")?(e(i).hide(),e(o).show(),e(c).hide(),e(a).prop("checked",!1),e(s).addClass("is-hidden")):(e(i).show(),e(o).hide(),e(c).show())}function p(n){const t=e(n).parents(".tabs-content"),i=e(t).find(".icon-default"),o=e(t).find(".icon-custom"),c=e(t).find(".icon-text-field"),s=e(t).find(".custom-icon");e(n).prop("checked")?(e(i).hide(),e(o).hide(),e(c).removeClass("is-hidden"),e(s).prop("checked",!1)):(e(c).addClass("is-hidden"),e(i).show())}function u(n){const t=e(n).attr("name"),i=e(n).val(),o=e(n).parents(".panel");t.includes("[icon_color]")?e(o).find(".icon-select").css("color",i):t.includes("[button_color]")&&e(o).find(".icon-select").css("background-color",i)}function r(n){let t;const i=e(n).find(".custom-icon"),o=e(n).find(".custom-icon-text"),c=e(n).find(".icons").val();if(e(i).prop("checked")){t='<img src="'+e(n).find(".custom-icon-url").val()+'">'}else if(e(o).prop("checked")){t=e(n).find(".icon-custom-text").val()}else t='<i class="'+c+'"></i>';e(n).find(".icon-select").html(t)}function f(n){const t=e(n).find("input"),i=e(".close-button-icon");t.prop("checked")?e(i).removeClass("is-hidden"):e(i).addClass("is-hidden")}e("#wow-plugin").on("submit",(function(n){n.preventDefault(),function(){if(e("#wp-popupcontent-wrap").hasClass("tmce-active")){let n=tinyMCE.activeEditor.getContent();e("#popupcontent").val(n)}}();const t=e(this).serialize();let i="action="+e("#prefix").val()+"_item_save&"+t;e(".wow-plugin .saving").animate({opacity:"0.75"}),e.post(ajaxurl,i,(function(n){if("OK"==n.status){e("#wow-message").addClass("notice notice-success is-dismissible"),e("#wow-message").html("<p>"+n.message+"</p>"),e("#add_action").val(2);let t=e("#tool_id").val();e(".nav-tab.nav-tab-active").text("Update #"+t)}e(".wow-plugin .saving").animate({opacity:"0"})}))})),e("#tab li").on("click",(function(){const n=e(this).data("tab");e("#tab li").removeClass("is-active"),e(this).addClass("is-active"),e(".tab-content").addClass("is-hidden"),e('[data-content="'+n+'"]').removeClass("is-hidden")})),n(e(".wow-help")),e(".checkLabel").each((function(){t(this)})).on("click",(function(){t(this)})),e(".checkBlock").each((function(){i(this)})).on("click",(function(){i(this)})),e(".checkTooltip").each((function(){o(this)})).on("click",(function(){o(this)})),e("body").on("click",".checkTooltip",(function(){o(this)})),c(),e("#show").on("change",c),e(".wow-plugin input:checkbox:checked").each((function(){e(this).siblings('input[type="hidden"]').val("1")})),e("body").on("click",".wow-plugin input:checkbox",(function(){var n;e(n=this).prop("checked")?e(n).siblings('input[type="hidden"]').val("1"):e(n).siblings('input[type="hidden"]').val("0")})),s(),e("#item_user").on("change",(function(){s()})),e("select.item-type").each((function(){a(this)})),e("body").on("change",".item-type",(function(){a(this)})),d(),e("body").on("change","[data-content=1] .item-type",(function(){d()})),e(".wp-color-picker-field").wpColorPicker({change:function(e,n){u(this)}}),e("body").on("keyup",".item-tooltip",(function(){const n=e(this).val(),t=e(this).parents(".panel");e(t).find(".item-label-text").html(n),""==n&&e(t).find(".item-label-text").html("(no label)")})),e("body").on("click",".toogle-element .dashicons-arrow-down",(function(){const n=e(this).parents(".panel");e(n).find(".toogle-content").removeClass("is-hidden"),e(this).addClass("is-hidden"),e(n).find(".dashicons-arrow-up").removeClass("is-hidden")})),e("body").on("click",".toogle-element .dashicons-arrow-up",(function(){const n=e(this).parents(".panel");e(n).find(".toogle-content").addClass("is-hidden"),e(this).addClass("is-hidden"),e(n).find(".dashicons-arrow-down").removeClass("is-hidden")})),e("input.sub-item:checkbox").each((function(){l(this)})),e("body").on("change","input.sub-item",(function(){l(this)})),e(".icons").fontIconPicker({theme:"fip-darkgrey",emptyIcon:!1,allCategoryText:"Show all"}),e("input.custom-icon:checkbox").each((function(){h(this)})),e("body").on("click",".custom-icon",(function(){h(this)})),e("input.custom-icon-text:checkbox").each((function(){p(this)})),e("body").on("click",".custom-icon-text",(function(){p(this)})),e(document).on("click",".wow-plugin-message .notice-dismiss",(function(){e.ajax({url:ajaxurl,data:{action:"float_menu_message"}})})),e(".add-item").on("click",(function(){const t=e(this).data("template"),i=document.getElementById("clone-"+t).innerHTML;document.querySelector(".menu-items-"+t).insertAdjacentHTML("beforeend",i),e("select.item-type").each((function(){a(this)})),e("input.custom-icon:checkbox").each((function(){h(this)})),e(".wp-color-picker-field").wpColorPicker({change:function(e,n){u(this)}}),n(e(".wow-help")),e(".icons").fontIconPicker({theme:"fip-darkgrey",emptyIcon:!1,allCategoryText:"Show all"}),e(".icons-selector").on("click",(function(){r(e(this).parents(".panel"))})),e("body").on("click keyup",'[data-tab-content="2"]',(function(){r(e(this).parents(".panel"))}))})),e("body").on("click",".item-delete",(function(){const n=e(this).parents(".panel");e(n).remove()})),e("body").on("click",".panel-tabs a",(function(){!function(n){const t=e(n).data("tab"),i=e(n).parents(".panel");e(i).find(".panel-tabs a").removeClass("is-active"),e(n).addClass("is-active"),e(i).find(".tabs-content").addClass("is-hidden"),e(i).find('[data-tab-content="'+t+'"]').removeClass("is-hidden")}(this)})),e(".wp-color-picker-field").each((function(){u(this)})),e("body").on("change",".wp-color-picker-field",(function(){u(this)})),e(".icons-selector").on("click",(function(){r(e(this).parents(".panel"))})),e("body").on("click keyup",'[data-tab-content="2"]',(function(){r(e(this).parents(".panel"))})),e(".panel").each((function(){r(this)})),e(".menu-items").sortable(),e("#close-button-icon").each((function(){f(this)})).on("click",(function(){f(this)}))}(jQuery);