mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-21 05:09:15 +00:00
WIP: Splitting Variant overrides into views
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
angular.module("admin.dropdown").controller "DropDownCtrl", ($scope) ->
|
||||
$scope.expanded = false
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.dropdown").directive "ofnCloseOnClick", ($document) ->
|
||||
angular.module("admin.dropdown").directive "closeOnClick", () ->
|
||||
link: (scope, element, attrs) ->
|
||||
element.click (event) ->
|
||||
event.stopPropagation()
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
angular.module("admin.dropdown").directive "ofnDropDown", ($document) ->
|
||||
restrict: 'C'
|
||||
scope: true
|
||||
link: (scope, element, attrs) ->
|
||||
scope.expanded = false
|
||||
|
||||
outsideClickListener = (event) ->
|
||||
unless $(event.target).is("div.ofn-drop-down##{attrs.id} div.menu") ||
|
||||
$(event.target).parents("div.ofn-drop-down##{attrs.id} div.menu").length > 0
|
||||
|
||||
Reference in New Issue
Block a user