From e5f29bd59203489fbd976c47ee6447ea28af16f0 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Wed, 11 Dec 2024 08:29:55 +0100 Subject: [PATCH] Widget: add span around currency for easier styling --- .../static/pretixpresale/js/widget/widget.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js index 3199ffb4b6..0431699917 100644 --- a/src/pretix/static/pretixpresale/js/widget/widget.js +++ b/src/pretix/static/pretixpresale/js/widget/widget.js @@ -333,12 +333,12 @@ Vue.component('availbox', { }); Vue.component('pricebox', { template: ('
' - + '{{ priceline }}' + + '' + '' + '{{ original_line }} ' - + '{{ priceline }}' + + '' + '
' - + '{{ $root.currency }} ' + + '{{ $root.currency }} ' + '' @@ -391,7 +391,7 @@ Vue.component('pricebox', { } return strings.free; } else { - return this.$root.currency + " " + this.display_price; + return '' + this.$root.currency + " " + this.display_price; } }, taxline: function () { @@ -497,7 +497,7 @@ Vue.component('item', { + ' :mandatory_priced_addons="item.mandatory_priced_addons" :suggested_price="item.suggested_price"' + ' :field_name="\'price_\' + item.id" :original_price="item.original_price">' + '' - + '
{{ pricerange }}
' + + '
' + ' ' + '
' @@ -588,9 +588,10 @@ Vue.component('item', { return django.interpolate(strings.price_from, { 'currency': this.$root.currency, 'price': floatformat(this.item.min_price, 2) - }, true); + }, true).replace(this.$root.currency, '' + this.$root.currency + ''); } else if (this.item.min_price !== this.item.max_price) { - return this.$root.currency + " " + floatformat(this.item.min_price, 2) + " – " + return '' + this.$root.currency + " " + + floatformat(this.item.min_price, 2) + " – " + floatformat(this.item.max_price, 2); } else if (this.item.min_price === "0.00" && this.item.max_price === "0.00") { if (this.item.mandatory_priced_addons) { @@ -598,7 +599,7 @@ Vue.component('item', { } return strings.free; } else { - return this.$root.currency + " " + floatformat(this.item.min_price, 2); + return '' + this.$root.currency + " " + floatformat(this.item.min_price, 2); } }, variationsToggleLabel: function () {