fixed sending test mail
This commit is contained in:
parent
9b1ab6fc5b
commit
4f65a295fb
1 changed files with 45 additions and 39 deletions
|
@ -56,7 +56,7 @@
|
||||||
<form id="test-form" class="test-form" action="/editorapi/test?editor=grapejs" method="post" style="display: none">
|
<form id="test-form" class="test-form" action="/editorapi/test?editor=grapejs" method="post" style="display: none">
|
||||||
<div class="putsmail-c">
|
<div class="putsmail-c">
|
||||||
<div class="gjs-sm-property" style="font-size: 10px">
|
<div class="gjs-sm-property" style="font-size: 10px">
|
||||||
Hello! I'm a placerholder message.
|
Please enter the email address to send a test to:
|
||||||
<span class="form-status" style="opacity: 0">
|
<span class="form-status" style="opacity: 0">
|
||||||
<i class="fa fa-refresh anim-spin" aria-hidden="true"></i>
|
<i class="fa fa-refresh anim-spin" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -355,25 +355,11 @@
|
||||||
mdlDialog.className += ' ' + mdlClass;
|
mdlDialog.className += ' ' + mdlClass;
|
||||||
testContainer.style.display = 'block';
|
testContainer.style.display = 'block';
|
||||||
md.setTitle('Test your Newsletter');
|
md.setTitle('Test your Newsletter');
|
||||||
md.setContent(testContainer);
|
|
||||||
md.open();
|
|
||||||
md.getModel().once('change:open', function() {
|
|
||||||
mdlDialog.className = mdlDialog.className.replace(mdlClass, '');
|
|
||||||
//clean status
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
pnm.addButton('options', {
|
var modalContent = $('<div>').append(testContainer).html();
|
||||||
id: 'send-test',
|
md.setContent(modalContent);
|
||||||
className: 'fa fa-paper-plane',
|
|
||||||
command: 'send-test',
|
testContainer = $(".gjs-mdl-dialog #test-form");
|
||||||
attributes: {
|
|
||||||
'title': 'Test Newsletter',
|
|
||||||
'data-tooltip-pos': 'bottom',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
var statusFormElC = document.querySelector('.form-status');
|
var statusFormElC = document.querySelector('.form-status');
|
||||||
var statusFormEl = document.querySelector('.form-status i');
|
var statusFormEl = document.querySelector('.form-status i');
|
||||||
|
@ -413,6 +399,26 @@
|
||||||
isValidEmail(email) && localStorage.setItem('testemail', email);
|
isValidEmail(email) && localStorage.setItem('testemail', email);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
md.open();
|
||||||
|
md.getModel().once('change:open', function() {
|
||||||
|
mdlDialog.className = mdlDialog.className.replace(mdlClass, '');
|
||||||
|
//clean status
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
pnm.addButton('options', {
|
||||||
|
id: 'send-test',
|
||||||
|
className: 'fa fa-paper-plane',
|
||||||
|
command: 'send-test',
|
||||||
|
attributes: {
|
||||||
|
'title': 'Test Newsletter',
|
||||||
|
'data-tooltip-pos': 'bottom',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Merge Tag Reference command
|
// Merge Tag Reference command
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue