mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Cart: Display subevent location and end time in cart (#2191)
This commit is contained in:
@@ -79,4 +79,24 @@ $(function () {
|
||||
e.preventDefault();
|
||||
return true;
|
||||
});
|
||||
|
||||
$(".cart-icon-details.collapse-lines").each(function () {
|
||||
var $content = $(this).find(".content");
|
||||
var original_html = $content.html();
|
||||
var br_exp = /<br\s*\/?>/i;
|
||||
$content.text(original_html.split(br_exp).join(', '));
|
||||
if ($content.get(0).scrollWidth > $content.get(0).offsetWidth) {
|
||||
var $handler = $("<button>")
|
||||
.text($(this).attr("data-expand-text"))
|
||||
.addClass("btn btn-link collapse-handler")
|
||||
.attr("aria-controls", $content.attr('id'))
|
||||
.attr("aria-expanded", "false");
|
||||
$handler.on("click", function (ev) {
|
||||
$content.html(original_html);
|
||||
$handler.attr("aria-expanded", "true").attr("aria-hidden", "true");
|
||||
$handler.hide();
|
||||
});
|
||||
$(this).append($handler);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
@@ -66,6 +66,32 @@
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-icon-details {
|
||||
position: relative;
|
||||
padding-left: 1.4em;
|
||||
text-indent: 0;
|
||||
.fa, svg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: .22em;
|
||||
}
|
||||
|
||||
&.collapse-lines {
|
||||
.content {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.collapse-handler {
|
||||
cursor: pointer;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.apply-voucher {
|
||||
|
||||
Reference in New Issue
Block a user