mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
13 lines
326 B
CoffeeScript
13 lines
326 B
CoffeeScript
Darkswarm.directive "activeSelector", ->
|
|
restrict: 'E'
|
|
transclude: true
|
|
replace: true
|
|
templateUrl: 'active_selector.html'
|
|
link: (scope, elem, attr)->
|
|
scope.selector.emit = scope.emit
|
|
elem.bind "click", ->
|
|
scope.$apply ->
|
|
scope.selector.active = !scope.selector.active
|
|
scope.emit()
|
|
|