- new Email Templates logic with save template to Theme(Child Theme);

- small fixes;
This commit is contained in:
nikitozzzzzzz
2017-08-29 15:01:29 +03:00
parent f32d37c09e
commit 502231671b
27 changed files with 559 additions and 781 deletions
@@ -1,4 +1,42 @@
jQuery( document ).ready( function() {
/**
* Email templates
*/
/*jQuery( 'body' ).on( 'click', '.copy_email_template', function() {
var obj = jQuery(this);
jQuery.ajax({
url: php_data.copy_email_template,
type: 'POST',
data: { email_key : obj.parents('.email_template_wrapper').data('key') },
success: function(data){
obj.parents('.email_template_wrapper').addClass('in_theme');
},
error: function(data){
alert('Something went wrong');
}
});
});*/
jQuery( 'body' ).on( 'click', '.reset_email_template', function() {
var obj = jQuery(this);
jQuery.ajax({
url: php_data.delete_email_template,
type: 'POST',
data: { email_key : obj.parents('.email_template_wrapper').data('key') },
success: function(data){
obj.parents('.email_template_wrapper').removeClass('in_theme');
},
error: function(data){
alert('Something went wrong');
}
});
});
/**
* Licenses
*/