mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Voucher bulk creation: Add markdown preview for email field (#3143)
This commit is contained in:
@@ -30,11 +30,9 @@ function preview_task_error(item) {
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
$('.mail-preview .placeholder').tooltip();
|
||||
$('a[type=preview]').on('click', function () {
|
||||
function mail_preview_setup($el) {
|
||||
$el.find('.mail-preview .placeholder').tooltip();
|
||||
$el.find('a[type=preview]').on('click', function () {
|
||||
var itemName = $(this).closest('.preview-panel').attr('for');
|
||||
if ($('#' + itemName + '_panel').data('ajaxing') || $(this).parent('.active').length !== 0) {
|
||||
return;
|
||||
@@ -66,4 +64,12 @@ $(function () {
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
mail_preview_setup($("body"));
|
||||
$(document).on("pretix:bind-forms", function () {
|
||||
mail_preview_setup($("body"));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -181,7 +181,7 @@ div.mail-preview {
|
||||
border-top-width: 0;
|
||||
margin-bottom: 0;
|
||||
padding-right: 15px;
|
||||
padding-bottom: 15px;
|
||||
padding-bottom: 8px;
|
||||
|
||||
&:first-child {
|
||||
@include border-top-radius($input-border-radius);
|
||||
@@ -217,6 +217,12 @@ div.mail-preview {
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
/* Reset styling from bootstrap that we don't actually have in emails */
|
||||
pre {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.search-line {
|
||||
|
||||
Reference in New Issue
Block a user