Add a key parameter to have possibility of different text inside

- The tooltip between the shopfront and the admin will not be the same
This commit is contained in:
Jean-Baptiste Bellet
2021-02-18 11:28:00 +01:00
parent daa7cca866
commit 3060670466
4 changed files with 6 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ OFNShared.directive "questionMarkWithTooltip", ($tooltip)->
tooltip = $tooltip 'questionMarkWithTooltip', 'questionMarkWithTooltip', 'click'
tooltip.scope =
variant: "="
key: "="
tooltip.templateUrl = "shared/question_mark_with_tooltip_icon.html"
tooltip.replace = true
tooltip.restrict = 'E'

View File

@@ -1,6 +1,6 @@
.joyride-tip-guide.question-mark-tooltip{class: "{{ context }}", ng: {class: "{ in: tt_isOpen, fade: tt_animation }", show: "tt_isOpen"}}
.background{ng: {click: "tt_isOpen = false"}}
.joyride-content-wrapper
{{ "js.shopfront.unit_price_tooltip" | t }}
{{ key | t }}
%span.joyride-nub.bottom

View File

@@ -12,7 +12,8 @@
%question-mark-with-tooltip{"question-mark-with-tooltip" => "_",
"question-mark-with-tooltip-append-to-body" => "true",
"question-mark-with-tooltip-placement" => "top",
"question-mark-with-tooltip-animation" => true}
"question-mark-with-tooltip-animation" => true,
key: "'js.shopfront.unit_price_tooltip.shopfront'"}
{{ variant.unit_price_price | localizeCurrency }} / {{ variant.unit_price_unit }}
.medium-2.large-2.columns.total-price

View File

@@ -2782,7 +2782,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
min_quantity: "Min quantity"
max_quantity: "Max quantity"
price_breakdown: "Price breakdown"
unit_price_tooltip: "This is the unit price of this product. It allows you to compare the price of products independent of packaging sizes & weights."
unit_price_tooltip:
shopfront: "This is the unit price of this product. It allows you to compare the price of products independent of packaging sizes & weights."
variants:
on_demand:
"yes": "On demand"