type_station 0.4.3 → 0.4.4

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: 6cca8c106a34fca3520edff18876d988b51028bb
4
- data.tar.gz: 8258abcf79d4aa83568c8c5a7c72caa6ff3deb83
3
+ metadata.gz: 4e2ffc4b2c7042e507d468620e3fdf148707eb64
4
+ data.tar.gz: ff3a81a5c9f2ba780c3cc0ccac92e3b6152a1deb
5
5
  SHA512:
6
- metadata.gz: 7d7b12bcb6321a56b8c3a895c1f38ddb75299ec2b78455ec826207c3942acc934e7a08e84b8ad20072d57e1eaaf54bc836cd1a81e04ab16cb4dbbe8ec7df6b23
7
- data.tar.gz: 4b1d7485b7b275f897bbd5b9f332f60f18b8e1ecbf8bca5a5ff2562290c7fe447680eb839f5ddbf052960fc9e89dc8b4a5e0a52bbe33fb672497c3b8ddee9c48
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
- valid = checkValue check_value, field
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.save()
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
- valid = checkValue check_value, field
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
@@ -2,7 +2,7 @@ module TypeStation
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 3
5
+ TINY = 4
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
8
8
  end