<NME> max.js.coffee
<BEF> ADDFILE
<MSG> Handling max quantity magically

<DFF> @@ -0,0 +1,6 @@
+Darkswarm.directive "max",  ->
+  restrict: 'A'
+  link: (scope, elem, attr)->
+    elem.bind 'input', ->
+      if elem.val() > +attr.max
+        elem.val attr.max

{'addition_count': 6, 'commit_subject': 'Handling max quantity magically', 'deletion_count': 0, 'file_extension': '.coffee', 'lang': 'js', 'license': 'agpl-3.0', 'repo_name': 'openfoodfoundation/openfoodnetwork'}