From 18d966f0de4715f89107dc28a085142a255b3d1a Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Fri, 26 Nov 2021 11:36:54 +0100 Subject: [PATCH] Closes #8441 Confirmation popup on shop change --- .../javascripts/templates/partials/producer_details.html.haml | 3 ++- app/views/producers/_fat.html.haml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/templates/partials/producer_details.html.haml b/app/assets/javascripts/templates/partials/producer_details.html.haml index 0238d99d15..0e4bf23513 100644 --- a/app/assets/javascripts/templates/partials/producer_details.html.haml +++ b/app/assets/javascripts/templates/partials/producer_details.html.haml @@ -14,7 +14,8 @@ %a.cta-hub{"ng-repeat" => "hub in enterprise.hubs | filter:{id: '!'+enterprise.id} | orderBy:'-active'", "ng-href" => "{{::hub.path}}#/shop", "ofn-empties-cart" => "hub", "ng-class" => "::{primary: hub.active, secondary: !hub.active}", - "ng-click" => "$close()"} + "ng-click" => "$close()", + "ofn-change-hub" => "hub"} .hub-name{"ng-bind" => "::hub.name"} %span{"ng-if" => "::hub.active"} ({{'maps_open' | t}}) %span{"ng-if" => "::!hub.active"} ({{'maps_closed' | t}}) diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index fb2d1d8db7..c198621680 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -79,7 +79,7 @@ .columns.small-12 %a.cta-hub{"ng-repeat" => "hub in producer.hubs | orderBy:'-active'", "ng-href" => "{{::hub.path}}", "ng-attr-target" => "{{ embedded_layout ? '_blank' : undefined }}", - "ng-class" => "::{primary: hub.active, secondary: !hub.active}"} + "ng-class" => "::{primary: hub.active, secondary: !hub.active}", "ofn-change-hub" => "hub"} %i.ofn-i_068-shop-reversed{"ng-if" => "::hub.active"} %i.ofn-i_068-shop-reversed{"ng-if" => "::!hub.active"} .hub-name{"ng-bind" => "::hub.name"}