HELLO v3!!!
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
/*! elementor - v1.9.6 - 21-02-2018 */
|
||||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/* global jQuery, ElementorAdminFeedbackArgs */
|
||||
( function( $ ) {
|
||||
'use strict';
|
||||
|
||||
var ElementorAdminDialogApp = {
|
||||
|
||||
dialogsManager: new DialogsManager.Instance(),
|
||||
|
||||
cacheElements: function() {
|
||||
this.cache = {
|
||||
$deactivateLink: $( '#the-list' ).find( '[data-slug="elementor"] span.deactivate a' ),
|
||||
$dialogHeader: $( '#elementor-deactivate-feedback-dialog-header' ),
|
||||
$dialogForm: $( '#elementor-deactivate-feedback-dialog-form' )
|
||||
};
|
||||
},
|
||||
|
||||
bindEvents: function() {
|
||||
var self = this;
|
||||
|
||||
self.cache.$deactivateLink.on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
self.getModal().show();
|
||||
} );
|
||||
},
|
||||
|
||||
deactivate: function() {
|
||||
location.href = this.cache.$deactivateLink.attr( 'href' );
|
||||
},
|
||||
|
||||
initModal: function() {
|
||||
var self = this,
|
||||
modal;
|
||||
|
||||
self.getModal = function() {
|
||||
if ( ! modal ) {
|
||||
modal = self.dialogsManager.createWidget( 'lightbox', {
|
||||
id: 'elementor-deactivate-feedback-modal',
|
||||
headerMessage: self.cache.$dialogHeader,
|
||||
message: self.cache.$dialogForm,
|
||||
hide: {
|
||||
onButtonClick: false
|
||||
},
|
||||
position: {
|
||||
my: 'center',
|
||||
at: 'center'
|
||||
},
|
||||
onReady: function() {
|
||||
DialogsManager.getWidgetType( 'lightbox' ).prototype.onReady.apply( this, arguments );
|
||||
|
||||
this.addButton( {
|
||||
name: 'submit',
|
||||
text: ElementorAdminFeedbackArgs.i18n.submit_n_deactivate,
|
||||
callback: self.sendFeedback.bind( self )
|
||||
} );
|
||||
|
||||
if ( ! ElementorAdminFeedbackArgs.is_tracker_opted_in ) {
|
||||
this.addButton( {
|
||||
name: 'skip',
|
||||
text: ElementorAdminFeedbackArgs.i18n.skip_n_deactivate,
|
||||
callback: function() {
|
||||
self.deactivate();
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
return modal;
|
||||
};
|
||||
},
|
||||
|
||||
sendFeedback: function() {
|
||||
var self = this,
|
||||
formData = self.cache.$dialogForm.serialize();
|
||||
|
||||
self.getModal().getElements( 'submit' ).text( '' ).addClass( 'elementor-loading' );
|
||||
|
||||
$.post( ajaxurl, formData, this.deactivate.bind( this ) );
|
||||
},
|
||||
|
||||
init: function() {
|
||||
this.initModal();
|
||||
this.cacheElements();
|
||||
this.bindEvents();
|
||||
}
|
||||
};
|
||||
|
||||
$( function() {
|
||||
ElementorAdminDialogApp.init();
|
||||
} );
|
||||
|
||||
}( jQuery ) );
|
||||
|
||||
},{}]},{},[1])
|
||||
//# sourceMappingURL=admin-feedback.js.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user