bootswatch_rails 3.3.1.1 → 3.3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -0
- data/datatables/DataTables-1.10.4.zip +0 -0
- data/generate.sh +98 -1
- data/lib/bootswatch_rails/engine.rb +31 -3
- data/lib/bootswatch_rails/version.rb +4 -2
- data/lib/generators/bootswatch_rails/install/install_generator.rb +3 -0
- data/lib/generators/bootswatch_rails/install/templates/application.js +4 -0
- data/lib/generators/bootswatch_rails/install/templates/head.html.erb +9 -1
- data/vendor/assets/images/back_disabled.png +0 -0
- data/vendor/assets/images/back_enabled.png +0 -0
- data/vendor/assets/images/back_enabled_hover.png +0 -0
- data/vendor/assets/images/forward_disabled.png +0 -0
- data/vendor/assets/images/forward_enabled.png +0 -0
- data/vendor/assets/images/forward_enabled_hover.png +0 -0
- data/vendor/assets/images/sort_asc.png +0 -0
- data/vendor/assets/images/sort_asc_disabled.png +0 -0
- data/vendor/assets/images/sort_both.png +0 -0
- data/vendor/assets/images/sort_desc.png +0 -0
- data/vendor/assets/images/sort_desc_disabled.png +0 -0
- data/vendor/assets/javascripts/dataTables.responsive.js +801 -0
- data/vendor/assets/javascripts/jquery.dataTables.js +14840 -0
- data/vendor/assets/stylesheets/cerulean.css +1 -1
- data/vendor/assets/stylesheets/cosmo.css +1 -1
- data/vendor/assets/stylesheets/custom.css +1 -1
- data/vendor/assets/stylesheets/cyborg.css +1 -1
- data/vendor/assets/stylesheets/darkly.css +1 -1
- data/vendor/assets/stylesheets/dataTables.responsive.css +93 -0
- data/vendor/assets/stylesheets/flatly.css +1 -1
- data/vendor/assets/stylesheets/journal.css +1 -1
- data/vendor/assets/stylesheets/jquery.dataTables.css +476 -0
- data/vendor/assets/stylesheets/lumen.css +1 -1
- data/vendor/assets/stylesheets/paper.css +1 -1
- data/vendor/assets/stylesheets/readable.css +1 -1
- data/vendor/assets/stylesheets/sandstone.css +1 -5
- data/vendor/assets/stylesheets/simplex.css +1 -1
- data/vendor/assets/stylesheets/slate.css +1 -1
- data/vendor/assets/stylesheets/spacelab.css +1 -1
- data/vendor/assets/stylesheets/superhero.css +1 -1
- data/vendor/assets/stylesheets/united.css +1 -1
- data/vendor/assets/stylesheets/yeti.css +3 -3
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c692c14cff1d6a837c0f4b3045b4a706dfef8e5b
|
4
|
+
data.tar.gz: 8e2fab7ab3fa916497934f7120f76c8e80c707e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cae0993a82d31d23f1ec72b641018acc7f5ae01d923d63ac236d79ee281d78441f96c014c0f8fc70d3b4027efbc497d208923163f5617eb84405c1f407a7915
|
7
|
+
data.tar.gz: 2f5e25503117af6663a6aa44d6fa36fdebe8715db73fffc49ee2c2e194b9bce26d7afa75fb0c0f9cf17a87ca44c0efb62e2d8c9e1880579b362551f72b77f35c
|
data/Makefile
CHANGED
Binary file
|
data/generate.sh
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
# Exit on error
|
11
11
|
set -e
|
12
12
|
|
13
|
-
|
13
|
+
if [ "$1" != "local" ] ; then
|
14
|
+
git submodule foreach git pull
|
15
|
+
fi
|
14
16
|
|
15
17
|
_assets="vendor/assets"
|
16
18
|
for _dir in fonts images javascripts stylesheets ; do
|
@@ -18,6 +20,11 @@ for _dir in fonts images javascripts stylesheets ; do
|
|
18
20
|
touch $_assets/$_dir/.gitkeep
|
19
21
|
done
|
20
22
|
|
23
|
+
|
24
|
+
#################################################################################
|
25
|
+
###### Setup Bootswatch
|
26
|
+
#################################################################################
|
27
|
+
|
21
28
|
_themes_css=""
|
22
29
|
_themes_raw=""
|
23
30
|
for _file in $(ls -1 bootswatch/*/bootstrap.css) ; do
|
@@ -45,6 +52,80 @@ for _file in $(ls -1 bootswatch/*/bootstrap.css) ; do
|
|
45
52
|
fi
|
46
53
|
done
|
47
54
|
|
55
|
+
|
56
|
+
#################################################################################
|
57
|
+
###### Setup DataTables
|
58
|
+
#################################################################################
|
59
|
+
|
60
|
+
DT_VER="1.10.4"
|
61
|
+
DT_RESP="1.0.2"
|
62
|
+
|
63
|
+
if [ "$1" != "local" ] ; then
|
64
|
+
wget -N -P datatables "http://datatables.net/releases/DataTables-$DT_VER.zip"
|
65
|
+
fi
|
66
|
+
|
67
|
+
rm -rf /tmp/DataTables-*
|
68
|
+
unzip -q -d /tmp datatables/DataTables-$DT_VER.zip
|
69
|
+
|
70
|
+
_src="/tmp/DataTables-$DT_VER/media/js/jquery.dataTables.js"
|
71
|
+
_dst="$_assets/javascripts/jquery.dataTables.js"
|
72
|
+
if ! cmp -s $_src $_dst ; then
|
73
|
+
echo "copy: jquery.dataTables.js"
|
74
|
+
cp $_src $_dst
|
75
|
+
fi
|
76
|
+
|
77
|
+
_src="/tmp/DataTables-$DT_VER/extensions/Responsive/js/dataTables.responsive.js"
|
78
|
+
_dst="$_assets/javascripts/dataTables.responsive.js"
|
79
|
+
if ! cmp -s $_src $_dst ; then
|
80
|
+
echo "copy: dataTables.responsive.js"
|
81
|
+
cp $_src $_dst
|
82
|
+
fi
|
83
|
+
|
84
|
+
_src="/tmp/DataTables-$DT_VER/media/css/jquery.dataTables.css"
|
85
|
+
_dst="$_assets/stylesheets/jquery.dataTables.css"
|
86
|
+
rm -f /tmp/css.tmp
|
87
|
+
sed -e 's#\.\./images/#/assets/#g' $_src >/tmp/css.tmp
|
88
|
+
if cmp -s /tmp/css.tmp $_dst ; then
|
89
|
+
rm -f /tmp/css.tmp
|
90
|
+
else
|
91
|
+
echo "copy: jquery.dataTables.css"
|
92
|
+
mv /tmp/css.tmp $_dst
|
93
|
+
fi
|
94
|
+
|
95
|
+
_src="/tmp/DataTables-$DT_VER/extensions/Responsive/css/dataTables.responsive.css"
|
96
|
+
_dst="$_assets/stylesheets/dataTables.responsive.css"
|
97
|
+
rm -f /tmp/css.tmp
|
98
|
+
sed -e 's#\.\./images/#/assets/#g' $_src >/tmp/css.tmp
|
99
|
+
if cmp -s /tmp/css.tmp $_dst ; then
|
100
|
+
rm -f /tmp/css.tmp
|
101
|
+
else
|
102
|
+
echo "copy: dataTables.responsive.css"
|
103
|
+
mv /tmp/css.tmp $_dst
|
104
|
+
fi
|
105
|
+
_themes_css="jquery.dataTables.css dataTables.responsive.css $_themes_css"
|
106
|
+
|
107
|
+
|
108
|
+
#################################################################################
|
109
|
+
###### Copy image files
|
110
|
+
#################################################################################
|
111
|
+
|
112
|
+
for _file in /tmp/DataTables-$DT_VER/media/images/*.png ; do
|
113
|
+
_file=${_file##*/}
|
114
|
+
_src="/tmp/DataTables-$DT_VER/media/images/$_file"
|
115
|
+
_dst="$_assets/images/$_file"
|
116
|
+
if ! cmp -s $_src $_dst ; then
|
117
|
+
echo "copy: $_file"
|
118
|
+
cp $_src $_dst
|
119
|
+
fi
|
120
|
+
done
|
121
|
+
|
122
|
+
rm -rf /tmp/DataTables-$DT_VER
|
123
|
+
|
124
|
+
|
125
|
+
#################################################################################
|
126
|
+
###### Update asset pipeline
|
127
|
+
#################################################################################
|
128
|
+
|
48
129
|
_engine="lib/bootswatch_rails/engine.rb"
|
49
130
|
if [ -s $_engine ] ; then
|
50
131
|
rm -f /tmp/engine.tmp
|
@@ -57,10 +138,17 @@ if [ -s $_engine ] ; then
|
|
57
138
|
fi
|
58
139
|
fi
|
59
140
|
|
141
|
+
|
142
|
+
#################################################################################
|
143
|
+
###### Update theme list
|
144
|
+
#################################################################################
|
145
|
+
|
60
146
|
_version="lib/bootswatch_rails/version.rb"
|
61
147
|
if [ -s $_version ] ; then
|
62
148
|
rm -f /tmp/version.tmp
|
63
149
|
sed -e "/THEMES/s/=.*/= [$_themes_raw]/" $_version >/tmp/version.tmp
|
150
|
+
sed -i -e "/DATATABLES =/s/=.*/= \"$DT_VER\"/" /tmp/version.tmp
|
151
|
+
sed -i -e "/RESPONSIVE =/s/=.*/= \"$DT_RESP\"/" /tmp/version.tmp
|
64
152
|
if cmp -s /tmp/version.tmp $_version ; then
|
65
153
|
rm -f /tmp/version.tmp
|
66
154
|
else
|
@@ -69,6 +157,11 @@ if [ -s $_version ] ; then
|
|
69
157
|
fi
|
70
158
|
fi
|
71
159
|
|
160
|
+
|
161
|
+
#################################################################################
|
162
|
+
###### Copy font files
|
163
|
+
#################################################################################
|
164
|
+
|
72
165
|
for _file in bootswatch/fonts/*.* ; do
|
73
166
|
_file=${_file##*/}
|
74
167
|
_src="bootswatch/fonts/$_file"
|
@@ -80,6 +173,10 @@ for _file in bootswatch/fonts/*.* ; do
|
|
80
173
|
done
|
81
174
|
|
82
175
|
|
176
|
+
#################################################################################
|
177
|
+
###### Include CLEditor if found
|
178
|
+
#################################################################################
|
179
|
+
|
83
180
|
if [ -s cleditor/jquery.cleditor.js ] ; then
|
84
181
|
_src="cleditor/jquery.cleditor.js"
|
85
182
|
_dst="vendor/assets/javascripts/jquery.cleditor.js"
|
@@ -12,11 +12,39 @@ module BootswatchRails
|
|
12
12
|
stylesheet_link_tag(bootswatch_url) + "\n " + stylesheet_link_tag(fontawesome_url)
|
13
13
|
end
|
14
14
|
|
15
|
+
def dataTables_link_tag(options = {})
|
16
|
+
return stylesheet_link_tag('jquery.dataTables') if !options.delete(:force) and OFFLINE
|
17
|
+
dataTables_url = "//cdn.datatables.net/#{BootswatchRails::DATATABLES}/css/jquery.dataTables.css"
|
18
|
+
stylesheet_link_tag(dataTables_url)
|
19
|
+
end
|
20
|
+
|
21
|
+
def dataTables_responsive_link_tag(options = {})
|
22
|
+
return stylesheet_link_tag('dataTables.responsive') if !options.delete(:force) and OFFLINE
|
23
|
+
responsive_url = "//cdn.datatables.net/responsive/#{BootswatchRails::RESPONSIVE}/css/dataTables.responsive.css"
|
24
|
+
stylesheet_link_tag(responsive_url)
|
25
|
+
end
|
26
|
+
|
15
27
|
def bootstrap_include_tag(options = {})
|
16
|
-
return javascript_include_tag(:bootstrap
|
28
|
+
return javascript_include_tag(:bootstrap) if !options.delete(:force) and OFFLINE
|
17
29
|
bootstrap_url = "//maxcdn.bootstrapcdn.com/bootstrap/#{BootswatchRails::BOOTSTRAP}/js/bootstrap.min.js"
|
18
30
|
[ javascript_include_tag(bootstrap_url, options),
|
19
|
-
javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(:bootstrap
|
31
|
+
javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(:bootstrap).gsub('<','%3C')}'))")
|
32
|
+
].join("\n").html_safe
|
33
|
+
end
|
34
|
+
|
35
|
+
def dataTables_include_tag(options = {})
|
36
|
+
return javascript_include_tag('jquery.dataTables') if !options.delete(:force) and OFFLINE
|
37
|
+
dataTables_url = "//cdn.datatables.net/#{BootswatchRails::DATATABLES}/js/jquery.dataTables.js"
|
38
|
+
[ javascript_include_tag(dataTables_url, options),
|
39
|
+
javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag('jquery.dataTables').gsub('<','%3C')}'))")
|
40
|
+
].join("\n").html_safe
|
41
|
+
end
|
42
|
+
|
43
|
+
def dataTables_responsive_include_tag(options = {})
|
44
|
+
return javascript_include_tag('dataTables.responsive') if !options.delete(:force) and OFFLINE
|
45
|
+
responsive_url = "//cdn.datatables.net/responsive/#{BootswatchRails::RESPONSIVE}/js/dataTables.responsive.js"
|
46
|
+
[ javascript_include_tag(responsive_url, options),
|
47
|
+
javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag('dataTables.responsive').gsub('<','%3C')}'))")
|
20
48
|
].join("\n").html_safe
|
21
49
|
end
|
22
50
|
end
|
@@ -26,7 +54,7 @@ module BootswatchRails
|
|
26
54
|
ActiveSupport.on_load(:action_view) do
|
27
55
|
include BootswatchRails::ActionViewExtensions
|
28
56
|
end
|
29
|
-
app.config.assets.precompile += %w(cerulean.css cosmo.css custom.css cyborg.css darkly.css flatly.css journal.css lumen.css paper.css readable.css sandstone.css simplex.css slate.css spacelab.css superhero.css united.css yeti.css)
|
57
|
+
app.config.assets.precompile += %w(jquery.dataTables.css dataTables.responsive.css cerulean.css cosmo.css custom.css cyborg.css darkly.css flatly.css journal.css lumen.css paper.css readable.css sandstone.css simplex.css slate.css spacelab.css superhero.css united.css yeti.css)
|
30
58
|
app.config.assets.paths << File.expand_path('../../../vendor/assets/fonts', __FILE__)
|
31
59
|
end
|
32
60
|
end
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module BootswatchRails
|
2
2
|
BOOTSTRAP = "3.3.1"
|
3
|
-
BOOTSWATCH = "3.3.
|
3
|
+
BOOTSWATCH = "3.3.0"
|
4
4
|
FONT_AWESOME = "4.2.0"
|
5
|
-
|
5
|
+
DATATABLES = "1.10.4"
|
6
|
+
RESPONSIVE = "1.0.2"
|
7
|
+
VERSION = "3.3.1.2"
|
6
8
|
|
7
9
|
THEMES = [:cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
|
8
10
|
DEFAULT = 0
|
@@ -6,6 +6,8 @@ module BootswatchRails
|
|
6
6
|
desc: 'Activate turbolinks (off by default)'
|
7
7
|
class_option :ui, type: :boolean, default: false,
|
8
8
|
desc: 'Include jQuery-ui (requires jquery-ui gem)'
|
9
|
+
class_option :dt, type: :boolean, default: false,
|
10
|
+
desc: 'Include the jQuery DataTables plugin'
|
9
11
|
class_option :cdn, type: :string, default: 'none',
|
10
12
|
banner: 'none, google, microsoft, jquery or yandex',
|
11
13
|
desc: 'Use CDN (requires jquery[-ui]-rails-cdn gems)'
|
@@ -43,6 +45,7 @@ module BootswatchRails
|
|
43
45
|
initializer "bootswatch_assets.rb" do
|
44
46
|
assets = "jquery.js"
|
45
47
|
assets += " jquery-ui.js" if options.ui?
|
48
|
+
assets += " jquery.dataTables.js dataTables.responsive.js" if options.dt?
|
46
49
|
assets += " bootstrap.js"
|
47
50
|
"Rails.application.config.assets.precompile += %w( #{assets} )"
|
48
51
|
end
|
@@ -7,7 +7,11 @@
|
|
7
7
|
|
8
8
|
<%%= stylesheet_link_tag 'application', media: 'all'<%= turbolinks %> %>
|
9
9
|
<%- if options.cdn != "none" -%>
|
10
|
-
|
10
|
+
<%- if options.dt? -%>
|
11
|
+
<%%= dataTables_link_tag<%= turbolinks %> %>
|
12
|
+
<%%= dataTables_responsive_link_tag<%= turbolinks %> %>
|
13
|
+
<%- end -%>
|
14
|
+
<%%= bootswatch_link_tag current_theme<%= turbolinks %> %>
|
11
15
|
<%- else -%>
|
12
16
|
<%%= stylesheet_link_tag current_theme<%= turbolinks %> %>
|
13
17
|
<%- end -%>
|
@@ -16,6 +20,10 @@
|
|
16
20
|
<%- if options.ui? -%>
|
17
21
|
<%%= jquery_ui_include_tag :<%= options.cdn %><%= turbolinks %> %>
|
18
22
|
<%- end -%>
|
23
|
+
<%- if options.dt? -%>
|
24
|
+
<%%= dataTables_include_tag<%= turbolinks %> %>
|
25
|
+
<%%= dataTables_responsive_include_tag<%= turbolinks %> %>
|
26
|
+
<%- end -%>
|
19
27
|
<%- end -%>
|
20
28
|
<%%= javascript_include_tag 'application'<%= turbolinks %> %>
|
21
29
|
<%- if options.cdn != "none" -%>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|