mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-14 23:47:48 +00:00
15 lines
379 B
CoffeeScript
15 lines
379 B
CoffeeScript
Darkswarm.directive "ofnModal", ($modal)->
|
|
restrict: 'E'
|
|
replace: true
|
|
transclude: true
|
|
template: "<a>{{title}}</a>"
|
|
|
|
link: (scope, elem, attrs, ctrl, transclude)->
|
|
scope.title = attrs.title
|
|
|
|
scope.cancel = ->
|
|
scope.modalInstance.dismiss("cancel")
|
|
|
|
elem.on "click", ->
|
|
scope.modalInstance = $modal.open(controller: ctrl, template: transclude())
|