unirer-bootstrap 0.9 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c48998f1e932da56ad3dc52873a29516bd6dc1c1
|
4
|
+
data.tar.gz: 38f16e23b74340658b61650579817d87140aaab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5853fb0c6463a1af3a682a5dcbda8f954275eaf584fda346da3872f14793848d97212e5558eb1ef58016b5967763449c92301fcbcd2a65676d4f036e2708f214
|
7
|
+
data.tar.gz: a75a68055a6ce3240b2556a827d8fc84aabbc575e427ff5744bbcc5989572736b0d12990a0bf4fe456a0a4fb3d21f94275796ba1d7c3573c0c958705a69c84ce
|
data/README.md
CHANGED
@@ -89,6 +89,7 @@ The following code snippet loads the React JS with the given version.
|
|
89
89
|
%>
|
90
90
|
```
|
91
91
|
The following JavaScript libraries are always enabled, only the version can be configurable:
|
92
|
+
- :modernizr
|
92
93
|
- :jquery
|
93
94
|
- :bootstrap
|
94
95
|
The following JavaScript libraries are switchable, and the version can be configurable:
|
@@ -130,7 +131,7 @@ The Form Field partial includes the HTML form field tags for Rails Form Builder
|
|
130
131
|
model: model,
|
131
132
|
form: f,
|
132
133
|
name: :phone_number,
|
133
|
-
type:
|
134
|
+
type: :telephone_field
|
134
135
|
}
|
135
136
|
}
|
136
137
|
%>
|
@@ -159,9 +160,11 @@ The 4 options are required: model, form, name, and type.
|
|
159
160
|
Here are more options:
|
160
161
|
- label: the customized label text.
|
161
162
|
- group_class: The CSS class for the form group wrapper. The .form-group class is mandatory, and can not be removed.
|
162
|
-
- label_class: the CSS class for the label tag. The .control-label class is mandatory, and can not be removed.
|
163
|
+
- label_class: the CSS class for the HTML label tag. The .control-label class is mandatory, and can not be removed.
|
163
164
|
- field_class: the CSS class for the wrapper of the form control. The .input-group class is mandatory, and can not be removed.
|
165
|
+
- input_class: The CSS class for the HTML input tag. The .form-control class is mandatory, and can not be removed.
|
164
166
|
- error_class: the CSS class for the validation error block of this field. The .text-danger class is mandatory, and can not be removed.
|
167
|
+
- input_data: The HTML 5 Data attribute for the input tag.
|
165
168
|
- error_hidden: Determines whether the error message block should be shown if the field has any error.
|
166
169
|
- prefix: the HTML source codes of input group addon before the form control.
|
167
170
|
- suffix: the HTML source codes of input group addon after the form control.
|
@@ -17,6 +17,10 @@
|
|
17
17
|
input_class = input_class_list.flatten.join ' '
|
18
18
|
error_class = error_class_list.flatten.join ' '
|
19
19
|
|
20
|
+
group_data = options[:group_data]
|
21
|
+
field_data = options[:field_data]
|
22
|
+
input_data = options[:input_data]
|
23
|
+
|
20
24
|
label_text = options[:label]
|
21
25
|
prefix = options[:prefix]
|
22
26
|
suffix = options[:suffix]
|
@@ -27,7 +31,8 @@
|
|
27
31
|
placeholder: options[:placeholder],
|
28
32
|
readonly: options[:readonly],
|
29
33
|
maxlength: options[:maxlength],
|
30
|
-
required: options[:required]
|
34
|
+
required: options[:required],
|
35
|
+
data: input_data
|
31
36
|
}
|
32
37
|
|
33
38
|
error_hidden = options[:error_hidden]
|
@@ -1,4 +1,7 @@
|
|
1
1
|
<% options = defined?(options) ? options : nil %>
|
2
|
+
|
3
|
+
<%= javascript_include_tag "//cdn.bootcss.com/modernizr/#{library_version(:modernizr, '2.8.3', options)}/modernizr.min.js" if library_enabled?(:modernizr, options) %>
|
4
|
+
|
2
5
|
<%= javascript_include_tag "//cdn.bootcss.com/jquery/#{library_version(:jquery, '2.2.1', options)}/jquery.min.js" %>
|
3
6
|
<%= javascript_include_tag "//cdn.bootcss.com/bootstrap/#{library_version(:bootstrap, '3.3.6', options)}/js/bootstrap.min.js" %>
|
4
7
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unirer-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.10'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|