Pulling columns dropdown out into a shared partial

This commit is contained in:
Rob Harrington
2015-11-27 08:24:29 +11:00
parent 54e7677888
commit 9eaec6061e
14 changed files with 129 additions and 142 deletions

View File

@@ -1,8 +1,9 @@
angular.module("admin.dropdown").directive "ofnDropDown", ($document) ->
restrict: 'C'
link: (scope, element, attrs) ->
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
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
scope.$emit "offClick"
element.click (event) ->