ProMotion-XLForm 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/lib/ProMotion/XLForm/xl_form.rb +12 -0
- data/lib/ProMotion/XLForm/xl_form_screen.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f4516179e94ade36bb17161d5b1c0775dc98e22
|
4
|
+
data.tar.gz: b0e89a0b694883ed6d6e3e1e4a14ef3ef3605433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d54c52b617a102888760cb0be282046f8dfd8fe9cabc53f2f7524c5ce9c3b75be42ef4d001360f3837332c45e7447a2630145edbdff65bd253ad35b5962d0e4a
|
7
|
+
data.tar.gz: 10310f4f000a594e79ff2e3a0d13030c70c44bec98e11315ce6226079e4955c1c20400103d4441d646e5039139115e86ec2975c4c790feeb582305a4bb9474b3
|
data/README.md
CHANGED
@@ -5,10 +5,12 @@ ProMotion-XLForm provides a PM::XLFormScreen for [ProMotion](https://github.com/
|
|
5
5
|
## Warning
|
6
6
|
This gem is currently in very early-stage. Use it at your own risk :)
|
7
7
|
|
8
|
+
[![Build Status](https://travis-ci.org/bmichotte/ProMotion-XLForm.svg?branch=master)](https://travis-ci.org/bmichotte/ProMotion-XLForm)
|
9
|
+
|
8
10
|
## Installation
|
9
11
|
|
10
12
|
```ruby
|
11
|
-
gem 'ProMotion-
|
13
|
+
gem 'ProMotion-XLForm'
|
12
14
|
```
|
13
15
|
|
14
16
|
Then:
|
@@ -49,9 +51,10 @@ class TestFormScreen < PM::XLFormScreen
|
|
49
51
|
name: :sex,
|
50
52
|
type: :selector_push,
|
51
53
|
options: {
|
52
|
-
|
53
|
-
|
54
|
-
|
54
|
+
male: 'Male',
|
55
|
+
female: 'Female',
|
56
|
+
other: 'Other'
|
57
|
+
}
|
55
58
|
}
|
56
59
|
]
|
57
60
|
}
|
@@ -56,6 +56,18 @@ module ProMotion
|
|
56
56
|
# placeholder
|
57
57
|
cell.cellConfigAtConfigure.setObject(cell_data[:placeholder], forKey: "textField.placeholder") if cell_data[:placeholder]
|
58
58
|
|
59
|
+
# step_counter
|
60
|
+
if cell_data[:type] == :step_counter
|
61
|
+
min = properties[:min]
|
62
|
+
max = properties[:max]
|
63
|
+
step = properties[:step]
|
64
|
+
|
65
|
+
cell.cellConfigAtConfigure.setObject(true, forKey: "stepControl.wraps")
|
66
|
+
cell.cellConfigAtConfigure.setObject(min, forKey: "stepControl.minimumValue") if min
|
67
|
+
cell.cellConfigAtConfigure.setObject(max, forKey: "stepControl.maximumValue") if max
|
68
|
+
cell.cellConfigAtConfigure.setObject(step, forKey: "stepControl.maximumValue") if step
|
69
|
+
end
|
70
|
+
|
59
71
|
# slider
|
60
72
|
if cell_data[:type] == :slider
|
61
73
|
min = properties[:min]
|
@@ -105,6 +105,17 @@ module ProMotion
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
+
def cell_with_tag(tag)
|
109
|
+
if tag.respond_to? :to_s
|
110
|
+
tag = tag.to_s
|
111
|
+
end
|
112
|
+
self.form.formRowWithTag(tag)
|
113
|
+
end
|
114
|
+
|
115
|
+
def reload(cell)
|
116
|
+
reloadFormRow(cell)
|
117
|
+
end
|
118
|
+
|
108
119
|
protected
|
109
120
|
def on_cancel(_)
|
110
121
|
form_options = self.class.get_form_options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ProMotion-XLForm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Michotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ProMotion
|