revelry_core 0.1.6.6 → 0.1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d904505b5997916d901f371325431d99ed33c92b
|
4
|
+
data.tar.gz: 559eb47840d37e275ed4d1c50da7257fd9097850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a6112a4d1fb6623b850a6837e4491a717a09336df71191ccdb78f5b8dc09a0649df64f5115233a0c5ae559c9403995337d12d315c5b79c9809533cddc39f3cf
|
7
|
+
data.tar.gz: 96b1e9ef28399080968ed4cf803e3cf23806b15bda8be2fb2967f9b2feeb2b4829ef95b54f3a980b091086228b4bd4f7122433af6decf718836c6586df793dcc
|
@@ -22,8 +22,20 @@ Rev.registerExample 'ModelForm',
|
|
22
22
|
getInitialState: ->
|
23
23
|
model: new ExampleModel()
|
24
24
|
|
25
|
+
componentDidMount: ->
|
26
|
+
@state.model.on 'all', @modelUpdated
|
27
|
+
|
28
|
+
componentWillUnmount: ->
|
29
|
+
@state.model.off 'all', @modelUpdated
|
30
|
+
|
31
|
+
modelUpdated: ->
|
32
|
+
@forceUpdate()
|
33
|
+
|
25
34
|
render: ->
|
26
35
|
<div>
|
36
|
+
<div>
|
37
|
+
{ JSON.stringify(@state.model.attributes) }
|
38
|
+
</div>
|
27
39
|
<ModelForm model={ @state.model }>
|
28
40
|
<Row>
|
29
41
|
<Col>
|
@@ -33,6 +45,14 @@ Rev.registerExample 'ModelForm',
|
|
33
45
|
<Row>
|
34
46
|
<Col><ModelInput field="name" type="text" placeholder="This field is required" model={ @state.model } /></Col>
|
35
47
|
<Col><ModelInput field="optional" type="text" placeholder="This field is optional" model={ @state.model } /></Col>
|
48
|
+
<Col><ModelInput field="textarea" type="textarea" model={ @state.model } /></Col>
|
49
|
+
<Col>
|
50
|
+
<ModelInput field="select" type="select" model={ @state.model }>
|
51
|
+
<option></option>
|
52
|
+
<option value="option1">Option 1</option>
|
53
|
+
<option value="option2">Option 2</option>
|
54
|
+
</ModelInput>
|
55
|
+
</Col>
|
36
56
|
<Col><button>Try it out</button></Col>
|
37
57
|
</Row>
|
38
58
|
</ModelForm>
|
@@ -12,16 +12,18 @@ Rev.registerComponent 'ModelInput',
|
|
12
12
|
|
13
13
|
render: ->
|
14
14
|
form_params =
|
15
|
-
defaultValue: @
|
15
|
+
defaultValue: @defaultValue()
|
16
16
|
name: @name()
|
17
17
|
|
18
|
-
if @props.type
|
19
|
-
t =
|
18
|
+
if @props.type in ['textarea', 'select']
|
19
|
+
t = @props.type
|
20
20
|
|
21
21
|
if @isCheckbox()
|
22
22
|
form_params['defaultChecked'] = @value()
|
23
23
|
|
24
|
-
<Rev.Components.Input key="#{ @props.model.cid }-#{ @name() }" dom={t} {...form_params} {...@props} onChange={ @onChange } error={ @state.error } onBlur={ @onBlur }
|
24
|
+
<Rev.Components.Input key="#{ @props.model.cid }-#{ @name() }" dom={t} {...form_params} {...@props} onChange={ @onChange } error={ @state.error } onBlur={ @onBlur }>
|
25
|
+
{ @props.children }
|
26
|
+
</Rev.Components.Input>
|
25
27
|
|
26
28
|
componentDidMount: ->
|
27
29
|
@listenTo @props.model, 'error', @onError
|
@@ -14,6 +14,9 @@ Rev.registerComponent 'Tabs',
|
|
14
14
|
state =
|
15
15
|
activeTabKey: activeTabKey
|
16
16
|
|
17
|
+
componentWillReceiveProps: (nextProps)->
|
18
|
+
@setState activeTabKey: nextProps.activeKey if nextProps.activeKey
|
19
|
+
|
17
20
|
renderTab: (child) ->
|
18
21
|
key = child.key
|
19
22
|
className = @classSet
|
data/lib/revelry_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revelry_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.6.
|
4
|
+
version: 0.1.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Revelry Labs, LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|