Merge branch 'master' of github.com:Mailtrain-org/mailtrain into access
This commit is contained in:
commit
e7856bfb73
8 changed files with 368 additions and 364 deletions
|
@ -129,6 +129,7 @@
|
|||
<script>
|
||||
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': '{{csrfToken}}' } });
|
||||
|
||||
var serviceUrl = '{{{serviceUrl}}}';
|
||||
var resource = {{{stringifiedResource}}};
|
||||
|
||||
var config = (function(mode) {
|
||||
|
@ -155,7 +156,6 @@
|
|||
|
||||
// convert relative to absolute urls
|
||||
['mj-wrapper', 'mj-section', 'mj-navbar', 'mj-hero', 'mj-image'].forEach(function(tagName) {
|
||||
var serviceUrl = window.location.protocol + '//' + window.location.host + '/';
|
||||
var elements = doc.getElementsByTagName(tagName);
|
||||
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
|
@ -246,6 +246,14 @@
|
|||
document.body.appendChild(frame);
|
||||
var frameDoc = frame.contentDocument || frame.contentWindow.document;
|
||||
|
||||
var isLocalImage = function(src) {
|
||||
var a1 = document.createElement('a');
|
||||
var a2 = document.createElement('a');
|
||||
a1.href = serviceUrl;
|
||||
a2.href = src;
|
||||
return a1.host === a2.host;
|
||||
};
|
||||
|
||||
frame.onload = function() {
|
||||
var imgs = frameDoc.querySelectorAll('img');
|
||||
|
||||
|
@ -253,7 +261,9 @@
|
|||
var img = imgs[i];
|
||||
var m = img.src.match(/\/editorapi\/img\?src=([^&]*)/);
|
||||
var encodedSrc = m && m[1] || encodeURIComponent(img.src);
|
||||
img.src = '/editorapi/img?src=' + encodedSrc + '&method=resize¶ms=' + img.clientWidth + '%2C' + img.clientHeight;
|
||||
if (isLocalImage(decodeURIComponent(encodedSrc))) {
|
||||
img.src = '/editorapi/img?src=' + encodedSrc + '&method=resize¶ms=' + img.clientWidth + '%2C' + img.clientHeight;
|
||||
}
|
||||
}
|
||||
|
||||
html = '<!doctype html>' + frameDoc.documentElement.outerHTML;
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2><span class="glyphicon glyphicon-send"></span> {{#translate}}Send via Any Provider{{/translate}}</h2>
|
||||
<p>{{#translate}}Mailtrain recommends <a href="https://sendpulse.com/?utm_source=mailtrain&utm_medium=providerlist">SendPulse</a> even though you can use any provider that supports SMTP protocol to send out your newsletters. Bounce and complaints handling via webhooks is supported for SES, SparkPost, SendGrid and Mailgun, also for Postfix and ZoneMTA.{{/translate}}</p>
|
||||
<p>{{#translate}}You can use any provider that supports SMTP protocol to send out your newsletters. Bounce and complaints handling via webhooks is supported for SES, SparkPost, SendGrid and Mailgun, also for Postfix and ZoneMTA.{{/translate}}</p>
|
||||
<button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target=".modal-send-via-any-provider">{{#translate}}Show more{{/translate}}</button>
|
||||
{{> modal_carousel
|
||||
title='Send via Any Provider'
|
||||
|
@ -130,40 +130,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<div class="row" style="background: #eee;">
|
||||
<div class="col-md-8">
|
||||
<h3>{{#translate}}Donate to Author{{/translate}}</h3>
|
||||
<p>{{#translate}}Mailtrain is available under GPLv3 license and completely open source.{{/translate}}</p>
|
||||
<p>{{#translate}}If you really like Mailtrain or your business benefits from it financially then I would really appreciate a small donation to keep the Mailtrain development engines running. You can either use Bitcoin or PayPal for donations. My Bitcoin wallet is{{/translate}}: <code>15Z8ADxhssKUiwP3jbbqJwA21744KMCfTM</code></p>
|
||||
<p style="margin-bottom: 20px;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DB26KWR2BQX5W" class="btn btn-info">{{#translate}}Or Donate Using Paypal{{/translate}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>{{#translate}}Official Mailtrain Partners{{/translate}}</h3>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p>
|
||||
<a href="https://sendpulse.com/?utm_source=mailtrain&utm_medium=logo">
|
||||
<img class="media-object" src="/images/sendpulse-logo.png" alt="SendPulse">
|
||||
</a>
|
||||
</p>
|
||||
<p>{{#translate}}A reliable SMTP server, easy integration, and 12,000 messages a month free{{/translate}}</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p>
|
||||
<a href="http://www.iredmail.org/">
|
||||
<img class="media-object" src="/images/iredmail-logo.png" alt="iRedMail">
|
||||
</a>
|
||||
</p>
|
||||
<p>{{#translate}}Free, open source mail server solution{{/translate}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p><br><br><br></p>
|
||||
|
|
|
@ -252,12 +252,9 @@
|
|||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="pull-right">
|
||||
<div class="text-right">
|
||||
<button type="submit" id="verify-button" form="smtp-verify" class="btn btn-info" data-loading-text="{{#translate}}Checking{{/translate}}…"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> {{#translate}}Check Mailer config{{/translate}}</button>
|
||||
</div>
|
||||
<div class="col-sm-offset-2 col-xs-6">
|
||||
<p class="form-control-static">{{#translate}}Don't have an SMTP account yet? Create a free SendPulse account{{/translate}} <a href="https://sendpulse.com/?utm_source=mailtrain&utm_medium=settings">{{#translate}}here{{/translate}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue