PluginProbe
Elementor Website Builder – more than just a page builder / 3.28.0-dev2
Elementor Website Builder – more than just a page builder v3.28.0-dev2
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/floating-elements-modal.js +18 -54 4.1.0-beta3 → 3.28.0-dev2 View file →
@@ -1,4 +1,5 @@
1 +/*! elementor - v3.28.0 - 10-03-2025 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
4 5 /***/ "../assets/dev/js/admin/floating-elements/layout.js":
@@ -114,13 +115,8 @@
114 115 return _callSuper(this, _default, arguments);
115 116 }
116 117 (0, _inherits2.default)(_default, _Marionette$LayoutVie);
117 118 return (0, _createClass2.default)(_default, [{
118 - key: "tagName",
119 - value: function tagName() {
120 - return 'header';
121 - }
122 - }, {
123 119 key: "className",
124 120 value: function className() {
125 121 return 'elementor-templates-modal__header';
126 122 }
@@ -152,31 +148,8 @@
152 148 'click @ui.closeModal': 'onCloseModalClick'
153 149 };
154 150 }
155 151 }, {
156 - key: "onRender",
157 - value: function onRender() {
158 - this.bindEscapeKey();
159 - }
160 - }, {
161 - key: "bindEscapeKey",
162 - value: function bindEscapeKey() {
163 - var _this = this;
164 - this.onDocumentKeyDown = function (event) {
165 - if ('Escape' === event.key) {
166 - _this.onCloseModalClick();
167 - }
168 - };
169 - document.addEventListener('keydown', this.onDocumentKeyDown);
170 - }
171 - }, {
172 - key: "onDestroy",
173 - value: function onDestroy() {
174 - if (this.onDocumentKeyDown) {
175 - document.removeEventListener('keydown', this.onDocumentKeyDown);
176 - }
177 - }
178 - }, {
179 152 key: "templateHelpers",
180 153 value: function templateHelpers() {
181 154 return {
182 155 closeType: this.getOption('closeType')
@@ -184,11 +157,12 @@
184 157 }
185 158 }, {
186 159 key: "onCloseModalClick",
187 160 value: function onCloseModalClick() {
161 + var _elementor$config$doc, _elementor$config;
188 162 this._parent._parent._parent.hideModal();
189 - var documentType = this.getDocumentType();
190 - var customEvent = new CustomEvent("core/modal/close/".concat(documentType));
163 + var type = (_elementor$config$doc = (_elementor$config = elementor.config) === null || _elementor$config === void 0 || (_elementor$config = _elementor$config.document) === null || _elementor$config === void 0 ? void 0 : _elementor$config.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : 'default';
164 + var customEvent = new CustomEvent("core/modal/close/".concat(type));
191 165 window.dispatchEvent(customEvent);
192 166 if (this.isFloatingButtonLibraryClose()) {
193 167 $e.internal('document/save/set-is-modified', {
194 168 status: false
@@ -196,22 +170,12 @@
196 170 window.location.href = elementor.config.admin_floating_button_admin_url;
197 171 }
198 172 }
199 173 }, {
200 - key: "getDocumentType",
201 - value: function getDocumentType() {
202 - var _elementor$config$doc, _elementor;
203 - var DEFAULT_TYPE = 'default';
204 - if ('undefined' === typeof window.elementor) {
205 - return DEFAULT_TYPE;
206 - }
207 - return (_elementor$config$doc = (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.config) === null || _elementor === void 0 || (_elementor = _elementor.document) === null || _elementor === void 0 ? void 0 : _elementor.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : DEFAULT_TYPE;
208 - }
209 - }, {
210 174 key: "isFloatingButtonLibraryClose",
211 175 value: function isFloatingButtonLibraryClose() {
212 - var _elementor$config, _elementor$config2;
213 - return window.elementor && ((_elementor$config = elementor.config) === null || _elementor$config === void 0 ? void 0 : _elementor$config.admin_floating_button_admin_url) && 'floating-buttons' === ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 || (_elementor$config2 = _elementor$config2.document) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.type) && (this.$el.closest('.dialog-lightbox-widget-content').find('.elementor-template-library-template-floating_button').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-preview').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-templates-empty').length);
176 + var _elementor$config2, _elementor$config3;
177 + return window.elementor && ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.admin_floating_button_admin_url) && 'floating-buttons' === ((_elementor$config3 = elementor.config) === null || _elementor$config3 === void 0 || (_elementor$config3 = _elementor$config3.document) === null || _elementor$config3 === void 0 ? void 0 : _elementor$config3.type) && (this.$el.closest('.dialog-lightbox-widget-content').find('.elementor-template-library-template-floating_button').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-preview').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-templates-empty').length);
214 178 }
215 179 }]);
216 180 }(Marionette.LayoutView);
217 181
@@ -465,8 +429,19 @@
465 429 }(Marionette.ItemView);
466 430
467 431 /***/ }),
468 432
433 +/***/ "@wordpress/i18n":
434 +/*!**************************!*\
435 + !*** external "wp.i18n" ***!
436 + \**************************/
437 +/***/ ((module) => {
438 +
439 +"use strict";
440 +module.exports = wp.i18n;
441 +
442 +/***/ }),
443 +
469 444 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
470 445 /*!***********************************************************************!*\
471 446 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
472 447 \***********************************************************************/
@@ -688,19 +663,8 @@
688 663 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
689 664 }
690 665 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
691 666
692 -/***/ }),
693 -
694 -/***/ "@wordpress/i18n":
695 -/*!**************************!*\
696 - !*** external "wp.i18n" ***!
697 - \**************************/
698 -/***/ ((module) => {
699 -
700 -"use strict";
701 -module.exports = wp.i18n;
702 -
703 667 /***/ })
704 668
705 669 /******/ });
706 670 /************************************************************************/
@@ -743,9 +707,9 @@
743 707 var NewFloatingElementsModule = elementorModules.ViewModule.extend({
744 708 getDefaultSettings: function getDefaultSettings() {
745 709 return {
746 710 selectors: {
747 - addButtonTopBar: 'a.page-title-action[href*="e-floating-buttons"]',
711 + addButtonTopBar: '.page-title-action',
748 712 addButtonAdminBar: '#wp-admin-bar-new-e-floating-buttons a',
749 713 addButtonEmptyTemplate: '#elementor-template-library-add-new'
750 714 }
751 715 };