anjlab-widgets 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/lib/anjlab-widgets/simple_form.rb +6 -6
- data/lib/anjlab-widgets/version.rb +1 -1
- data/spec/dummy/app/assets/stylesheets/application.css.scss +1 -1
- data/spec/dummy/app/controllers/widgets_controller.rb +3 -0
- data/spec/dummy/app/views/widgets/simple_form.html.erb +6 -0
- data/spec/dummy/config/initializers/simple_form.rb +4 -0
- data/spec/dummy/config/routes.rb +1 -0
- metadata +41 -55
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c90906072e488491995605f9f985a2123d2e02d1
|
4
|
+
data.tar.gz: 86661e1be6f1eef10ffe03d6e8ce673936d4ad7b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b90011e63c5d14428eb1e090c11042391c82bad60053282250ffd8fa14f7da48b5a089d7f2d0c49c17798ceeccaebb4d3ccd1842a931fdb2d5007688d774fc3a
|
7
|
+
data.tar.gz: cc9503205f2ed42de42e341f57b02cc8d0e53751392d146ae3d5e5048a012ded42d366aac31e65d860477c8e20da766c593b8233070e036a66b2960778d810b3
|
data/Gemfile
CHANGED
@@ -9,7 +9,7 @@ module Anjlab
|
|
9
9
|
def input
|
10
10
|
time = options[:value] || @builder.object[attribute_name]
|
11
11
|
|
12
|
-
html = ''
|
12
|
+
html = ''.html_safe
|
13
13
|
|
14
14
|
allow_blank = !options[:required]
|
15
15
|
|
@@ -30,22 +30,22 @@ module Anjlab
|
|
30
30
|
:class => "#{input_html_options[:time_class] || 'input-small'}"
|
31
31
|
}
|
32
32
|
|
33
|
-
default_parts = [''] * 5
|
34
|
-
|
35
33
|
case input_type
|
36
34
|
when :datetime, :anjlab_datetime
|
37
35
|
html << @builder.text_field(attribute_name, date_data)
|
38
|
-
html << ' '
|
36
|
+
html << ' '.html_safe
|
39
37
|
html << @builder.text_field(attribute_name, time_data)
|
38
|
+
values = time ? [time.year, time.month, time.day, time.hour, time.min] : [''] * 5
|
40
39
|
when :date, :anjlab_date
|
41
40
|
html << @builder.text_field(attribute_name, date_data)
|
41
|
+
values = time ? [time.year, time.month, time.day] : [''] * 3
|
42
42
|
when :time, :anjlab_time
|
43
|
+
html << @builder.text_field(attribute_name, time_data)
|
43
44
|
now = Time.now
|
44
45
|
default_parts = [now.year, now.month, now.day, '', '']
|
45
|
-
|
46
|
+
values = time ? [time.year, time.month, time.day, time.hour, time.min] : default_parts
|
46
47
|
end
|
47
48
|
|
48
|
-
values = time ? [time.year, time.month, time.day, time.hour, time.min] : default_parts
|
49
49
|
values.each_with_index do |v, index|
|
50
50
|
i = index + 1
|
51
51
|
html << @builder.hidden_field("#{attribute_name}(#{i}i)", value: v, class: "js-aw-#{i}i")
|
data/spec/dummy/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,96 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anjlab-widgets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 1.0.2
|
4
|
+
version: 1.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Yury Korolev
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: anjlab-bootstrap-rails
|
16
|
-
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 2.0.3
|
22
|
-
|
23
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
|
-
- -
|
24
|
+
- - '>='
|
26
25
|
- !ruby/object:Gem::Version
|
27
26
|
version: 2.0.3
|
28
|
-
prerelease: false
|
29
|
-
type: :runtime
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rails
|
32
|
-
|
33
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '3.2'
|
38
|
-
|
39
|
-
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- -
|
38
|
+
- - '>='
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '3.2'
|
44
|
-
prerelease: false
|
45
|
-
type: :development
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: bundler
|
48
|
-
|
49
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '1.0'
|
54
|
-
|
55
|
-
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
51
|
requirements:
|
57
|
-
- -
|
52
|
+
- - '>='
|
58
53
|
- !ruby/object:Gem::Version
|
59
54
|
version: '1.0'
|
60
|
-
prerelease: false
|
61
|
-
type: :development
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: sqlite3
|
64
|
-
|
65
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
|
-
|
71
|
-
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
|
-
- -
|
66
|
+
- - '>='
|
74
67
|
- !ruby/object:Gem::Version
|
75
68
|
version: '0'
|
76
|
-
prerelease: false
|
77
|
-
type: :development
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec-rails
|
80
|
-
|
81
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: 2.9.0
|
86
|
-
|
87
|
-
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
79
|
requirements:
|
89
|
-
- -
|
80
|
+
- - '>='
|
90
81
|
- !ruby/object:Gem::Version
|
91
82
|
version: 2.9.0
|
92
|
-
prerelease: false
|
93
|
-
type: :development
|
94
83
|
description: Collection of UI widgets on top of anjlab-bootstrap-rails. Datepicker
|
95
84
|
and Timepicker for now.
|
96
85
|
email:
|
@@ -132,6 +121,7 @@ files:
|
|
132
121
|
- spec/dummy/app/views/layouts/application.html.erb
|
133
122
|
- spec/dummy/app/views/widgets/all.html.erb
|
134
123
|
- spec/dummy/app/views/widgets/datepicker.html.erb
|
124
|
+
- spec/dummy/app/views/widgets/simple_form.html.erb
|
135
125
|
- spec/dummy/app/views/widgets/timepicker.html.erb
|
136
126
|
- spec/dummy/config.ru
|
137
127
|
- spec/dummy/config/application.rb
|
@@ -146,6 +136,7 @@ files:
|
|
146
136
|
- spec/dummy/config/initializers/mime_types.rb
|
147
137
|
- spec/dummy/config/initializers/secret_token.rb
|
148
138
|
- spec/dummy/config/initializers/session_store.rb
|
139
|
+
- spec/dummy/config/initializers/simple_form.rb
|
149
140
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
150
141
|
- spec/dummy/config/locales/en.yml
|
151
142
|
- spec/dummy/config/routes.rb
|
@@ -162,33 +153,26 @@ files:
|
|
162
153
|
- time_pic.png
|
163
154
|
homepage: https://github.com/anjlab/anjlab-widgets
|
164
155
|
licenses: []
|
156
|
+
metadata: {}
|
165
157
|
post_install_message:
|
166
158
|
rdoc_options: []
|
167
159
|
require_paths:
|
168
160
|
- lib
|
169
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
162
|
requirements:
|
172
|
-
- -
|
163
|
+
- - '>='
|
173
164
|
- !ruby/object:Gem::Version
|
174
165
|
version: '0'
|
175
|
-
hash: -869637543149161080
|
176
|
-
segments:
|
177
|
-
- 0
|
178
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
-
none: false
|
180
167
|
requirements:
|
181
|
-
- -
|
168
|
+
- - '>='
|
182
169
|
- !ruby/object:Gem::Version
|
183
170
|
version: '0'
|
184
|
-
hash: -869637543149161080
|
185
|
-
segments:
|
186
|
-
- 0
|
187
171
|
requirements: []
|
188
172
|
rubyforge_project:
|
189
|
-
rubygems_version:
|
173
|
+
rubygems_version: 2.0.0
|
190
174
|
signing_key:
|
191
|
-
specification_version:
|
175
|
+
specification_version: 4
|
192
176
|
summary: Collection of UI widgets on top of anjlab-bootstrap-rails
|
193
177
|
test_files:
|
194
178
|
- spec/dummy/README.rdoc
|
@@ -203,6 +187,7 @@ test_files:
|
|
203
187
|
- spec/dummy/app/views/layouts/application.html.erb
|
204
188
|
- spec/dummy/app/views/widgets/all.html.erb
|
205
189
|
- spec/dummy/app/views/widgets/datepicker.html.erb
|
190
|
+
- spec/dummy/app/views/widgets/simple_form.html.erb
|
206
191
|
- spec/dummy/app/views/widgets/timepicker.html.erb
|
207
192
|
- spec/dummy/config.ru
|
208
193
|
- spec/dummy/config/application.rb
|
@@ -217,6 +202,7 @@ test_files:
|
|
217
202
|
- spec/dummy/config/initializers/mime_types.rb
|
218
203
|
- spec/dummy/config/initializers/secret_token.rb
|
219
204
|
- spec/dummy/config/initializers/session_store.rb
|
205
|
+
- spec/dummy/config/initializers/simple_form.rb
|
220
206
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
221
207
|
- spec/dummy/config/locales/en.yml
|
222
208
|
- spec/dummy/config/routes.rb
|