rounding decimal quantities in shopfront

This commit is contained in:
Maikel Linke
2015-09-04 16:15:02 +10:00
parent 0895bd8647
commit 6a2af09006

View File

@@ -2,5 +2,4 @@ Darkswarm.directive "integer", ->
restrict: 'A'
link: (scope, elem, attr) ->
elem.bind 'input', ->
digits = elem.val().replace(/\D/g, "")
elem.val digits
elem.val Math.round(elem.val())