motion-prime 0.8.5 → 0.8.6

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzczMDQyODkxMTkxZTg5MTY4MjhlYTlkN2NkNmMzNjBiZTI4MTM2Mw==
4
+ MjkxNWIwMDczNzQ2YmQ4ZDI0MTYzZTgyZWZmNjU5NjA1M2JmYzk4Yw==
5
5
  data.tar.gz: !binary |-
6
- Y2IxMjIyNGI0MGM3Y2M4MWM3NWMzMjMxYTY3NjE1OWUwOTM0MzA0NQ==
6
+ ZTcyODg5OGMxNDY3YjUyYmM4ZDIzZjEzY2JjYzg2ZjIxYzE5M2NkYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDZjNmZiZjNiM2IyYTYxZGJjOWNlZTYzM2JiZGJiZWE2YTIxYmRhODE1NDli
10
- ZmFiNTMxNmYzZWE3ZGM2YWQyMTg2ZWEwNTFhYmE4N2VkZTRjZTNjMjUzZmJi
11
- NGEzZjQ5OTY0YjE4Y2JjOWJjOGM4NzMxYzc0MTNjMTNlYTUwNjM=
9
+ YzA4OGEzZTg0NWFkN2QwYmRlZjc3MTljMGM4MDk0MDU3NzY5MzAzMTQzNDJi
10
+ YzU5ODE5NmRjMjRhMDE3MjRlYzRiNWU3M2U2YWVkZGFjNjA0Nzc5NjYwZGY5
11
+ NmVmNzAwNDU5OGM2MmQ4NzY0NzJjNmJiMGJmYWFiYjUzOWQ4MDc=
12
12
  data.tar.gz: !binary |-
13
- YWQ4ZmVmMzM0ZDc5YWQxYzM1YWM2ODM5MDRlMDcwZDE0MjhiNDViZmIzYjI1
14
- MjYzNTc2ZTIzMWIwMTNkMjJiNDIzODM2MTJlYjM1ZWVlNGFkNGE2MGYyYzg4
15
- ZDU0YWNhNzMyZmYzNjRjY2U4NDBkNGJhZjU4MmVhYWYxM2FjZTE=
13
+ ODkxN2E4Y2ExZWQ1OGY4NjRiMmQ2ZTM3ZDU4NThiMDQ0MTliZDcyMzgwYmRl
14
+ ZjUxZDg5YjIwMzEyYzQ1NmZlZDA0YzhjOWU0MDUyNzZiNjhkNDRmOGIzZGMy
15
+ NGJjNDI4NGY0OTNhODFhYWI0NDUxMDM4MmMwMmYxM2M3MDZiOWY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.8.6
2
+ * Ability to pass :after_render to form field.
3
+ * Ability to append data to collection on sync.
4
+ * Bug fixes.
5
+
1
6
  === 0.8.5
2
7
  * Table header improvements.
3
8
  * Fix bug: header section draw elements doesn't work
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- motion-prime (0.8.5)
4
+ motion-prime (0.8.6)
5
5
  afmotion (~> 2.0.0)
6
6
  bubble-wrap (~> 1.4.0)
7
7
  cocoapods
data/files/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'http://rubygems.org'
3
3
  gem 'motion-cocoapods', '~> 1.4.0'
4
4
  gem 'motion-support', '~> 0.2.4'
5
5
 
6
- gem 'motion-prime', '0.8.5'
6
+ gem 'motion-prime', '0.8.6'
7
7
 
8
8
  # add reside menu for sidebar support
9
9
  gem 'prime_reside_menu', '~> 0.1.4'
@@ -181,11 +181,11 @@ module MotionPrime
181
181
  suffixes[:specific] << :"#{name}_with_errors" if has_errors
182
182
  end
183
183
  # form cell: base_form_field, base_form_string_field
184
- # form element: base_form_field_string_field, base_form_string_field_text_field
184
+ # form element: base_form_field_string_field, base_form_string_field_text_field, base_form_string_field_input
185
185
  # table cell: base_table_cell
186
186
  # table element: base_table_cell_image
187
187
  common_styles = if suffixes[:common].any?
188
- build_styles_chain(base_styles[:common], suffixes[:common])
188
+ build_styles_chain(base_styles[:common], suffixes.values.flatten)
189
189
  elsif suffixes[:specific].any?
190
190
  build_styles_chain(base_styles[:common], suffixes[:specific])
191
191
  elsif @view_name == 'table_view_cell'
@@ -264,7 +264,7 @@ module MotionPrime
264
264
  unless model
265
265
  old_model.delete
266
266
  end
267
- end
267
+ end unless sync_options[:append]
268
268
  end
269
269
  save if sync_options[:save] && has_changed?
270
270
  self.store.save_interval = 1
@@ -10,6 +10,7 @@ module MotionPrime
10
10
  end
11
11
 
12
12
  def add_sections
13
+ @main_section = nil
13
14
  create_sections
14
15
  render_sections
15
16
  end
@@ -178,6 +178,14 @@ module MotionPrime
178
178
  super
179
179
  end
180
180
 
181
+ def on_cell_render(cell, index)
182
+ options = data[index.row].try(:options)
183
+ if options && options[:after_render]
184
+ self.send(options[:after_render])
185
+ end
186
+ super
187
+ end
188
+
181
189
  # Table View Delegate
182
190
  # ---------------------
183
191
 
@@ -7,6 +7,7 @@ MotionPrime::Styles.define :base_form do
7
7
  top: nil,
8
8
  width: 320,
9
9
  size_to_fit: true
10
+
10
11
  style :header_hint,
11
12
  left: 0,
12
13
  bottom: 5,
@@ -21,9 +22,6 @@ MotionPrime::Styles.define :base_form do
21
22
  left: 0,
22
23
  right: 0
23
24
 
24
- # available options for string label:
25
- # @background_color: COLOR
26
- # @text_color: COLOR
27
25
  style :field_label,
28
26
  background_color: :clear,
29
27
  text_color: :gray,
@@ -42,12 +40,7 @@ MotionPrime::Styles.define :base_form do
42
40
  text_color: :app_error,
43
41
  font: proc { :app_base.uifont(12) }
44
42
 
45
- # available options for input:
46
- # @layer: @border_width: FLOAT
47
- # @layer: @border_color: COLOR
48
- # @background_color: COLOR
49
- # @background_image: PATH_TO_FILE
50
- style :field_text_field, :field_text_view,
43
+ style :string_field_input, :password_field_input, :text_field_input,
51
44
  layer: {
52
45
  border_width: 1,
53
46
  border_color: :gray
@@ -58,7 +51,7 @@ MotionPrime::Styles.define :base_form do
58
51
  left: 0,
59
52
  right: 0,
60
53
  top: 30,
61
- bottom: 0
54
+ height: 30
62
55
 
63
56
  style :date_field_input,
64
57
  width: 300,
@@ -1,3 +1,3 @@
1
1
  module MotionPrime
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-prime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-27 00:00:00.000000000 Z
12
+ date: 2014-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake