balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

new-template.js (4659B)


      1 /*! elementor - v3.4.4 - 13-09-2021 */
      2 /******/ (() => { // webpackBootstrap
      3 /******/ 	"use strict";
      4 /******/ 	var __webpack_modules__ = ({
      5 
      6 /***/ "../assets/dev/js/admin/new-template/layout.js":
      7 /*!*****************************************************!*\
      8   !*** ../assets/dev/js/admin/new-template/layout.js ***!
      9   \*****************************************************/
     10 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
     11 
     12 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
     13 
     14 
     15 var NewTemplateView = __webpack_require__(/*! elementor-admin/new-template/view */ "../assets/dev/js/admin/new-template/view.js");
     16 
     17 module.exports = elementorModules.common.views.modal.Layout.extend({
     18   getModalOptions: function getModalOptions() {
     19     return {
     20       id: 'elementor-new-template-modal'
     21     };
     22   },
     23   getLogoOptions: function getLogoOptions() {
     24     return {
     25       title: __('New Template', 'elementor')
     26     };
     27   },
     28   initialize: function initialize() {
     29     elementorModules.common.views.modal.Layout.prototype.initialize.apply(this, arguments);
     30     this.showLogo();
     31     this.showContentView();
     32   },
     33   showContentView: function showContentView() {
     34     this.modalContent.show(new NewTemplateView());
     35   }
     36 });
     37 
     38 /***/ }),
     39 
     40 /***/ "../assets/dev/js/admin/new-template/view.js":
     41 /*!***************************************************!*\
     42   !*** ../assets/dev/js/admin/new-template/view.js ***!
     43   \***************************************************/
     44 /***/ ((module) => {
     45 
     46 
     47 
     48 module.exports = Marionette.ItemView.extend({
     49   id: 'elementor-new-template-dialog-content',
     50   template: '#tmpl-elementor-new-template',
     51   ui: {},
     52   events: {},
     53   onRender: function onRender() {}
     54 });
     55 
     56 /***/ }),
     57 
     58 /***/ "@wordpress/i18n":
     59 /*!**************************!*\
     60   !*** external "wp.i18n" ***!
     61   \**************************/
     62 /***/ ((module) => {
     63 
     64 module.exports = wp.i18n;
     65 
     66 /***/ })
     67 
     68 /******/ 	});
     69 /************************************************************************/
     70 /******/ 	// The module cache
     71 /******/ 	var __webpack_module_cache__ = {};
     72 /******/ 	
     73 /******/ 	// The require function
     74 /******/ 	function __webpack_require__(moduleId) {
     75 /******/ 		// Check if module is in cache
     76 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
     77 /******/ 		if (cachedModule !== undefined) {
     78 /******/ 			return cachedModule.exports;
     79 /******/ 		}
     80 /******/ 		// Create a new module (and put it into the cache)
     81 /******/ 		var module = __webpack_module_cache__[moduleId] = {
     82 /******/ 			// no module.id needed
     83 /******/ 			// no module.loaded needed
     84 /******/ 			exports: {}
     85 /******/ 		};
     86 /******/ 	
     87 /******/ 		// Execute the module function
     88 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
     89 /******/ 	
     90 /******/ 		// Return the exports of the module
     91 /******/ 		return module.exports;
     92 /******/ 	}
     93 /******/ 	
     94 /************************************************************************/
     95 var __webpack_exports__ = {};
     96 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
     97 (() => {
     98 /*!***********************************************************!*\
     99   !*** ../assets/dev/js/admin/new-template/new-template.js ***!
    100   \***********************************************************/
    101 
    102 
    103 var NewTemplateLayout = __webpack_require__(/*! elementor-admin/new-template/layout */ "../assets/dev/js/admin/new-template/layout.js");
    104 
    105 var NewTemplateModule = elementorModules.ViewModule.extend({
    106   getDefaultSettings: function getDefaultSettings() {
    107     return {
    108       selectors: {
    109         addButton: '.page-title-action:first, #elementor-template-library-add-new'
    110       }
    111     };
    112   },
    113   getDefaultElements: function getDefaultElements() {
    114     var selectors = this.getSettings('selectors');
    115     return {
    116       $addButton: jQuery(selectors.addButton)
    117     };
    118   },
    119   bindEvents: function bindEvents() {
    120     this.elements.$addButton.on('click', this.onAddButtonClick);
    121     elementorCommon.elements.$window.on('hashchange', this.showModalByHash.bind(this));
    122   },
    123   showModalByHash: function showModalByHash() {
    124     if ('#add_new' === location.hash) {
    125       this.layout.showModal();
    126       location.hash = '';
    127     }
    128   },
    129   onInit: function onInit() {
    130     elementorModules.ViewModule.prototype.onInit.apply(this, arguments);
    131     this.layout = new NewTemplateLayout();
    132     this.showModalByHash();
    133   },
    134   onAddButtonClick: function onAddButtonClick(event) {
    135     event.preventDefault();
    136     this.layout.showModal();
    137   }
    138 });
    139 jQuery(function () {
    140   window.elementorNewTemplate = new NewTemplateModule();
    141 });
    142 })();
    143 
    144 /******/ })()
    145 ;
    146 //# sourceMappingURL=new-template.js.map