Files
mozo-backend/app/assets/javascripts/supplier/app/components/form/boolean-switch.js.coffee
T
2015-09-23 17:14:53 +02:00

8 lines
329 B
CoffeeScript

App.BooleanSwitchComponent = Ember.Component.extend
layoutName: "form/boolean-switch"
classNames: "switch"
classNameBindings: ['rounded:round']
# UniqueId is used to connect the label and the checkbox to eachother in the template
setUniqueId: (->@set 'switchId', "switch-#{Math.round(Math.random()*1000)}").on('init')