From 31b4c06ea3874c38442013e9754207f46401ca27 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 16 Jan 2022 11:02:28 +0000 Subject: [PATCH] Update rendering and shipping_type_selector directive --- .../darkswarm/directives/shipping_type_selector.js.coffee | 4 +--- app/views/shops/_filters.html.haml | 2 +- app/views/shops/_shipping_type_selector.html.haml | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/darkswarm/directives/shipping_type_selector.js.coffee b/app/assets/javascripts/darkswarm/directives/shipping_type_selector.js.coffee index b7ffe71eb9..bf89254298 100644 --- a/app/assets/javascripts/darkswarm/directives/shipping_type_selector.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/shipping_type_selector.js.coffee @@ -1,8 +1,6 @@ angular.module('Darkswarm').directive "shippingTypeSelector", -> # Builds selector for shipping types - restrict: 'E' - replace: true - templateUrl: 'shipping_type_selector.html' + restrict: 'C' link: (scope, elem, attr)-> scope.shippingTypes = pickup: false diff --git a/app/views/shops/_filters.html.haml b/app/views/shops/_filters.html.haml index 1e62405be3..f3011a0a25 100644 --- a/app/views/shops/_filters.html.haml +++ b/app/views/shops/_filters.html.haml @@ -19,7 +19,7 @@ .light = t :hubs_filter_by = t :hubs_filter_delivery - %shipping-type-selector + = render "shops/shipping_type_selector" .small-12.large-12.columns %h5.tdhead diff --git a/app/views/shops/_shipping_type_selector.html.haml b/app/views/shops/_shipping_type_selector.html.haml index 45f35911d4..db7c8319c7 100644 --- a/app/views/shops/_shipping_type_selector.html.haml +++ b/app/views/shops/_shipping_type_selector.html.haml @@ -1,4 +1,4 @@ -%ul.small-block-grid-2.medium-block-grid-4.large-block-grid-2 +%ul.shipping-type-selector.small-block-grid-2.medium-block-grid-4.large-block-grid-2 %active-selector{"ng-repeat" => "(name, selector) in selectors"} %i{"ng-class" => "selector.icon"} - {{ selector.translation_key | t | capitalize }} \ No newline at end of file + {{ selector.translation_key | t | capitalize }}