formagic 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b35ec9359a82d93a94f59959d92bf8c321810604
|
4
|
+
data.tar.gz: aa5b70bc9e0815cee1ae537f653933e34fd995c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7731dbcf8788171a9c06aa3f7624a5e12175a1497f2b9b81ad000f923b4b25d0cb0dfe67c720d3d4fc49b1d8b2a71bb04b5bad5116cc785ab975aadaab7ac667
|
7
|
+
data.tar.gz: 245afc4598580d133021adadb49313422425d366f13ac6c38600225d6f8a81ec9f314f7392fa314195237312dfe86e3b9fd62de514fe2cb362ab45cec4e0689d
|
@@ -33,6 +33,8 @@ class @InputMarkdown extends InputString
|
|
33
33
|
_add_input: ->
|
34
34
|
if @config.htmlFieldName
|
35
35
|
@$inputHtml =$ "<input type='hidden' name='[#{ @config.htmlFieldName }]' />"
|
36
|
+
if @object
|
37
|
+
@$inputHtml.val(@object[@config.htmlFieldName])
|
36
38
|
@$el.append @$inputHtml
|
37
39
|
|
38
40
|
@$input =$ "<input type='hidden' name='#{ @name }' value='#{ @_safe_value() }' />"
|
@@ -78,6 +80,8 @@ class @InputMarkdown extends InputString
|
|
78
80
|
|
79
81
|
@session.on 'change', (e) => @_update_inputs()
|
80
82
|
|
83
|
+
@_update_inputs()
|
84
|
+
|
81
85
|
@config.onInitialize?(this)
|
82
86
|
|
83
87
|
|
@@ -86,6 +90,11 @@ class @InputMarkdown extends InputString
|
|
86
90
|
@_update_inputs()
|
87
91
|
|
88
92
|
|
93
|
+
hash: (hash={}) ->
|
94
|
+
hash[@config.htmlFieldName] = @$inputHtml.val()
|
95
|
+
hash[@config.klassName] = @$input.val()
|
96
|
+
return hash
|
97
|
+
|
89
98
|
chr.formInputs['markdown'] = InputMarkdown
|
90
99
|
|
91
100
|
|
data/lib/formagic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formagic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kravets
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bourbon
|