diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index d01e54fffea23392d6b0c40038150de6e102a68b..7f10dd560e8a08007906ab37f477175d01226910 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -89,6 +89,14 @@ <source>Language (Reloads the page):</source> <target>Sprache (lädt die Seite neu):</target> </trans-unit> + <trans-unit id="backend.send_mail_again" approved="yes"> + <source>Send this E-Mail again ?</source> + <target>Diese E-Mail nochmals versenden ?</target> + </trans-unit> + <trans-unit id="backend.send_mail_manually" approved="yes"> + <source>Send this E-Mail now ?</source> + <target>Diese E-Mail jetzt versenden ?</target> + </trans-unit> <trans-unit id="backend.send_test" approved="yes"> <source>Send Preview Mail</source> <target>Sende Vorschau-Mail</target> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 438b638a68ecb15abea981ab6e8c2c7911af8613..15f1d1ac4673e90524699b11c6d0c968dd0dea21 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -69,6 +69,12 @@ <trans-unit id="backend.select_language"> <source>Language (Reloads the page):</source> </trans-unit> + <trans-unit id="backend.send_mail_again"> + <source>Send this E-Mail again ?</source> + </trans-unit> + <trans-unit id="backend.send_mail_manually"> + <source>Send this E-Mail now ?</source> + </trans-unit> <trans-unit id="backend.send_test"> <source>Send Preview Mail</source> </trans-unit> diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html index 756283a516dd39cc85334b53a70f2e95f334f117..fc2dbc9b8a484ae3ea2687eff0f9ea52afa0c23b 100644 --- a/Resources/Private/Layouts/Default.html +++ b/Resources/Private/Layouts/Default.html @@ -1,8 +1,7 @@ {namespace sgm=SGalinski\SgMail\ViewHelpers} <f:be.container enableClickMenu="FALSE" loadExtJs="FALSE" includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheets/backend.css\')}'}"> - <sgm:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/Template.js')}" /> <sgm:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/Backend.js')}" /> - <sgm:inlineLanguageLabels labels="backend.delete_template" /> + <sgm:inlineLanguageLabels labels="backend.delete_template, backend.send_mail_manually, backend.send_mail_again" /> <div class="module" data-module-id="" data-module-name=""> <div class="module-docheader t3js-module-docheader"> <div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation"> diff --git a/Resources/Private/Templates/Queue/Index.html b/Resources/Private/Templates/Queue/Index.html index e6a6bb3a6897f046f7bb1197e381a438dcfb9c36..f022b72796049b59efd27e7ea662888bb437ed99 100644 --- a/Resources/Private/Templates/Queue/Index.html +++ b/Resources/Private/Templates/Queue/Index.html @@ -47,10 +47,10 @@ <td> <f:if condition="{mail.sent} == '0'"> <f:then> - <f:link.action class="btn btn-primary" controller="Queue" action="sendMail" arguments="{uid: mail.uid}">Send Now</f:link.action> + <f:link.action class="btn-send-now btn btn-primary" controller="Queue" action="sendMail" arguments="{uid: mail.uid}">Send Now</f:link.action> </f:then> <f:else> - <f:link.action class="btn btn-warning" controller="Queue" action="sendMail" arguments="{uid: mail.uid}">Send Again</f:link.action> + <f:link.action class="btn-resend btn btn-warning" controller="Queue" action="sendMail" arguments="{uid: mail.uid}">Send Again</f:link.action> </f:else> </f:if> </td> diff --git a/Resources/Public/Scripts/Backend.js b/Resources/Public/Scripts/Backend.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..268a5778508ba7e4b0ab64703f2081312f7fbd10 100644 --- a/Resources/Public/Scripts/Backend.js +++ b/Resources/Public/Scripts/Backend.js @@ -0,0 +1,35 @@ +(function($) { + function resetTemplateListener(_event) { + _event.preventDefault(); + + var confirm = SG.lang.SgMail['backend.delete_template']; + if (window.confirm(confirm)) { + window.location = $(_event.currentTarget).attr('href'); + } + } + + function sendMailListener(_event) { + _event.preventDefault(); + + var confirm = SG.lang.SgMail['backend.send_mail_manually']; + if (window.confirm(confirm)) { + window.location = $(_event.currentTarget).attr('href'); + } + } + + function resendMailListener(_event) { + _event.preventDefault(); + + var confirm = SG.lang.SgMail['backend.send_mail_again']; + if (window.confirm(confirm)) { + window.location = $(_event.currentTarget).attr('href'); + } + } + + $(document).ready(function() { + $('.reset-btn').on('click', resetTemplateListener); + $('.btn-send-now').on('click', sendMailListener); + $('.btn-resend').on('click', resendMailListener); + }); +}) +(TYPO3.jQuery); diff --git a/Resources/Public/Scripts/Template.js b/Resources/Public/Scripts/Template.js deleted file mode 100644 index 7e1e5a369777689e84bf56e212e7217f8de5073d..0000000000000000000000000000000000000000 --- a/Resources/Public/Scripts/Template.js +++ /dev/null @@ -1,15 +0,0 @@ -(function($) { - function resetTemplateListener(_event) { - _event.preventDefault(); - - var confirm = SG.lang.SgMail['backend.delete_template']; - if (window.confirm(confirm)) { - window.location = $(_event.currentTarget).attr('href'); - } - } - - $(document).ready(function() { - $('.reset-btn').on('click', resetTemplateListener); - }); -}) -(TYPO3.jQuery);