type_station 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/type_station/editables/entity_editor.js.coffee +12 -3
- data/lib/type_station/version.rb +1 -1
- data/spec/dummy/log/development.log +2281 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48d06b052d87bd96e9e9b8a50a69b18a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4c48023968030daffd8c05e4e1ea78bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/722eee3ce416c20905dda68eab3d517e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/973acef0f44b868ef5c17c4d65d80ab0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/afa9de4377b9615980b737000fc68a2a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b62bf39167cc044d19958ff731ef6578 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ccc931022e80caf6ac008099f2589e7d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d5de77884a5b0a88b13f76a0d8d2075e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d63daaafe9be33950037e285fb142eb5 +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e2ffc4b2c7042e507d468620e3fdf148707eb64
|
4
|
+
data.tar.gz: ff3a81a5c9f2ba780c3cc0ccac92e3b6152a1deb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f81f9bfb2cb4b3c3c72b574d1303106c634a423bba8209f2b244e5c04ec3a477cfe524c13b01c40ea75aeef0d003317a45094e7b4b99a363b3db2854fad07d5
|
7
|
+
data.tar.gz: f88ff5fcbbb7bb21b888b1dad8fe87409d0446261365283690699a3c7afdbbe8b4af791df7e2bf8865c80e77ecf87bea84281ed412f46600fd78ccbd2640b59e
|
@@ -108,7 +108,9 @@ handleCreateEditEntity = (editor) ->
|
|
108
108
|
valid = valid && checkValue check_value, field
|
109
109
|
else
|
110
110
|
check_value = v.replace(/[\'\"\=\|\@\{\}\.\,\:\;\/\&\?\!\(\)]/g, '')
|
111
|
-
|
111
|
+
if check_value.length > 0
|
112
|
+
if check_value.length > 1 # seems to be an issue when the text length is around 1 ? :confused:
|
113
|
+
valid = checkValue check_value, field
|
112
114
|
|
113
115
|
else
|
114
116
|
break
|
@@ -118,7 +120,11 @@ handleCreateEditEntity = (editor) ->
|
|
118
120
|
message: 'Are you sure you want to save changes?'
|
119
121
|
callback: (value) ->
|
120
122
|
if value
|
121
|
-
self.ts.
|
123
|
+
self.ts.callbacks['onSave']() if self.ts.callbacks['onSave']
|
124
|
+
self.ts.models.each (id, m) ->
|
125
|
+
m.save() if m.id != model.id
|
126
|
+
self.ts.callbacks['onSaved']() if self.ts.callbacks['onSaved']
|
127
|
+
|
122
128
|
for k,v of data
|
123
129
|
model.set(k, { field: k, value: v, type: self.fields[k].type })
|
124
130
|
model.save ->
|
@@ -148,7 +154,9 @@ handleCreateEditEntity = (editor) ->
|
|
148
154
|
valid = valid && checkValue check_value, field
|
149
155
|
else
|
150
156
|
check_value = v.replace(/[\'\"\=\|\@\{\}\.\,\:\;\/\&\?\!\(\)]/g, '')
|
151
|
-
|
157
|
+
if check_value.length > 0
|
158
|
+
if check_value.length > 1 # seems to be an issue when the text length is around 1 ? :confused:
|
159
|
+
valid = checkValue check_value, field
|
152
160
|
else
|
153
161
|
break
|
154
162
|
contents.push({ field: k, value: v, type: field.type })
|
@@ -179,6 +187,7 @@ checkValue = (value, field) ->
|
|
179
187
|
if field.type == 'multiple_select'
|
180
188
|
testValue value
|
181
189
|
else
|
190
|
+
console.log value.length
|
182
191
|
if value.length > 0
|
183
192
|
if value.length > 1 # seems to be an issue when the text length is around 1 ? :confused:
|
184
193
|
testValue value
|