tgios 0.0.8 → 0.0.10
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 +8 -8
- data/Gemfile.lock +1 -1
- data/lib/tgios/ui_table_view_model_binding.rb +24 -2
- data/lib/tgios/ui_table_view_model_list_binding.rb +1 -1
- data/lib/tgios/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjI5MWRlNTljZWVjMDM1MDA2OWVmNDU2Y2ZmNDM5ODUxZGRkNzMzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmMxNThkMTNkOWZmNzZjN2ZmMTZkYmM1MGMwMjAxMmY2OTIzNjBkYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NThhMzYwNmYxODQ0MjliYTVkNWVkMWU5NWY1YTZmMDQ5OGFjMGM0YmIyZTZl
|
10
|
+
NDI0YzE0YzZkMzg2ODg4OTQ1YmE0Mzg2N2EyNGI0ODQ5MDlkNTk1Zjk5Njgy
|
11
|
+
MjM1YjRiOWVlYWZhYTJlZGVkYTgxYzhhMzZkYjNlMzk0OTg1Mjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmJkMzUzYTMyNWI4ZTg4M2IwMzRjNjQwMjU3NjM2ZTUzZTZkYzRiODQzMDUy
|
14
|
+
MWM4ZDc5MzMwOWIxMDZkYTYwZmZmZWI5NmU3OWMyZmM1OTIxYWQ2MTIwYzI2
|
15
|
+
MzMzNmRkYWMxMDIzZThiZGEwMDEwY2Y0ZDI5NWE3YjYzOWZkMTY=
|
data/Gemfile.lock
CHANGED
@@ -34,6 +34,7 @@ module Tgios
|
|
34
34
|
@events[:update_cell]=->(field_set, cell, index_path) { create_or_update_field(field_set, cell, index_path)}
|
35
35
|
@events[:update_accessory]=->(field_set, cell, index_path, ui_field) { update_accessory_type_or_view(field_set, cell, index_path, ui_field)}
|
36
36
|
@events[:update_cell_height]=->(field_set, index_path) { update_cell_height(field_set, index_path) }
|
37
|
+
@contact_buttons = []
|
37
38
|
end
|
38
39
|
|
39
40
|
|
@@ -197,8 +198,29 @@ module Tgios
|
|
197
198
|
end
|
198
199
|
|
199
200
|
def update_accessory_type_or_view(field_set, cell, index_path, ui_field)
|
200
|
-
|
201
|
-
|
201
|
+
|
202
|
+
accessory = field_set[:child_index].nil? ? field_set[:accessory] : field_set[:child_field][:accessory]
|
203
|
+
|
204
|
+
accessory_view = cell.accessoryView
|
205
|
+
if accessory == :contact
|
206
|
+
if accessory_view && accessory_view.buttonType == :contact.uibuttontype
|
207
|
+
contact_button = accessory_view
|
208
|
+
else
|
209
|
+
contact_button = (@contact_buttons.pop || UIButton.contact)
|
210
|
+
cell.accessoryView = contact_button
|
211
|
+
end
|
212
|
+
unhook(contact_button, :tapped)
|
213
|
+
hook(contact_button, :tapped) do
|
214
|
+
tableView(@tableView, didSelectRowAtIndexPath:index_path)
|
215
|
+
end
|
216
|
+
else
|
217
|
+
if accessory_view && accessory_view.buttonType == :contact.uibuttontype
|
218
|
+
@contact_buttons << accessory_view
|
219
|
+
cell.accessoryView = nil
|
220
|
+
end
|
221
|
+
cell.accessoryType = (accessory || :none).uitablecellaccessory
|
222
|
+
cell.accessoryView = nil
|
223
|
+
end
|
202
224
|
end
|
203
225
|
|
204
226
|
def tableView(tableView, didSelectRowAtIndexPath:index_path)
|
@@ -138,7 +138,7 @@ module Tgios
|
|
138
138
|
field_set = field_set_at_index_path(index_path)
|
139
139
|
field_set = field_set[:child_field] unless field_set[:child_index].nil?
|
140
140
|
if field_set[:type] == :big_label || field_set[:type] == :checkbox
|
141
|
-
|
141
|
+
26 + 19 * (field_set[:lines] || 2)
|
142
142
|
else
|
143
143
|
45
|
144
144
|
end
|
data/lib/tgios/version.rb
CHANGED