mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
Fixing my modal and the tests
This commit is contained in:
@@ -2,17 +2,14 @@ Darkswarm.directive "ofnModal", ($modal)->
|
||||
restrict: 'E'
|
||||
replace: true
|
||||
transclude: true
|
||||
scope: {}
|
||||
template: "<a>{{title}}</a>"
|
||||
|
||||
link: (scope, elem, attrs, ctrl, transclude)->
|
||||
scope.title = attrs.title
|
||||
|
||||
contents = null
|
||||
transclude scope, (clone)->
|
||||
contents = clone
|
||||
|
||||
scope.cancel = ->
|
||||
scope.modalInstance.dismiss("cancel")
|
||||
|
||||
elem.on "click", ->
|
||||
elem.on "click", =>
|
||||
scope.modalInstance = $modal.open(controller: ctrl, template: contents)
|
||||
|
||||
Reference in New Issue
Block a user