tw_bootstrap_helper 0.1.0 → 0.2.2
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.
- data/app/assets/javascripts/002-jquery-tablesorter.js +3 -0
- data/app/assets/javascripts/003-bootstrap-alerts.js +124 -0
- data/app/assets/javascripts/003-bootstrap-buttons.js +64 -0
- data/app/assets/javascripts/003-bootstrap-dropdown.js +55 -0
- data/app/assets/javascripts/003-bootstrap-modal.js +260 -0
- data/app/assets/javascripts/003-bootstrap-popover.js +90 -0
- data/app/assets/javascripts/003-bootstrap-scrollspy.js +107 -0
- data/app/assets/javascripts/003-bootstrap-tabs.js +80 -0
- data/app/assets/javascripts/003-bootstrap-twipsy.js +321 -0
- data/app/assets/javascripts/999-bootstrap-default-behaviors.js +49 -0
- data/app/assets/stylesheets/001-bootstrap.css +2467 -0
- data/app/assets/stylesheets/002-bootstrap-hacks-and-fixes.css +10 -0
- data/app/assets/stylesheets/003-bootstrap-layout.css +35 -0
- data/app/assets/stylesheets/004-bootstrap-overrides.css +134 -0
- data/lib/generators/bootstrap/USAGE +8 -0
- data/lib/generators/bootstrap/bootstrap_generator.rb +13 -0
- data/lib/generators/bootstrap/templates/9991-bootstrap-hacks-and-fixes.css +19 -0
- data/lib/generators/bootstrap/templates/9992-bootstrap-utils.css +133 -0
- data/lib/generators/bootstrap/templates/9999-bootstrap-behaviors.js +41 -0
- data/lib/tw_bootstrap_helper/railtie.rb +1 -1
- data/lib/tw_bootstrap_helper/view_helper.rb +1 -1
- metadata +36 -17
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
body{
|
3
|
+
|
4
|
+
}
|
5
|
+
|
6
|
+
.sidebar h2{
|
7
|
+
margin: 0 0 0.5em 0 !important;
|
8
|
+
}
|
9
|
+
|
10
|
+
.topbar{
|
11
|
+
margin: 0 !important;
|
12
|
+
padding: 0 !important;
|
13
|
+
}
|
14
|
+
|
15
|
+
.nav-icon-item{
|
16
|
+
width: 72px !important;
|
17
|
+
display: inline-table;
|
18
|
+
text-align: center;
|
19
|
+
}
|
20
|
+
|
21
|
+
.nav-icon-item span{
|
22
|
+
color: #CCC;
|
23
|
+
text-shadow: 2px 2px 2px #000;
|
24
|
+
}
|
25
|
+
|
26
|
+
#nav-icon{
|
27
|
+
border-bottom: solid 2px #333;
|
28
|
+
margin-bottom: 2em;
|
29
|
+
}
|
30
|
+
|
31
|
+
body .content,
|
32
|
+
body .well{
|
33
|
+
background-color: #FFF;
|
34
|
+
padding:12px;
|
35
|
+
}
|
@@ -0,0 +1,134 @@
|
|
1
|
+
/* FONTS */
|
2
|
+
|
3
|
+
.f-code{
|
4
|
+
}
|
5
|
+
|
6
|
+
.f-number{
|
7
|
+
}
|
8
|
+
|
9
|
+
/* FONT SIZES */
|
10
|
+
|
11
|
+
h1{
|
12
|
+
display:block;
|
13
|
+
padding:6px !important;
|
14
|
+
}
|
15
|
+
|
16
|
+
.f-code{
|
17
|
+
font-weight: bold;
|
18
|
+
font-size: 1.3em;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* UTILS */
|
22
|
+
|
23
|
+
.small-shadow{
|
24
|
+
-moz-box-shadow: 2px 4px 8px #000;
|
25
|
+
-webkit-box-shadow: 2px 4px 8px #000;
|
26
|
+
box-shadow: 2px 4px 8px #000;
|
27
|
+
}
|
28
|
+
|
29
|
+
.corner{
|
30
|
+
-moz-border-radius: 10px;
|
31
|
+
border-radius: 10px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.border{
|
35
|
+
border: solid 1px #CCC;
|
36
|
+
}
|
37
|
+
|
38
|
+
.dashed-border{
|
39
|
+
border: dashed 1px #CCC;
|
40
|
+
}
|
41
|
+
|
42
|
+
.dark-border{
|
43
|
+
border: solid 2px #333;
|
44
|
+
}
|
45
|
+
|
46
|
+
.center{
|
47
|
+
text-align:center;
|
48
|
+
}
|
49
|
+
|
50
|
+
.align-right{
|
51
|
+
text-align: right !important;
|
52
|
+
}
|
53
|
+
|
54
|
+
.align-left{
|
55
|
+
text-align: left !important;
|
56
|
+
}
|
57
|
+
|
58
|
+
.bold{
|
59
|
+
text-weight:bold;
|
60
|
+
}
|
61
|
+
|
62
|
+
.center{
|
63
|
+
text-align: center !important;
|
64
|
+
padding: 0 0 10px 0!important;
|
65
|
+
}
|
66
|
+
|
67
|
+
.v-padding{
|
68
|
+
padding-top: 6px;
|
69
|
+
padding-bottom: 6px;
|
70
|
+
}
|
71
|
+
|
72
|
+
.h-padding{
|
73
|
+
padding-left: 6px;
|
74
|
+
padding-right: 6px;
|
75
|
+
}
|
76
|
+
|
77
|
+
.v-margin{
|
78
|
+
margin-top: 6px;
|
79
|
+
margin-bottom: 6px;
|
80
|
+
}
|
81
|
+
|
82
|
+
.h-margin{
|
83
|
+
margin-left: 6px;
|
84
|
+
margin-right: 6px;
|
85
|
+
}
|
86
|
+
|
87
|
+
.opaque{
|
88
|
+
background-color: #FFF;
|
89
|
+
}
|
90
|
+
|
91
|
+
.gradient{
|
92
|
+
background-image: linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
93
|
+
background-image: -o-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
94
|
+
background-image: -moz-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
95
|
+
background-image: -webkit-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
96
|
+
background-image: -ms-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
97
|
+
|
98
|
+
background-image: -webkit-gradient(
|
99
|
+
linear,
|
100
|
+
right top,
|
101
|
+
right bottom,
|
102
|
+
color-stop(0.38, rgb(250,250,250)),
|
103
|
+
color-stop(0.64, rgb(228,235,235))
|
104
|
+
);
|
105
|
+
}
|
106
|
+
|
107
|
+
.toolbar{
|
108
|
+
|
109
|
+
padding:0 1em;
|
110
|
+
margin:1em 0;
|
111
|
+
|
112
|
+
}
|
113
|
+
|
114
|
+
.toolbar ul{
|
115
|
+
margin:1em 0 !important;
|
116
|
+
}
|
117
|
+
|
118
|
+
.toolbar ul li{
|
119
|
+
margin-right:1em;
|
120
|
+
display:inline;
|
121
|
+
}
|
122
|
+
|
123
|
+
table{
|
124
|
+
background-color: #FFF;
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class BootstrapGenerator < Rails::Generators::NamedBase
|
2
|
+
source_root File.expand_path('../templates', __FILE__)
|
3
|
+
argument :assets, :type => :string, :default => "install"
|
4
|
+
class_option :bootstrap, :type => :boolean, :default => false, :description => "Include Default Twitter Bootstrap Files..."
|
5
|
+
|
6
|
+
def generate_assets
|
7
|
+
copy_file "9991-bootstrap-hacks-and-fixes.css", "app/assets/stylesheets/bootstrap/9991-bootstrap-hacks-and-fixes.css"
|
8
|
+
copy_file "9992-bootstrap-utils.css", "app/assets/stylesheets/bootstrap/9992-bootstrap-utils.css"
|
9
|
+
copy_file "9999-bootstrap-behaviors.js", "app/assets/javascripts/bootstrap/9999-bootstrap-behaviors.js"
|
10
|
+
#copy_file "9999-bootstrap-behaviors.js", "app/assets/javascripts/bootstrap/9999-bootstrap-behaviors.js" if options.bootstrap?
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
/* FIXES */
|
3
|
+
|
4
|
+
body { padding-top: 60px !important; } /* bootstrap fix */
|
5
|
+
|
6
|
+
.brand img{margin: 0 6px 0 0;vertical-align:middle;}
|
7
|
+
|
8
|
+
.well ul li{list-style:none}
|
9
|
+
|
10
|
+
.well ul li img{margin-right:6px;vertical-align:bottom;}
|
11
|
+
|
12
|
+
form .inputs label{
|
13
|
+
margin-right:1em;
|
14
|
+
font-weight:bold;
|
15
|
+
}
|
16
|
+
|
17
|
+
form .span1-5{
|
18
|
+
width: 50px !important;
|
19
|
+
}
|
@@ -0,0 +1,133 @@
|
|
1
|
+
/* FONTS */
|
2
|
+
|
3
|
+
.f-code{
|
4
|
+
font-family: "Courier New" !important;
|
5
|
+
}
|
6
|
+
|
7
|
+
.f-number{
|
8
|
+
font-family: 'Convergence', sans-serif !important;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* FONT SIZES */
|
12
|
+
|
13
|
+
h1{
|
14
|
+
display:block;
|
15
|
+
padding:6px !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
.f-code{
|
19
|
+
font-weight: bold;
|
20
|
+
font-size: 1.3em;
|
21
|
+
}
|
22
|
+
|
23
|
+
/* UTILS */
|
24
|
+
|
25
|
+
.small-shadow{
|
26
|
+
-moz-box-shadow: 2px 4px 8px #000;
|
27
|
+
-webkit-box-shadow: 2px 4px 8px #000;
|
28
|
+
box-shadow: 2px 4px 8px #000;
|
29
|
+
}
|
30
|
+
|
31
|
+
.corner{
|
32
|
+
-moz-border-radius: 10px;
|
33
|
+
border-radius: 10px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.border{
|
37
|
+
border: solid 1px #CCC;
|
38
|
+
}
|
39
|
+
|
40
|
+
.dashed-border{
|
41
|
+
border: dashed 1px #CCC;
|
42
|
+
}
|
43
|
+
|
44
|
+
.dark-border{
|
45
|
+
border: solid 2px #333;
|
46
|
+
}
|
47
|
+
|
48
|
+
.center{
|
49
|
+
text-align:center;
|
50
|
+
}
|
51
|
+
|
52
|
+
.align-right{
|
53
|
+
text-align: right !important;
|
54
|
+
}
|
55
|
+
|
56
|
+
.align-left{
|
57
|
+
text-align: left !important;
|
58
|
+
}
|
59
|
+
|
60
|
+
.bold{
|
61
|
+
text-weight:bold;
|
62
|
+
}
|
63
|
+
|
64
|
+
.center{
|
65
|
+
text-align: center !important;
|
66
|
+
}
|
67
|
+
|
68
|
+
.v-padding{
|
69
|
+
}
|
70
|
+
|
71
|
+
.h-padding{
|
72
|
+
padding-top: 6px;
|
73
|
+
padding-bottom: 6px;
|
74
|
+
}
|
75
|
+
|
76
|
+
.v-margin{
|
77
|
+
margin-top: 6px;
|
78
|
+
margin-bottom: 6px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.h-margin{
|
82
|
+
margin-left: 6px;
|
83
|
+
margin-right: 6px;
|
84
|
+
}
|
85
|
+
|
86
|
+
.opaque{
|
87
|
+
background-color: #FFF;
|
88
|
+
}
|
89
|
+
|
90
|
+
.gradient{
|
91
|
+
background-image: linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
92
|
+
background-image: -o-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
93
|
+
background-image: -moz-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
94
|
+
background-image: -webkit-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
95
|
+
background-image: -ms-linear-gradient(top, rgb(250,250,250) 38%, rgb(228,235,235) 64%);
|
96
|
+
|
97
|
+
background-image: -webkit-gradient(
|
98
|
+
linear,
|
99
|
+
right top,
|
100
|
+
right bottom,
|
101
|
+
color-stop(0.38, rgb(250,250,250)),
|
102
|
+
color-stop(0.64, rgb(228,235,235))
|
103
|
+
);
|
104
|
+
}
|
105
|
+
|
106
|
+
.toolbar{
|
107
|
+
|
108
|
+
padding:0 1em;
|
109
|
+
margin:1em 0;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
.toolbar ul{
|
114
|
+
margin:1em 0 !important;
|
115
|
+
}
|
116
|
+
|
117
|
+
.toolbar ul li{
|
118
|
+
margin-right:1em;
|
119
|
+
display:inline;
|
120
|
+
}
|
121
|
+
|
122
|
+
table{
|
123
|
+
background-color: #FFF;
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// Default Behaviors
|
2
|
+
|
3
|
+
$(function() {
|
4
|
+
|
5
|
+
// Referente as mensagems de feedback na tela
|
6
|
+
if ($('.flash-message').length )
|
7
|
+
{
|
8
|
+
$('.flash-message').hide();
|
9
|
+
$.jGrowl($(".flash-message p").html(), { header: 'Alerta' });
|
10
|
+
}
|
11
|
+
|
12
|
+
// Aplica o TableSorter nas tabelas
|
13
|
+
$("table").tablesorter({ sortList: [[1,0]] });
|
14
|
+
|
15
|
+
// Aplica o TableSorter nas tabelas
|
16
|
+
$("form a.submit").click(function(){ $("form").submit(); });
|
17
|
+
|
18
|
+
// Aplica o TableSorter nas tabelas
|
19
|
+
$("table").tablesorter({ sortList: [[1,0]] });
|
20
|
+
|
21
|
+
// Aplica as classes Bootstrap nos Botao Submit
|
22
|
+
$(".button").addClass("btn primary");
|
23
|
+
|
24
|
+
// Aumenta o tamanho dos botoes e links dentro de formularios
|
25
|
+
$("form .btn").addClass("large");
|
26
|
+
|
27
|
+
// Under Tests & Development
|
28
|
+
$('.window-modal').modal(true);
|
29
|
+
$('a').popover();
|
30
|
+
|
31
|
+
$('.best_in_place').best_in_place();
|
32
|
+
|
33
|
+
|
34
|
+
$('select[id*="4i"], select[id*="5i"], select[id*="3i"]').addClass('span1-5');
|
35
|
+
$('select[id*="1i"]').addClass('span2');
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
});
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tw_bootstrap_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Agencia Orangeweb
|
@@ -16,10 +16,11 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-12-
|
19
|
+
date: 2011-12-15 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
name: shoulda
|
23
|
+
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
@@ -29,11 +30,11 @@ dependencies:
|
|
29
30
|
segments:
|
30
31
|
- 0
|
31
32
|
version: "0"
|
33
|
+
type: :development
|
32
34
|
version_requirements: *id001
|
33
|
-
name: shoulda
|
34
|
-
prerelease: false
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
36
|
+
name: bundler
|
37
|
+
prerelease: false
|
37
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
39
|
none: false
|
39
40
|
requirements:
|
@@ -45,11 +46,11 @@ dependencies:
|
|
45
46
|
- 0
|
46
47
|
- 0
|
47
48
|
version: 1.0.0
|
49
|
+
type: :development
|
48
50
|
version_requirements: *id002
|
49
|
-
name: bundler
|
50
|
-
prerelease: false
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
|
52
|
+
name: jeweler
|
53
|
+
prerelease: false
|
53
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
55
|
none: false
|
55
56
|
requirements:
|
@@ -61,11 +62,11 @@ dependencies:
|
|
61
62
|
- 6
|
62
63
|
- 4
|
63
64
|
version: 1.6.4
|
65
|
+
type: :development
|
64
66
|
version_requirements: *id003
|
65
|
-
name: jeweler
|
66
|
-
prerelease: false
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
|
68
|
+
name: rcov
|
69
|
+
prerelease: false
|
69
70
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
71
|
none: false
|
71
72
|
requirements:
|
@@ -75,9 +76,8 @@ dependencies:
|
|
75
76
|
segments:
|
76
77
|
- 0
|
77
78
|
version: "0"
|
79
|
+
type: :development
|
78
80
|
version_requirements: *id004
|
79
|
-
name: rcov
|
80
|
-
prerelease: false
|
81
81
|
description: Make easy use of Twitter Bootstrap on Rails App
|
82
82
|
email: apps@orangeweb.com.br
|
83
83
|
executables: []
|
@@ -88,6 +88,25 @@ extra_rdoc_files:
|
|
88
88
|
- LICENSE.txt
|
89
89
|
- README.rdoc
|
90
90
|
files:
|
91
|
+
- app/assets/javascripts/002-jquery-tablesorter.js
|
92
|
+
- app/assets/javascripts/003-bootstrap-alerts.js
|
93
|
+
- app/assets/javascripts/003-bootstrap-buttons.js
|
94
|
+
- app/assets/javascripts/003-bootstrap-dropdown.js
|
95
|
+
- app/assets/javascripts/003-bootstrap-modal.js
|
96
|
+
- app/assets/javascripts/003-bootstrap-popover.js
|
97
|
+
- app/assets/javascripts/003-bootstrap-scrollspy.js
|
98
|
+
- app/assets/javascripts/003-bootstrap-tabs.js
|
99
|
+
- app/assets/javascripts/003-bootstrap-twipsy.js
|
100
|
+
- app/assets/javascripts/999-bootstrap-default-behaviors.js
|
101
|
+
- app/assets/stylesheets/001-bootstrap.css
|
102
|
+
- app/assets/stylesheets/002-bootstrap-hacks-and-fixes.css
|
103
|
+
- app/assets/stylesheets/003-bootstrap-layout.css
|
104
|
+
- app/assets/stylesheets/004-bootstrap-overrides.css
|
105
|
+
- lib/generators/bootstrap/USAGE
|
106
|
+
- lib/generators/bootstrap/bootstrap_generator.rb
|
107
|
+
- lib/generators/bootstrap/templates/9991-bootstrap-hacks-and-fixes.css
|
108
|
+
- lib/generators/bootstrap/templates/9992-bootstrap-utils.css
|
109
|
+
- lib/generators/bootstrap/templates/9999-bootstrap-behaviors.js
|
91
110
|
- lib/tw_bootstrap_helper.rb
|
92
111
|
- lib/tw_bootstrap_helper/railtie.rb
|
93
112
|
- lib/tw_bootstrap_helper/view_helper.rb
|