unirer-bootstrap 0.6 → 0.7
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,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 761e08c4629879130c3302845bb10a03aec1902d
|
4
|
+
data.tar.gz: 9a16f38d18e74137d31dfb611ab53e060d5b37f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1221a55c4ce85804ec3ecb44c74246741f9ebef881294357893921b2fba8d82a90169b191e524ebb5b07585b8261787d85b39e23770c1dc6f2a62909d1fd32be
|
7
|
+
data.tar.gz: 37702172f108843c5c8ce13372549729242723cdc0be5c02cdd3f9eda55d8a9432f31ad48c0977ae24b1a7db4c3ce9b02681859040bbbef74d395e8823fb1087
|
data/README.md
CHANGED
@@ -61,7 +61,16 @@ The following code snippet loads the latest React JS.
|
|
61
61
|
|
62
62
|
The following code snippet loads the React JS with the given version.
|
63
63
|
```erb
|
64
|
-
<%= render partial: 'unirer/bootstrap/script',
|
64
|
+
<%= render partial: 'unirer/bootstrap/script',
|
65
|
+
locals: {
|
66
|
+
options: {
|
67
|
+
:jquery => { version: '2.2.0' },
|
68
|
+
:'moment-with-locales' => true,
|
69
|
+
:'bootstrap-datetimepicker' => true,
|
70
|
+
:react => { version: '0.14.6' }
|
71
|
+
}
|
72
|
+
}
|
73
|
+
%>
|
65
74
|
```
|
66
75
|
The following JavaScript libraries are always enabled, only the version can be configurable:
|
67
76
|
- :jquery
|
@@ -69,6 +78,9 @@ The following JavaScript libraries are always enabled, only the version can be c
|
|
69
78
|
The following JavaScript libraries are switchable, and the version can be configurable:
|
70
79
|
- :'moment-with-locales'
|
71
80
|
- :'bootstrap-datetimepicker'
|
81
|
+
- :'bootstrap-datepicker'
|
82
|
+
- :'bootstrap-table'
|
83
|
+
- :buttons
|
72
84
|
- :react
|
73
85
|
|
74
86
|
|
@@ -81,8 +93,13 @@ The Style partial includes the HTML style tags for Bootstrap and Font Awesome. A
|
|
81
93
|
The following CSS libraries are always enabled, only the version can be configurable:
|
82
94
|
- :bootstrap
|
83
95
|
The following JavaScript libraries are switchable, and the version can be configurable:
|
96
|
+
- :'bootstrap-theme'
|
84
97
|
- :'font-awesome'
|
85
98
|
- :'bootstrap-datetimepicker'
|
99
|
+
- :'bootstrap-datepicker'
|
100
|
+
- :'bootstrap-table'
|
101
|
+
- :buttons
|
102
|
+
- :'animate.css'
|
86
103
|
|
87
104
|
|
88
105
|
|
@@ -7,12 +7,14 @@
|
|
7
7
|
group_class_list = [ 'form-group', options[:group_class] ]
|
8
8
|
label_class_list = [ 'control-label', options[:label_class]||'col-xs-2' ]
|
9
9
|
field_class_list = [ 'input-group', options[:field_class]||'col-xs-10' ]
|
10
|
+
input_class_list = [ 'form-control', options[:input_class] ]
|
10
11
|
error_class_list = [ 'text-danger', options[:error_class]||'col-xs-offset-2 col-xs-10' ]
|
11
12
|
group_class_list << 'has-error' if model.errors[name].present?
|
12
13
|
|
13
14
|
group_class = group_class_list.flatten.join ' '
|
14
15
|
label_class = label_class_list.flatten.join ' '
|
15
16
|
field_class = field_class_list.flatten.join ' '
|
17
|
+
input_class = input_class_list.flatten.join ' '
|
16
18
|
error_class = error_class_list.flatten.join ' '
|
17
19
|
|
18
20
|
label_text = options[:label]
|
@@ -21,7 +23,7 @@
|
|
21
23
|
|
22
24
|
field_options = {
|
23
25
|
disabled: options[:disabled],
|
24
|
-
class:
|
26
|
+
class: input_class_list,
|
25
27
|
placeholder: options[:placeholder],
|
26
28
|
readonly: options[:readonly],
|
27
29
|
maxlength: options[:maxlength],
|
@@ -4,6 +4,14 @@
|
|
4
4
|
|
5
5
|
<%= javascript_include_tag "//cdn.bootcss.com/moment.js/#{library_version(:'moment-with-locales', '2.11.1', options)}/moment-with-locales.min.js" if library_enabled?(:'moment-with-locales', options) %>
|
6
6
|
<%= javascript_include_tag "//cdn.bootcss.com/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/js/bootstrap-datetimepicker.min.js" if library_enabled?(:'bootstrap-datetimepicker', options) %>
|
7
|
+
<%= javascript_include_tag "//cdn.bootcss.com/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.0', options)}/js/bootstrap-datepicker.min.js" if library_enabled?(:'bootstrap-datepicker', options) %>
|
8
|
+
|
9
|
+
<% if library_enabled?(:'bootstrap-table', options) %>
|
10
|
+
<%= javascript_include_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.10.0', options)}/bootstrap-table.min.js" %>
|
11
|
+
<%= javascript_include_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.10.1', options)}/locale/bootstrap-table-zh-CN.min.js", charset: 'UTF-8' %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= javascript_include_tag "//cdn.bootcss.com/Buttons/#{library_version(:buttons, '2.0.0', options)}/js/buttons.min.js" if library_enabled?(:buttons, options) %>
|
7
15
|
|
8
16
|
<% if library_enabled?(:react, options) %>
|
9
17
|
<%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:react, '0.14.7', options)}/react.min.js" %>
|
@@ -1,5 +1,10 @@
|
|
1
1
|
<% options = defined?(options) ? options : nil %>
|
2
2
|
<%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap/#{library_version :bootstrap, '3.3.6', options}/css/bootstrap.min.css", media: 'all' %>
|
3
|
-
<%= stylesheet_link_tag "//cdn.bootcss.com/
|
4
|
-
|
3
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap/#{library_version(:'bootstrap-theme', '3.3.6', options)}/css/bootstrap-theme.min.css", media: 'all' if library_enabled?(:'bootstrap-theme', options) %>
|
5
4
|
<%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/css/bootstrap-datetimepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datetimepicker', options) %>
|
5
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.0', options)}/css/bootstrap-datepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datepicker', options) %>
|
6
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.10.0', options)}/bootstrap-table.min.css", media: 'all' if library_enabled?(:'bootstrap-datetimepicker', options) %>
|
7
|
+
|
8
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/font-awesome/#{library_version(:'font-awesome', '4.5.0', options)}/css/font-awesome.min.css", media: 'all' if library_enabled?(:'font-awesome', options) %>
|
9
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/Buttons/#{library_version(:buttons, '2.0.0', options)}/css/buttons.min.css", media: 'all' if library_enabled?(:buttons, options) %>
|
10
|
+
<%= stylesheet_link_tag "//cdn.bootcss.com/animate.css/#{library_version(:'animate.css', '3.5.1', options)}/animate.min.css", media: 'all' if library_enabled?(:'animate.css', options) %>
|
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.7'
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|