Fix #467 -- Pluggable email placeholders (#1429)

* Fix #467 -- Pluggable email placeholders

* Previews

* Polishing

* Fix tests

* Add missing doc file
This commit is contained in:
Raphael Michel
2019-10-07 11:48:25 +02:00
committed by GitHub
parent cb37e7435d
commit 1d0c148170
26 changed files with 572 additions and 548 deletions

View File

@@ -6,6 +6,7 @@ function preview_task_callback(data, jqXHR, status) {
var target = $('div[for=' + data.item + '][lang=' + m +']');
if (target.length === 1){
target.html(data.msgs[m]);
target.find('.placeholder').tooltip();
}
}
}
@@ -32,6 +33,7 @@ function preview_task_error(item) {
$(function () {
"use strict";
$('.mail-preview .placeholder').tooltip();
$('a[type=preview]').on('click', function () {
var itemName = $(this).closest('.preview-panel').attr('for');
if ($('#' + itemName + '_panel').data('ajaxing') || $(this).parent('.active').length !== 0) {
@@ -64,4 +66,4 @@ $(function () {
);
});
});
});

View File

@@ -141,6 +141,10 @@ div.mail-preview {
border: 1px solid #ccc;
border-top-width: 1px;
border-radius: 3px;
.placeholder {
background: transparentize($brand-warning, 0.6);
}
}
.mail-preview-group div[lang] {