tennpipes-su 3.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +70 -0
- data/Rakefile +22 -0
- data/lib/tennpipes-su.rb +35 -0
- data/lib/tennpipes-su/access_control.rb +191 -0
- data/lib/tennpipes-su/bootstrap-less/alerts.less +67 -0
- data/lib/tennpipes-su/bootstrap-less/badges.less +55 -0
- data/lib/tennpipes-su/bootstrap-less/bootstrap.less +49 -0
- data/lib/tennpipes-su/bootstrap-less/breadcrumbs.less +26 -0
- data/lib/tennpipes-su/bootstrap-less/button-groups.less +226 -0
- data/lib/tennpipes-su/bootstrap-less/buttons.less +155 -0
- data/lib/tennpipes-su/bootstrap-less/carousel.less +232 -0
- data/lib/tennpipes-su/bootstrap-less/close.less +33 -0
- data/lib/tennpipes-su/bootstrap-less/code.less +63 -0
- data/lib/tennpipes-su/bootstrap-less/component-animations.less +29 -0
- data/lib/tennpipes-su/bootstrap-less/dropdowns.less +213 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/core.less +12 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/fixed-width.less +6 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/font-awesome.less +17 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/icons.less +412 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/larger.less +13 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/list.less +19 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/mixins.less +20 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/path.less +14 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/spinning.less +30 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/stacked.less +20 -0
- data/lib/tennpipes-su/bootstrap-less/font-awesome/variables.less +381 -0
- data/lib/tennpipes-su/bootstrap-less/forms.less +419 -0
- data/lib/tennpipes-su/bootstrap-less/glyphicons.less +233 -0
- data/lib/tennpipes-su/bootstrap-less/grid.less +100 -0
- data/lib/tennpipes-su/bootstrap-less/input-groups.less +157 -0
- data/lib/tennpipes-su/bootstrap-less/jumbotron.less +44 -0
- data/lib/tennpipes-su/bootstrap-less/labels.less +64 -0
- data/lib/tennpipes-su/bootstrap-less/list-group.less +110 -0
- data/lib/tennpipes-su/bootstrap-less/media.less +56 -0
- data/lib/tennpipes-su/bootstrap-less/mixins.less +926 -0
- data/lib/tennpipes-su/bootstrap-less/modals.less +138 -0
- data/lib/tennpipes-su/bootstrap-less/navbar.less +616 -0
- data/lib/tennpipes-su/bootstrap-less/navs.less +242 -0
- data/lib/tennpipes-su/bootstrap-less/normalize.less +423 -0
- data/lib/tennpipes-su/bootstrap-less/pager.less +55 -0
- data/lib/tennpipes-su/bootstrap-less/pagination.less +88 -0
- data/lib/tennpipes-su/bootstrap-less/panels.less +230 -0
- data/lib/tennpipes-su/bootstrap-less/popovers.less +133 -0
- data/lib/tennpipes-su/bootstrap-less/print.less +101 -0
- data/lib/tennpipes-su/bootstrap-less/progress-bars.less +80 -0
- data/lib/tennpipes-su/bootstrap-less/responsive-utilities.less +93 -0
- data/lib/tennpipes-su/bootstrap-less/scaffolding.less +134 -0
- data/lib/tennpipes-su/bootstrap-less/tables.less +233 -0
- data/lib/tennpipes-su/bootstrap-less/tennpipes-su.less +18 -0
- data/lib/tennpipes-su/bootstrap-less/theme.less +247 -0
- data/lib/tennpipes-su/bootstrap-less/thumbnails.less +36 -0
- data/lib/tennpipes-su/bootstrap-less/tooltip.less +95 -0
- data/lib/tennpipes-su/bootstrap-less/type.less +296 -0
- data/lib/tennpipes-su/bootstrap-less/utilities.less +56 -0
- data/lib/tennpipes-su/bootstrap-less/variables.less +827 -0
- data/lib/tennpipes-su/bootstrap-less/wells.less +29 -0
- data/lib/tennpipes-su/generators/actions.rb +78 -0
- data/lib/tennpipes-su/generators/admin_app.rb +169 -0
- data/lib/tennpipes-su/generators/admin_page.rb +68 -0
- data/lib/tennpipes-su/generators/orm.rb +172 -0
- data/lib/tennpipes-su/generators/templates/account/activerecord.rb.tt +41 -0
- data/lib/tennpipes-su/generators/templates/account/couchrest.rb.tt +67 -0
- data/lib/tennpipes-su/generators/templates/account/datamapper.rb.tt +56 -0
- data/lib/tennpipes-su/generators/templates/account/dynamoid.rb.tt +55 -0
- data/lib/tennpipes-su/generators/templates/account/minirecord.rb.tt +44 -0
- data/lib/tennpipes-su/generators/templates/account/mongoid.rb.tt +54 -0
- data/lib/tennpipes-su/generators/templates/account/mongomapper.rb.tt +47 -0
- data/lib/tennpipes-su/generators/templates/account/ohm.rb.tt +70 -0
- data/lib/tennpipes-su/generators/templates/account/seeds.rb.tt +29 -0
- data/lib/tennpipes-su/generators/templates/account/sequel.rb.tt +53 -0
- data/lib/tennpipes-su/generators/templates/app.rb.tt +42 -0
- data/lib/tennpipes-su/generators/templates/app/controllers/base.rb.tt +5 -0
- data/lib/tennpipes-su/generators/templates/app/controllers/sessions.rb.tt +29 -0
- data/lib/tennpipes-su/generators/templates/assets/images/favicon.ico +0 -0
- data/lib/tennpipes-su/generators/templates/assets/images/font/FontAwesome.otf +0 -0
- data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
- data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.svg +414 -0
- data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
- data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
- data/lib/tennpipes-su/generators/templates/assets/images/logo.png +0 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/application.js +118 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/affix.js +137 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/alert.js +88 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/button.js +107 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/carousel.js +205 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/collapse.js +170 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/dropdown.js +147 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/popover.js +110 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/scrollspy.js +153 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tab.js +125 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tooltip.js +399 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/transition.js +48 -0
- data/lib/tennpipes-su/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/application.css +353 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/bootstrap.css +4 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
- data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
- data/lib/tennpipes-su/generators/templates/erb/app/base/index.erb.tt +15 -0
- data/lib/tennpipes-su/generators/templates/erb/app/errors/403.erb.tt +3 -0
- data/lib/tennpipes-su/generators/templates/erb/app/errors/404.erb.tt +3 -0
- data/lib/tennpipes-su/generators/templates/erb/app/errors/500.erb.tt +3 -0
- data/lib/tennpipes-su/generators/templates/erb/app/layouts/application.erb.tt +64 -0
- data/lib/tennpipes-su/generators/templates/erb/app/layouts/error.erb.tt +23 -0
- data/lib/tennpipes-su/generators/templates/erb/app/sessions/new.erb.tt +44 -0
- data/lib/tennpipes-su/generators/templates/erb/page/_form.erb.tt +18 -0
- data/lib/tennpipes-su/generators/templates/erb/page/edit.erb.tt +10 -0
- data/lib/tennpipes-su/generators/templates/erb/page/index.erb.tt +81 -0
- data/lib/tennpipes-su/generators/templates/erb/page/new.erb.tt +9 -0
- data/lib/tennpipes-su/generators/templates/haml/app/base/index.haml.tt +12 -0
- data/lib/tennpipes-su/generators/templates/haml/app/errors/403.haml.tt +3 -0
- data/lib/tennpipes-su/generators/templates/haml/app/errors/404.haml.tt +3 -0
- data/lib/tennpipes-su/generators/templates/haml/app/errors/500.haml.tt +3 -0
- data/lib/tennpipes-su/generators/templates/haml/app/layouts/application.haml.tt +49 -0
- data/lib/tennpipes-su/generators/templates/haml/app/layouts/error.haml.tt +18 -0
- data/lib/tennpipes-su/generators/templates/haml/app/sessions/new.haml.tt +38 -0
- data/lib/tennpipes-su/generators/templates/haml/page/_form.haml.tt +16 -0
- data/lib/tennpipes-su/generators/templates/haml/page/edit.haml.tt +8 -0
- data/lib/tennpipes-su/generators/templates/haml/page/index.haml.tt +58 -0
- data/lib/tennpipes-su/generators/templates/haml/page/new.haml.tt +7 -0
- data/lib/tennpipes-su/generators/templates/page/controller.rb.tt +92 -0
- data/lib/tennpipes-su/generators/templates/slim/app/base/index.slim.tt +12 -0
- data/lib/tennpipes-su/generators/templates/slim/app/errors/403.slim.tt +3 -0
- data/lib/tennpipes-su/generators/templates/slim/app/errors/404.slim.tt +3 -0
- data/lib/tennpipes-su/generators/templates/slim/app/errors/500.slim.tt +3 -0
- data/lib/tennpipes-su/generators/templates/slim/app/layouts/application.slim.tt +48 -0
- data/lib/tennpipes-su/generators/templates/slim/app/layouts/error.slim.tt +19 -0
- data/lib/tennpipes-su/generators/templates/slim/app/sessions/new.slim.tt +37 -0
- data/lib/tennpipes-su/generators/templates/slim/page/_form.slim.tt +16 -0
- data/lib/tennpipes-su/generators/templates/slim/page/edit.slim.tt +8 -0
- data/lib/tennpipes-su/generators/templates/slim/page/index.slim.tt +56 -0
- data/lib/tennpipes-su/generators/templates/slim/page/new.slim.tt +7 -0
- data/lib/tennpipes-su/helpers/authentication_helpers.rb +108 -0
- data/lib/tennpipes-su/helpers/view_helpers.rb +87 -0
- data/lib/tennpipes-su/locale/admin/cs.yml +56 -0
- data/lib/tennpipes-su/locale/admin/da.yml +56 -0
- data/lib/tennpipes-su/locale/admin/de.yml +56 -0
- data/lib/tennpipes-su/locale/admin/en.yml +56 -0
- data/lib/tennpipes-su/locale/admin/es.yml +56 -0
- data/lib/tennpipes-su/locale/admin/fr.yml +56 -0
- data/lib/tennpipes-su/locale/admin/hu.yml +56 -0
- data/lib/tennpipes-su/locale/admin/it.yml +56 -0
- data/lib/tennpipes-su/locale/admin/ja.yml +57 -0
- data/lib/tennpipes-su/locale/admin/lv.yml +56 -0
- data/lib/tennpipes-su/locale/admin/nl.yml +56 -0
- data/lib/tennpipes-su/locale/admin/no.yml +56 -0
- data/lib/tennpipes-su/locale/admin/pl.yml +56 -0
- data/lib/tennpipes-su/locale/admin/pt_br.yml +56 -0
- data/lib/tennpipes-su/locale/admin/ro.yml +56 -0
- data/lib/tennpipes-su/locale/admin/ru.yml +57 -0
- data/lib/tennpipes-su/locale/admin/sv.yml +56 -0
- data/lib/tennpipes-su/locale/admin/tr.yml +56 -0
- data/lib/tennpipes-su/locale/admin/uk.yml +56 -0
- data/lib/tennpipes-su/locale/admin/zh_cn.yml +56 -0
- data/lib/tennpipes-su/locale/admin/zh_tw.yml +56 -0
- data/lib/tennpipes-su/locale/orm/cs.yml +12 -0
- data/lib/tennpipes-su/locale/orm/da.yml +12 -0
- data/lib/tennpipes-su/locale/orm/de.yml +12 -0
- data/lib/tennpipes-su/locale/orm/en.yml +12 -0
- data/lib/tennpipes-su/locale/orm/es.yml +12 -0
- data/lib/tennpipes-su/locale/orm/fr.yml +12 -0
- data/lib/tennpipes-su/locale/orm/hu.yml +12 -0
- data/lib/tennpipes-su/locale/orm/it.yml +12 -0
- data/lib/tennpipes-su/locale/orm/ja.yml +12 -0
- data/lib/tennpipes-su/locale/orm/lv.yml +12 -0
- data/lib/tennpipes-su/locale/orm/nl.yml +12 -0
- data/lib/tennpipes-su/locale/orm/no.yml +12 -0
- data/lib/tennpipes-su/locale/orm/pl.yml +38 -0
- data/lib/tennpipes-su/locale/orm/pt_br.yml +12 -0
- data/lib/tennpipes-su/locale/orm/ro.yml +12 -0
- data/lib/tennpipes-su/locale/orm/ru.yml +12 -0
- data/lib/tennpipes-su/locale/orm/sv.yml +12 -0
- data/lib/tennpipes-su/locale/orm/tr.yml +12 -0
- data/lib/tennpipes-su/locale/orm/uk.yml +12 -0
- data/lib/tennpipes-su/locale/orm/zh_cn.yml +12 -0
- data/lib/tennpipes-su/locale/orm/zh_tw.yml +12 -0
- data/test/fixtures/sequel.rb +72 -0
- data/test/generators/test_account_model_generator.rb +108 -0
- data/test/generators/test_admin_app_generator.rb +218 -0
- data/test/generators/test_admin_page_generator.rb +140 -0
- data/test/helper.rb +47 -0
- data/test/test_admin_application.rb +271 -0
- data/test/test_locale.rb +25 -0
- metadata +298 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
// Core variables and mixins
|
2
|
+
@import "variables.less";
|
3
|
+
@import "mixins.less";
|
4
|
+
|
5
|
+
// Reset
|
6
|
+
@import "normalize.less";
|
7
|
+
@import "print.less";
|
8
|
+
|
9
|
+
// Core CSS
|
10
|
+
@import "scaffolding.less";
|
11
|
+
@import "type.less";
|
12
|
+
@import "code.less";
|
13
|
+
@import "grid.less";
|
14
|
+
@import "tables.less";
|
15
|
+
@import "forms.less";
|
16
|
+
@import "buttons.less";
|
17
|
+
|
18
|
+
// Components
|
19
|
+
@import "component-animations.less";
|
20
|
+
@import "glyphicons.less";
|
21
|
+
@import "dropdowns.less";
|
22
|
+
@import "button-groups.less";
|
23
|
+
@import "input-groups.less";
|
24
|
+
@import "navs.less";
|
25
|
+
@import "navbar.less";
|
26
|
+
@import "breadcrumbs.less";
|
27
|
+
@import "pagination.less";
|
28
|
+
@import "pager.less";
|
29
|
+
@import "labels.less";
|
30
|
+
@import "badges.less";
|
31
|
+
@import "jumbotron.less";
|
32
|
+
@import "thumbnails.less";
|
33
|
+
@import "alerts.less";
|
34
|
+
@import "progress-bars.less";
|
35
|
+
@import "media.less";
|
36
|
+
@import "list-group.less";
|
37
|
+
@import "panels.less";
|
38
|
+
@import "wells.less";
|
39
|
+
@import "close.less";
|
40
|
+
|
41
|
+
// Components w/ JavaScript
|
42
|
+
@import "modals.less";
|
43
|
+
@import "tooltip.less";
|
44
|
+
@import "popovers.less";
|
45
|
+
@import "carousel.less";
|
46
|
+
|
47
|
+
// Utility classes
|
48
|
+
@import "utilities.less";
|
49
|
+
@import "responsive-utilities.less";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
//
|
2
|
+
// Breadcrumbs
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.breadcrumb {
|
7
|
+
padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
|
8
|
+
margin-bottom: @line-height-computed;
|
9
|
+
list-style: none;
|
10
|
+
background-color: @breadcrumb-bg;
|
11
|
+
border-radius: @border-radius-base;
|
12
|
+
|
13
|
+
> li {
|
14
|
+
display: inline-block;
|
15
|
+
|
16
|
+
+ li:before {
|
17
|
+
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
|
18
|
+
padding: 0 5px;
|
19
|
+
color: @breadcrumb-color;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
> .active {
|
24
|
+
color: @breadcrumb-active-color;
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,226 @@
|
|
1
|
+
//
|
2
|
+
// Button groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Make the div behave like a button
|
6
|
+
.btn-group,
|
7
|
+
.btn-group-vertical {
|
8
|
+
position: relative;
|
9
|
+
display: inline-block;
|
10
|
+
vertical-align: middle; // match .btn alignment given font-size hack above
|
11
|
+
> .btn {
|
12
|
+
position: relative;
|
13
|
+
float: left;
|
14
|
+
// Bring the "active" button to the front
|
15
|
+
&:hover,
|
16
|
+
&:focus,
|
17
|
+
&:active,
|
18
|
+
&.active {
|
19
|
+
z-index: 2;
|
20
|
+
}
|
21
|
+
&:focus {
|
22
|
+
// Remove focus outline when dropdown JS adds it after closing the menu
|
23
|
+
outline: none;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
// Prevent double borders when buttons are next to each other
|
29
|
+
.btn-group {
|
30
|
+
.btn + .btn,
|
31
|
+
.btn + .btn-group,
|
32
|
+
.btn-group + .btn,
|
33
|
+
.btn-group + .btn-group {
|
34
|
+
margin-left: -1px;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
// Optional: Group multiple button groups together for a toolbar
|
39
|
+
.btn-toolbar {
|
40
|
+
margin-left: -5px; // Offset the first child's margin
|
41
|
+
&:extend(.clearfix all);
|
42
|
+
|
43
|
+
.btn-group,
|
44
|
+
.input-group {
|
45
|
+
float: left;
|
46
|
+
}
|
47
|
+
> .btn,
|
48
|
+
> .btn-group,
|
49
|
+
> .input-group {
|
50
|
+
margin-left: 5px;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
55
|
+
border-radius: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
59
|
+
.btn-group > .btn:first-child {
|
60
|
+
margin-left: 0;
|
61
|
+
&:not(:last-child):not(.dropdown-toggle) {
|
62
|
+
.border-right-radius(0);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
66
|
+
.btn-group > .btn:last-child:not(:first-child),
|
67
|
+
.btn-group > .dropdown-toggle:not(:first-child) {
|
68
|
+
.border-left-radius(0);
|
69
|
+
}
|
70
|
+
|
71
|
+
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
|
72
|
+
.btn-group > .btn-group {
|
73
|
+
float: left;
|
74
|
+
}
|
75
|
+
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
76
|
+
border-radius: 0;
|
77
|
+
}
|
78
|
+
.btn-group > .btn-group:first-child {
|
79
|
+
> .btn:last-child,
|
80
|
+
> .dropdown-toggle {
|
81
|
+
.border-right-radius(0);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
.btn-group > .btn-group:last-child > .btn:first-child {
|
85
|
+
.border-left-radius(0);
|
86
|
+
}
|
87
|
+
|
88
|
+
// On active and open, don't show outline
|
89
|
+
.btn-group .dropdown-toggle:active,
|
90
|
+
.btn-group.open .dropdown-toggle {
|
91
|
+
outline: 0;
|
92
|
+
}
|
93
|
+
|
94
|
+
|
95
|
+
// Sizing
|
96
|
+
//
|
97
|
+
// Remix the default button sizing classes into new ones for easier manipulation.
|
98
|
+
|
99
|
+
.btn-group-xs > .btn { .btn-xs(); }
|
100
|
+
.btn-group-sm > .btn { .btn-sm(); }
|
101
|
+
.btn-group-lg > .btn { .btn-lg(); }
|
102
|
+
|
103
|
+
|
104
|
+
// Split button dropdowns
|
105
|
+
// ----------------------
|
106
|
+
|
107
|
+
// Give the line between buttons some depth
|
108
|
+
.btn-group > .btn + .dropdown-toggle {
|
109
|
+
padding-left: 8px;
|
110
|
+
padding-right: 8px;
|
111
|
+
}
|
112
|
+
.btn-group > .btn-lg + .dropdown-toggle {
|
113
|
+
padding-left: 12px;
|
114
|
+
padding-right: 12px;
|
115
|
+
}
|
116
|
+
|
117
|
+
// The clickable button for toggling the menu
|
118
|
+
// Remove the gradient and set the same inset shadow as the :active state
|
119
|
+
.btn-group.open .dropdown-toggle {
|
120
|
+
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
121
|
+
|
122
|
+
// Show no shadow for `.btn-link` since it has no other button styles.
|
123
|
+
&.btn-link {
|
124
|
+
.box-shadow(none);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
// Reposition the caret
|
130
|
+
.btn .caret {
|
131
|
+
margin-left: 0;
|
132
|
+
}
|
133
|
+
// Carets in other button sizes
|
134
|
+
.btn-lg .caret {
|
135
|
+
border-width: @caret-width-large @caret-width-large 0;
|
136
|
+
border-bottom-width: 0;
|
137
|
+
}
|
138
|
+
// Upside down carets for .dropup
|
139
|
+
.dropup .btn-lg .caret {
|
140
|
+
border-width: 0 @caret-width-large @caret-width-large;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
// Vertical button groups
|
145
|
+
// ----------------------
|
146
|
+
|
147
|
+
.btn-group-vertical {
|
148
|
+
> .btn,
|
149
|
+
> .btn-group,
|
150
|
+
> .btn-group > .btn {
|
151
|
+
display: block;
|
152
|
+
float: none;
|
153
|
+
width: 100%;
|
154
|
+
max-width: 100%;
|
155
|
+
}
|
156
|
+
|
157
|
+
// Clear floats so dropdown menus can be properly placed
|
158
|
+
> .btn-group {
|
159
|
+
&:extend(.clearfix all);
|
160
|
+
> .btn {
|
161
|
+
float: none;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
> .btn + .btn,
|
166
|
+
> .btn + .btn-group,
|
167
|
+
> .btn-group + .btn,
|
168
|
+
> .btn-group + .btn-group {
|
169
|
+
margin-top: -1px;
|
170
|
+
margin-left: 0;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
.btn-group-vertical > .btn {
|
175
|
+
&:not(:first-child):not(:last-child) {
|
176
|
+
border-radius: 0;
|
177
|
+
}
|
178
|
+
&:first-child:not(:last-child) {
|
179
|
+
border-top-right-radius: @border-radius-base;
|
180
|
+
.border-bottom-radius(0);
|
181
|
+
}
|
182
|
+
&:last-child:not(:first-child) {
|
183
|
+
border-bottom-left-radius: @border-radius-base;
|
184
|
+
.border-top-radius(0);
|
185
|
+
}
|
186
|
+
}
|
187
|
+
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
188
|
+
border-radius: 0;
|
189
|
+
}
|
190
|
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
|
191
|
+
> .btn:last-child,
|
192
|
+
> .dropdown-toggle {
|
193
|
+
.border-bottom-radius(0);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
197
|
+
.border-top-radius(0);
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
// Justified button groups
|
203
|
+
// ----------------------
|
204
|
+
|
205
|
+
.btn-group-justified {
|
206
|
+
display: table;
|
207
|
+
width: 100%;
|
208
|
+
table-layout: fixed;
|
209
|
+
border-collapse: separate;
|
210
|
+
> .btn,
|
211
|
+
> .btn-group {
|
212
|
+
float: none;
|
213
|
+
display: table-cell;
|
214
|
+
width: 1%;
|
215
|
+
}
|
216
|
+
> .btn-group .btn {
|
217
|
+
width: 100%;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
// Checkbox and radio options
|
223
|
+
[data-toggle="buttons"] > .btn > input[type="radio"],
|
224
|
+
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
|
225
|
+
display: none;
|
226
|
+
}
|
@@ -0,0 +1,155 @@
|
|
1
|
+
//
|
2
|
+
// Buttons
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base styles
|
7
|
+
// --------------------------------------------------
|
8
|
+
|
9
|
+
.btn {
|
10
|
+
display: inline-block;
|
11
|
+
margin-bottom: 0; // For input.btn
|
12
|
+
font-weight: @btn-font-weight;
|
13
|
+
text-align: center;
|
14
|
+
vertical-align: middle;
|
15
|
+
cursor: pointer;
|
16
|
+
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
17
|
+
border: 1px solid transparent;
|
18
|
+
white-space: nowrap;
|
19
|
+
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
|
20
|
+
.user-select(none);
|
21
|
+
|
22
|
+
&:focus {
|
23
|
+
.tab-focus();
|
24
|
+
}
|
25
|
+
|
26
|
+
&:hover,
|
27
|
+
&:focus {
|
28
|
+
color: @btn-default-color;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
&:active,
|
33
|
+
&.active {
|
34
|
+
outline: 0;
|
35
|
+
background-image: none;
|
36
|
+
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
37
|
+
}
|
38
|
+
|
39
|
+
&.disabled,
|
40
|
+
&[disabled],
|
41
|
+
fieldset[disabled] & {
|
42
|
+
cursor: not-allowed;
|
43
|
+
pointer-events: none; // Future-proof disabling of clicks
|
44
|
+
.opacity(.65);
|
45
|
+
.box-shadow(none);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
|
50
|
+
// Alternate buttons
|
51
|
+
// --------------------------------------------------
|
52
|
+
|
53
|
+
.btn-default {
|
54
|
+
.button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
|
55
|
+
}
|
56
|
+
.btn-primary {
|
57
|
+
.button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
|
58
|
+
}
|
59
|
+
// Success appears as green
|
60
|
+
.btn-success {
|
61
|
+
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
|
62
|
+
}
|
63
|
+
// Info appears as blue-green
|
64
|
+
.btn-info {
|
65
|
+
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
|
66
|
+
}
|
67
|
+
// Warning appears as orange
|
68
|
+
.btn-warning {
|
69
|
+
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
|
70
|
+
}
|
71
|
+
// Danger and error appear as red
|
72
|
+
.btn-danger {
|
73
|
+
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
// Link buttons
|
78
|
+
// -------------------------
|
79
|
+
|
80
|
+
// Make a button look and behave like a link
|
81
|
+
.btn-link {
|
82
|
+
color: @link-color;
|
83
|
+
font-weight: normal;
|
84
|
+
cursor: pointer;
|
85
|
+
border-radius: 0;
|
86
|
+
|
87
|
+
&,
|
88
|
+
&:active,
|
89
|
+
&[disabled],
|
90
|
+
fieldset[disabled] & {
|
91
|
+
background-color: transparent;
|
92
|
+
.box-shadow(none);
|
93
|
+
}
|
94
|
+
&,
|
95
|
+
&:hover,
|
96
|
+
&:focus,
|
97
|
+
&:active {
|
98
|
+
border-color: transparent;
|
99
|
+
}
|
100
|
+
&:hover,
|
101
|
+
&:focus {
|
102
|
+
color: @link-hover-color;
|
103
|
+
text-decoration: underline;
|
104
|
+
background-color: transparent;
|
105
|
+
}
|
106
|
+
&[disabled],
|
107
|
+
fieldset[disabled] & {
|
108
|
+
&:hover,
|
109
|
+
&:focus {
|
110
|
+
color: @btn-link-disabled-color;
|
111
|
+
text-decoration: none;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
// Button Sizes
|
118
|
+
// --------------------------------------------------
|
119
|
+
|
120
|
+
.btn-lg {
|
121
|
+
// line-height: ensure even-numbered height of button next to large input
|
122
|
+
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
|
123
|
+
}
|
124
|
+
.btn-sm {
|
125
|
+
// line-height: ensure proper height of button next to small input
|
126
|
+
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
|
127
|
+
}
|
128
|
+
.btn-xs {
|
129
|
+
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
// Block button
|
134
|
+
// --------------------------------------------------
|
135
|
+
|
136
|
+
.btn-block {
|
137
|
+
display: block;
|
138
|
+
width: 100%;
|
139
|
+
padding-left: 0;
|
140
|
+
padding-right: 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
// Vertically space out multiple block buttons
|
144
|
+
.btn-block + .btn-block {
|
145
|
+
margin-top: 5px;
|
146
|
+
}
|
147
|
+
|
148
|
+
// Specificity overrides
|
149
|
+
input[type="submit"],
|
150
|
+
input[type="reset"],
|
151
|
+
input[type="button"] {
|
152
|
+
&.btn-block {
|
153
|
+
width: 100%;
|
154
|
+
}
|
155
|
+
}
|