mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Adding a learn more modal, restructuring partials
This commit is contained in:
13
app/assets/javascripts/darkswarm/directives/modal.js.coffee
Normal file
13
app/assets/javascripts/darkswarm/directives/modal.js.coffee
Normal file
@@ -0,0 +1,13 @@
|
||||
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(template: transclude())
|
||||
Reference in New Issue
Block a user