mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Moving back to ng-bind-html
This commit is contained in:
@@ -15,11 +15,3 @@ Darkswarm.directive "ofnModal", ($modal)->
|
||||
|
||||
elem.on "click", =>
|
||||
scope.modalInstance = $modal.open(controller: ctrl, template: contents, scope: scope.$parent)
|
||||
|
||||
# TODO THIS IS TERRIBLE PLEASE FIX NG-BIND-HTML
|
||||
Darkswarm.directive "injectHtml", ->
|
||||
restrict: 'A'
|
||||
scope:
|
||||
injectHtml: "="
|
||||
link: (scope, elem, attrs, ctrl)->
|
||||
elem.html(scope.injectHtml)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/ Will - scale large images down to 1200px wide, crop in to img aspect ratio 60W:13H
|
||||
%h3.producer-name {{ producer.name }}
|
||||
.row
|
||||
.columns.small-12.large-6{"inject-html" => "producer.long_description"}
|
||||
.columns.small-12.large-6{"ng-bind-html" => "producer.long_description"}
|
||||
.columns.small-12.large-6
|
||||
/ Will needs logic to add in following only if data is available for each type:
|
||||
/ Will needs better formatting of URLs printed on-screen (minus http://www.)
|
||||
@@ -26,12 +26,12 @@
|
||||
%li{"ng-if" => "producer.facebook"}
|
||||
%a{"ng-href" => "{{producer.facebook}}", target: "_blank"}
|
||||
%i.fi-social-facebook
|
||||
{{ producer.facebook }}
|
||||
{{ producer.facebook | stripUrl }}
|
||||
|
||||
%li{"ng-if" => "producer.linkedin"}
|
||||
%a{"ng-href" => "{{producer.linkedin}}", target: "_blank"}
|
||||
%i.fi-social-linkedin
|
||||
{{ producer.linkedin }}
|
||||
{{ producer.linkedin | stripUrl }}
|
||||
|
||||
%li{"ng-if" => "producer.instagram"}
|
||||
%a{"ng-href" => "http://instagram.com/{{producer.instagram}}", target: "_blank"}
|
||||
|
||||
Reference in New Issue
Block a user