PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 5.9.26
Essential Addons for Elementor – Popular Elementor Templates & Widgets v5.9.26
6.6.9 6.6.8 6.6.7 6.6.6 6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / assets / admin / js / eael-templately-promo.js
essential-addons-for-elementor-lite / assets / admin / js Last commit date
admin.js 2 years ago eael-essential-blocks-promo.js 3 years ago eael-templately-promo.js 2 years ago
eael-templately-promo.js
172 lines
1 (function ($) {
2 $("document").ready(function () {
3 let templateAddSection = $("#tmpl-elementor-add-section");
4 if (0 < templateAddSection.length) {
5 var oldTemplateButton = templateAddSection.html();
6 oldTemplateButton = oldTemplateButton.replace(
7 '<div class="elementor-add-section-drag-title',
8 '<div class="elementor-add-section-area-button elementor-add-templately-promo-button"></div><div class="elementor-add-section-drag-title'
9 );
10 templateAddSection.html(oldTemplateButton);
11 }
12
13 elementor.on("preview:loaded", function () {
14 $(elementor.$previewContents[0].body).on("click", ".elementor-add-templately-promo-button", function (event) {
15 window.tmPromo = elementorCommon.dialogsManager.createWidget(
16 "lightbox",
17 {
18 id: "eael-templately-promo-popup",
19 headerMessage: !1,
20 message: "",
21 hide: {
22 auto: !1,
23 onClick: !1,
24 onOutsideClick: false,
25 onOutsideContextMenu: !1,
26 onBackgroundClick: !0,
27 },
28 position: {
29 my: "center",
30 at: "center",
31 },
32 onShow: function () {
33 var contentTemp = $(".dialog-content-tempromo")
34 var cloneMarkup = $("#eael-promo-temp-wrap")
35 cloneMarkup = cloneMarkup.clone(true).show()
36 contentTemp.html(cloneMarkup);
37 },
38 onHide: function () {
39 window.tmPromo.destroy();
40 }
41 }
42 );
43 window.tmPromo.getElements("header").remove();
44 window.tmPromo.getElements("message").append(
45 window.tmPromo.addElement("content-tempromo")
46 );
47 window.tmPromo.show();
48 });
49 });
50
51 $(document).on('change', '.eael-temp-promo-confirmation', function (e) {
52 var $this = $(this)
53 if ($this.val() == 'dnd') {
54 $(".wpdeveloper-plugin-installer").hide();
55 $(".eael-prmo-status-submit").show();
56 } else {
57 $(".wpdeveloper-plugin-installer").show();
58 $(".eael-prmo-status-submit").hide();
59 }
60 });
61
62 $(document).on('click','.eael-prmo-status-submit',function (e){
63 e.preventDefault();
64 var $this = $(this);
65 $this.prop("disabled",true);
66 $(".eael-temp-promo-confirmation").prop("disabled", true);
67
68 $.ajax({
69 url: ajaxurl,
70 type: "POST",
71 data: {
72 action: "templately_promo_status",
73 security: localize.nonce,
74 },
75 success: function (response) {
76 if (response.success) {
77 $(elementor.$previewContents[0].body).find(".elementor-add-templately-promo-button").remove();
78 window.tmPromo.destroy();
79 }
80 },
81 error: function (err) {
82 $this.prop("disabled",false);
83 console.log(err)
84 },
85 });
86 })
87
88 $(document).on('click','.eael-promo-temp__times',function (e){
89 e.preventDefault();
90 window.tmPromo.destroy();
91 })
92
93 // install/activate plugin
94 $(document).on("click", ".wpdeveloper-plugin-installer", function (ev) {
95 ev.preventDefault();
96
97 var button = $(this);
98 var action = $(this).data("action");
99 var slug = $(this).data("slug");
100 var basename = $(this).data("basename");
101
102 if ($.active && typeof action != "undefined") {
103 button.text("Waiting...").attr("disabled", true);
104
105 setInterval(function () {
106 if (!$.active) {
107 button.attr("disabled", false).trigger("click");
108 }
109 }, 1000);
110 }
111
112 if (action == "install" && !$.active) {
113 button.text("Installing...").attr("disabled", true);
114
115 $.ajax({
116 url: localize.ajaxurl,
117 type: "POST",
118 data: {
119 action: "wpdeveloper_install_plugin",
120 security: localize.nonce,
121 slug: slug,
122 },
123 success: function (response) {
124 if (response.success) {
125 button.text("Activated");
126 button.data("action", null);
127 elementor.saver.update.apply().then(function () {
128 location.reload();
129 });
130 } else {
131 button.text("Install");
132 }
133
134 button.attr("disabled", false);
135 },
136 error: function (err) {
137 console.log(err.responseJSON);
138 },
139 });
140 } else if (action == "activate" && !$.active) {
141 button.text("Activating...").attr("disabled", true);
142
143 $.ajax({
144 url: localize.ajaxurl,
145 type: "POST",
146 data: {
147 action: "wpdeveloper_activate_plugin",
148 security: localize.nonce,
149 basename: basename,
150 },
151 success: function (response) {
152 if (response.success) {
153 button.text("Activated");
154 button.data("action", null);
155 elementor.saver.update.apply().then(function () {
156 location.reload();
157 });
158 } else {
159 button.text("Activate");
160 }
161
162 button.attr("disabled", false);
163 },
164 error: function (err) {
165 console.log(err.responseJSON);
166 },
167 });
168 }
169 });
170 });
171 })(jQuery);
172