Added utility options
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
&:last-child
|
||||
&:after
|
||||
content: ""
|
||||
.right-arrow-separated-items
|
||||
> *
|
||||
&:after
|
||||
content: " -> "
|
||||
&:last-child
|
||||
&:after
|
||||
content: ""
|
||||
|
||||
.pull-right
|
||||
float: right
|
||||
|
||||
@@ -21,3 +21,12 @@ export default Ember.Component.extend
|
||||
inputEnter: (value)->
|
||||
#https://github.com/DockYard/ember-one-way-controls/blob/master/addon/components/one-way-input.js
|
||||
invokeAction(@, enter, value) if enter = @get('enter')
|
||||
setAttribute: (value) ->
|
||||
#value = switch @get('type')
|
||||
# when 'integer'
|
||||
# # integer will be value or null
|
||||
# res = Number.parseInt(value)
|
||||
# if Number.isFinite(res) then res else null
|
||||
# else value
|
||||
@set "changeset.#{@get('attribute')}", value
|
||||
false
|
||||
|
||||
@@ -4,9 +4,9 @@ if label
|
||||
else
|
||||
if labelPath
|
||||
label= t labelPath
|
||||
|
||||
one-way-input value=(get changeset attribute) update=(action (mut (get changeset attribute))) onblur=(action 'validateProperty' changeset attribute) disabled=disabled onenter='inputEnter'
|
||||
one-way-input value=(get changeset attribute) update=(action 'setAttribute') onblur=(action 'validateProperty' changeset attribute) disabled=disabled onenter='inputEnter'
|
||||
|
||||
if (get changeset.error attribute)
|
||||
each (get (get changeset.error attribute) 'validation') as |error|
|
||||
.ui.pointing.red.basic.label= error
|
||||
.ui.pointing.red.basic.label class=errorDirection
|
||||
= error
|
||||
|
||||
Reference in New Issue
Block a user