diff --git a/app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee b/app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee index 37de2759ccd..484baf25745 100644 --- a/app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee +++ b/app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee @@ -6,7 +6,7 @@ Darkswarm.filter "localizeCurrency", (currencyConfig)-> # Set decimal points, 2 or 0 if hide_cents. decimals = if currencyConfig.hide_cents == "true" then 0 else 2 # Set format if the currency symbol should come after the number, otherwise (default) use the locale setting. - format = if currencyConfig.symbol_position == "after" then "%n %u" else undefined + format = if currencyConfig.symbol_position == "after" then "%n%u" else undefined # We need to use parseFloat as the amount should come in as a string. amount = parseFloat(amount) diff --git a/app/assets/stylesheets/darkswarm/_shop-product-rows.scss b/app/assets/stylesheets/darkswarm/_shop-product-rows.scss index feb9f54e5dc..bf05fb4829f 100644 --- a/app/assets/stylesheets/darkswarm/_shop-product-rows.scss +++ b/app/assets/stylesheets/darkswarm/_shop-product-rows.scss @@ -59,6 +59,7 @@ // Variant price .variant-price { + white-space: nowrap; @include breakpoint(phablet) { padding-left: 1rem; } diff --git a/spec/javascripts/unit/darkswarm/filters/localize_currency_spec.js.coffee b/spec/javascripts/unit/darkswarm/filters/localize_currency_spec.js.coffee index 2a690ed0a71..d7f17df98ed 100644 --- a/spec/javascripts/unit/darkswarm/filters/localize_currency_spec.js.coffee +++ b/spec/javascripts/unit/darkswarm/filters/localize_currency_spec.js.coffee @@ -26,7 +26,7 @@ describe 'convert number to localised currency ', -> it "can place symbols after the amount", -> currencyconfig.symbol_position = "after" - expect(filter(333.3)).toEqual "333.30 $" + expect(filter(333.3)).toEqual "333.30$" it "can add a currency string", -> currencyconfig.display_currency = "true"