Changeset 3370073
- Timestamp:
- 09/30/2025 03:15:57 AM (5 months ago)
- Location:
- sky-elementor-addons/tags
- Files:
-
- 39 edited
-
1.0.0/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.10/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.2/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.6/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.7/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.8/assets/admin/sky-admin.js (modified) (1 diff)
-
1.0.9/assets/admin/sky-admin.js (modified) (1 diff)
-
1.5.0/assets/admin/sky-admin.js (modified) (1 diff)
-
2.0.0/assets/admin/sky-admin.js (modified) (1 diff)
-
2.0.8/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.10/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.11/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.12/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.13/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.15/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.16/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.4/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.5/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.6/assets/admin/sky-admin.js (modified) (1 diff)
-
2.5.8/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.0/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.1/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.2/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.4/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.5/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.8/assets/admin/sky-admin.js (modified) (1 diff)
-
2.6.9/assets/admin/sky-admin.js (modified) (1 diff)
-
2.7.0/assets/admin/sky-admin.js (modified) (1 diff)
-
2.7.2/assets/admin/sky-admin.js (modified) (1 diff)
-
2.7.3/assets/admin/sky-admin.js (modified) (1 diff)
-
3.0.0/assets/admin/sky-admin.js (modified) (1 diff)
-
3.1.0/assets/admin/sky-admin.js (modified) (1 diff)
-
3.1.1/assets/admin/sky-admin.js (modified) (1 diff)
-
3.1.2/assets/admin/sky-admin.js (modified) (1 diff)
-
3.1.3/assets/admin/sky-admin.js (modified) (1 diff)
-
3.1.4/assets/admin/sky-admin.js (modified) (1 diff)
-
3.2.0/assets/admin/sky-admin.js (modified) (1 diff)
-
3.2.1/assets/admin/sky-admin.js (modified) (1 diff)
-
3.2.2/assets/admin/sky-admin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sky-elementor-addons/tags/1.0.0/assets/admin/sky-admin.js
r2653698 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),t(".sa-dashboard-tab-container li").removeClass("active"),t(this).parent().addClass("active"),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:"You were thinking about the <b>"+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),localStorage.setItem("sky-dashboard-tab-history",a))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked")}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){console.log(t),Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:7e3,timerProgressBar:!0,customClass:{container:"sky-addons"}})}})}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.10/assets/admin/sky-admin.js
r2777914 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.2/assets/admin/sky-admin.js
r2659578 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),t(".sa-dashboard-tab-container li").removeClass("active"),t(this).parent().addClass("active"),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:"You were thinking about the <b>"+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),localStorage.setItem("sky-dashboard-tab-history",a))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked")}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:7e3,timerProgressBar:!0,customClass:{container:"sky-addons"}})}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.6/assets/admin/sky-admin.js
r2699739 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.7/assets/admin/sky-admin.js
r2718508 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.8/assets/admin/sky-admin.js
r2741214 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.0.9/assets/admin/sky-admin.js
r2750906 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/1.5.0/assets/admin/sky-admin.js
r2792439 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.0.0/assets/admin/sky-admin.js
r2822302 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.0.8/assets/admin/sky-admin.js
r2891870 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.10/assets/admin/sky-admin.js
r3143813 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.11/assets/admin/sky-admin.js
r3144760 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.12/assets/admin/sky-admin.js
r3144976 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.13/assets/admin/sky-admin.js
r3149716 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.15/assets/admin/sky-admin.js
r3154134 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.16/assets/admin/sky-admin.js
r3165154 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.4/assets/admin/sky-admin.js
r3094838 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.5/assets/admin/sky-admin.js
r3118553 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.6/assets/admin/sky-admin.js
r3129336 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.5.8/assets/admin/sky-admin.js
r3143813 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.0/assets/admin/sky-admin.js
r3165202 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.1/assets/admin/sky-admin.js
r3180808 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.2/assets/admin/sky-admin.js
r3189030 r3370073 1 !function(t){t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.4/assets/admin/sky-admin.js
r3195038 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.5/assets/admin/sky-admin.js
r3209424 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.8/assets/admin/sky-admin.js
r3217939 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.6.9/assets/admin/sky-admin.js
r3224588 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.7.0/assets/admin/sky-admin.js
r3250650 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.7.2/assets/admin/sky-admin.js
r3252960 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/2.7.3/assets/admin/sky-admin.js
r3253557 r3370073 1 !function(t){if(t(document).ready((function(){var a="tab-dashboard";if(t(".sa-dashboard-tab-container .sa-nav-tabs a:not(.sa-tab-license)").on("click keypress",(function(e){if(e.preventDefault(),"keypress"===e.type&&13===e.which||"click"===e.type){var s=t(this).data("tab");window.location.hash=s.substring(4),localStorage.setItem("sky-dashboard-tab-history",s.substring(4)),s!=a&&t(".sa-dashboard-tab-container .tab-pane").each((function(){if(t(this).attr("id")==s)return t(".tab-pane").removeClass("active"),t(this).addClass("active"),void(a=t(this).attr("id"))}))}})),t(".sa-dashboard-tab-container")[0]){var e=window.location.hash;if(e)e=e.substring(1),t("[data-tab=tab-"+e+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+e+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",e);else if(null!==localStorage.getItem("sky-dashboard-tab-history")){var s=localStorage.getItem("sky-dashboard-tab-history");if("dashboard"==s)return;t("[data-tab=tab-"+s+"]")[0]&&(t("[data-tab=tab-"+s+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+s+"]").parent().addClass("mm-active"),Swal.fire({position:"bottom-end",title:"Welcome Back!",html:'You were thinking about the <b class="sa-text-capitalize">'+s+"</b> Tab at the last moment.",icon:"info",customClass:{container:"sky-addons"}}))}t(".wp-submenu a").on("click",(function(){t(window).on("hashchange",(function(){var a=window.location.hash;a&&(a=a.substring(1),t("[data-tab=tab-"+a+"]").trigger("click"),t(".sa-dashboard-tab-container li").removeClass("mm-active"),t("[data-tab=tab-"+a+"]").parent().addClass("mm-active"),localStorage.setItem("sky-dashboard-tab-history",a))}))})),t("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click",(function(){t("#toplevel_page_sky-elementor-addons li").removeClass("current"),t(this).parent().addClass("current")}))}})),t(".sa_widget_item.pro-widget").on("click",(function(){Swal.fire({position:"bottom-end",title:"Ops!",html:"You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.",icon:"warning",timer:1e4,timerProgressBar:!0,customClass:{container:"sky-addons"}})})),t(".sky-wrap .sa-active-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&t(this).attr("checked","checked").prop("checked",!0)}))})),t(".sky-wrap .sa-deactivate-all-btn").click((function(){t(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each((function(a){t(this).is(":visible")&&(t(this).attr("checked","").prop("checked",!1),t(this).removeAttr("checked"))}))})),jQuery(document).ready((function(t){t("form#sky_opt_widget, #sky_opt_3rd_party_widget, form#sky_opt_extensions, form#sky_opt_api, form#sky_opt_analytics").on("submit",(function(a){a.preventDefault();var e=t(this).find("button[type=submit]");e.data("prevalue",e.html()),jQuery.ajax({url:t(this).attr("action"),method:"POST",data:t(this).serialize(),beforeSend:function(){e.html("..."),Swal.showLoading()},complete:function(){e.html(e.data("prevalue"))},success:function(t){Swal.hideLoading(),Swal.fire({title:t.msg,text:t.msg_details,icon:1==t.status?"success":"error",timer:6e3,timerProgressBar:!0,customClass:{container:"sky-addons"}}),1==t.status&&setTimeout((function(){location.reload()}),2500)}})})),t("#sa-metismenu").metisMenu()})),t(".sky-wrap")[0]){let a=t("#e-admin-top-bar-root");a[0]&&a.remove()}t(document).find(".sky_black_friday_notice")[0]&&t(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(a){a.preventDefault();t.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(t){console.log(t)}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 var currentTab = "tab-dashboard"; 4 5 // Tab click/keypress handler 6 $(".sa-dashboard-tab-container .nav-tabs a:not(.sa-tab-license)").on("click keypress", function (e) { 7 e.preventDefault(); 8 $(".sa-dashboard-tab-container li").removeClass("active"); 9 $(this).parent().addClass("active"); 10 11 // Only handle click or Enter keypress 12 if ((e.type === "keypress" && e.which === 13) || e.type === "click") { 13 var tab = $(this).data("tab"); 14 window.location.hash = tab.substring(4); 15 localStorage.setItem("sky-dashboard-tab-history", tab.substring(4)); 16 17 if (tab !== currentTab) { 18 $(".sa-dashboard-tab-container .tab-pane").each(function () { 19 if ($(this).attr("id") === tab) { 20 $(".tab-pane").removeClass("active"); 21 $(this).addClass("active"); 22 currentTab = $(this).attr("id"); 23 return false; 24 } 25 }); 26 } 27 } 28 }); 29 30 // Initial tab selection based on hash or localStorage 31 if ($(".sa-dashboard-tab-container")[0]) { 32 var hash = window.location.hash; 33 if (hash) { 34 hash = hash.substring(1); 35 $("[data-tab=tab-" + hash + "]").trigger("click"); 36 localStorage.setItem("sky-dashboard-tab-history", hash); 37 } else if (localStorage.getItem("sky-dashboard-tab-history") !== null) { 38 var tabHistory = localStorage.getItem("sky-dashboard-tab-history"); 39 if (tabHistory === "dashboard") return; 40 if ($("[data-tab=tab-" + tabHistory + "]")[0]) { 41 $("[data-tab=tab-" + tabHistory + "]").trigger("click"); 42 Swal.fire({ 43 position: "bottom-end", 44 title: "Welcome Back!", 45 html: "You were thinking about the <b>" + tabHistory + "</b> Tab at the last moment.", 46 icon: "info", 47 customClass: { container: "sky-addons" } 48 }); 49 } 50 } 51 52 // Listen for hash changes 53 $(window).on("hashchange", function () { 54 var hash = window.location.hash; 55 if (hash) { 56 hash = hash.substring(1); 57 $("[data-tab=tab-" + hash + "]").trigger("click"); 58 localStorage.setItem("sky-dashboard-tab-history", hash); 59 } 60 }); 61 62 // Submenu highlight 63 $("#toplevel_page_sky-elementor-addons .wp-submenu a").on("click", function () { 64 $("#toplevel_page_sky-elementor-addons li").removeClass("current"); 65 $(this).parent().addClass("current"); 66 }); 67 } 68 }); 69 70 // Pro widget click handler 71 $(".sa_widget_item.pro-widget").on("click", function () { 72 Swal.fire({ 73 position: "bottom-end", 74 title: "Ops!", 75 html: "You are trying to activate <b>Pro Widget</b>. You must have the License to activate this widget. Thank you.", 76 icon: "warning", 77 timer: 10000, 78 timerProgressBar: true, 79 customClass: { container: "sky-addons" } 80 }); 81 }); 82 83 // Activate all widgets button 84 $(".sky-wrap .sa-active-all-btn").click(function () { 85 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 86 $(this).attr("checked", "checked").prop("checked", true); 87 }); 88 }); 89 90 // Deactivate all widgets button 91 $(".sky-wrap .sa-deactivate-all-btn").click(function () { 92 $(this).closest(".tab-pane").find(".sa_widget_item:not(.pro-widget) .sa-checkbox").each(function () { 93 $(this).attr("checked", "").prop("checked", false); 94 $(this).removeAttr("checked"); 95 }); 96 }); 97 98 // AJAX form submit for widgets, extensions, API 99 $(document).ready(function ($) { 100 $("form#sky_opt_widget, form#sky_opt_extensions, form#sky_opt_api").on("submit", function (e) { 101 e.preventDefault(); 102 var $submitBtn = $(this).find("button[type=submit]"); 103 $submitBtn.data("prevalue", $submitBtn.html()); 104 105 $.ajax({ 106 url: $(this).attr("action"), 107 method: "POST", 108 data: $(this).serialize(), 109 beforeSend: function () { 110 $submitBtn.html("..."); 111 Swal.showLoading(); 112 }, 113 complete: function () { 114 $submitBtn.html($submitBtn.data("prevalue")); 115 }, 116 success: function (response) { 117 console.log(response); 118 Swal.hideLoading(); 119 Swal.fire({ 120 title: response.msg, 121 text: response.msg_details, 122 icon: response.status == 1 ? "success" : "error", 123 timer: 7000, 124 timerProgressBar: true, 125 customClass: { container: "sky-addons" } 126 }); 127 } 128 }); 129 }); 130 }); 131 })(jQuery); -
sky-elementor-addons/tags/3.0.0/assets/admin/sky-admin.js
r3261584 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.1.0/assets/admin/sky-admin.js
r3291586 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.1.1/assets/admin/sky-admin.js
r3294689 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.1.2/assets/admin/sky-admin.js
r3306202 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.1.3/assets/admin/sky-admin.js
r3315653 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.1.4/assets/admin/sky-admin.js
r3324768 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.2.0/assets/admin/sky-admin.js
r3334452 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.2.1/assets/admin/sky-admin.js
r3345601 r3370073 1 !function(n){n(document).ready((function(){n(document).find(".sky_black_friday_notice")[0]&&n(document).on("click",".sky_black_friday_notice .notice-dismiss",(function(c){c.preventDefault();n.post(ajaxurl,{action:"sky_black_friday_notice_dismiss"},(function(n){console.log(n)}))}))}))}(jQuery); 1 (function ($) { 2 $(document).ready(function () { 3 if ($(document).find(".sky_black_friday_notice")[0]) { 4 $(document).on("click", ".sky_black_friday_notice .notice-dismiss", function (e) { 5 e.preventDefault(); 6 $.post( 7 ajaxurl, 8 { action: "sky_black_friday_notice_dismiss" }, 9 function (response) { 10 // console.log(response); 11 } 12 ); 13 }); 14 } 15 }); 16 })(jQuery); -
sky-elementor-addons/tags/3.2.2/assets/admin/sky-admin.js
r3370070 r3370073 8 8 { action: "sky_black_friday_notice_dismiss" }, 9 9 function(response) { 10 console.log(response);10 // console.log(response); 11 11 } 12 12 );
Note: See TracChangeset
for help on using the changeset viewer.