rails_admin 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails_admin might be problematic. Click here for more details.

Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +99 -74
  3. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +48 -55
  4. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +70 -65
  5. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +163 -147
  6. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +117 -114
  7. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +89 -107
  8. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +208 -175
  9. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +77 -78
  10. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +137 -129
  11. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +85 -101
  12. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +364 -268
  13. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +51 -52
  14. data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +1782 -335
  15. data/app/assets/javascripts/rails_admin/ra.filter-box.js +1 -1
  16. data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +3 -3
  17. data/app/assets/javascripts/rails_admin/ra.filtering-select.js +1 -1
  18. data/app/assets/javascripts/rails_admin/ra.remote-form.js +6 -2
  19. data/app/assets/stylesheets/rails_admin/base/theming.scss +34 -14
  20. data/app/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +47 -58
  21. data/app/assets/stylesheets/rails_admin/bootstrap/_badges.scss +57 -0
  22. data/app/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +12 -10
  23. data/app/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +163 -152
  24. data/app/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +98 -169
  25. data/app/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +151 -66
  26. data/app/assets/stylesheets/rails_admin/bootstrap/_close.scss +11 -8
  27. data/app/assets/stylesheets/rails_admin/bootstrap/_code.scss +36 -29
  28. data/app/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +16 -3
  29. data/app/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +115 -148
  30. data/app/assets/stylesheets/rails_admin/bootstrap/_forms.scss +396 -547
  31. data/app/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +237 -0
  32. data/app/assets/stylesheets/rails_admin/bootstrap/_grid.scss +74 -11
  33. data/app/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +166 -0
  34. data/app/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +48 -0
  35. data/app/assets/stylesheets/rails_admin/bootstrap/_labels.scss +66 -0
  36. data/app/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +131 -0
  37. data/app/assets/stylesheets/rails_admin/bootstrap/_media.scss +8 -7
  38. data/app/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +36 -693
  39. data/app/assets/stylesheets/rails_admin/bootstrap/_modals.scss +108 -53
  40. data/app/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +545 -383
  41. data/app/assets/stylesheets/rails_admin/bootstrap/_navs.scss +191 -358
  42. data/app/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +425 -0
  43. data/app/assets/stylesheets/rails_admin/bootstrap/_pager.scss +45 -33
  44. data/app/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +70 -105
  45. data/app/assets/stylesheets/rails_admin/bootstrap/_panels.scss +243 -0
  46. data/app/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +61 -61
  47. data/app/assets/stylesheets/rails_admin/bootstrap/_print.scss +101 -0
  48. data/app/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +56 -73
  49. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +34 -0
  50. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +150 -50
  51. data/app/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +120 -23
  52. data/app/assets/stylesheets/rails_admin/bootstrap/_tables.scss +168 -170
  53. data/app/assets/stylesheets/rails_admin/bootstrap/_theme.scss +258 -0
  54. data/app/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +27 -42
  55. data/app/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +49 -24
  56. data/app/assets/stylesheets/rails_admin/bootstrap/_type.scss +200 -143
  57. data/app/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +33 -21
  58. data/app/assets/stylesheets/rails_admin/bootstrap/_variables.scss +764 -215
  59. data/app/assets/stylesheets/rails_admin/bootstrap/_wells.scss +7 -7
  60. data/app/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +47 -60
  61. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +14 -0
  62. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +11 -0
  63. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +18 -0
  64. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +50 -0
  65. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +7 -0
  66. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +22 -0
  67. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +84 -0
  68. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +58 -0
  69. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +81 -0
  70. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +122 -0
  71. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +21 -0
  72. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +34 -0
  73. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +12 -0
  74. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +31 -0
  75. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +10 -0
  76. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  77. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +8 -0
  78. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +23 -0
  79. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +24 -0
  80. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +10 -0
  81. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +8 -0
  82. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +6 -0
  83. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +21 -0
  84. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +10 -0
  85. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +9 -0
  86. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +28 -0
  87. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +11 -0
  88. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-overflow.scss +8 -0
  89. data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +219 -0
  90. data/app/assets/stylesheets/rails_admin/ra.calendar-additions.scss +17 -0
  91. data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +9 -5
  92. data/app/helpers/rails_admin/application_helper.rb +20 -19
  93. data/app/helpers/rails_admin/form_builder.rb +14 -11
  94. data/app/views/kaminari/twitter-bootstrap/_paginator.html.haml +8 -9
  95. data/app/views/layouts/rails_admin/_navigation.html.haml +5 -5
  96. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +1 -1
  97. data/app/views/layouts/rails_admin/application.html.haml +9 -8
  98. data/app/views/layouts/rails_admin/pjax.html.haml +4 -3
  99. data/app/views/rails_admin/main/_form_datetime.html.haml +2 -1
  100. data/app/views/rails_admin/main/_form_field.html.haml +1 -1
  101. data/app/views/rails_admin/main/_form_text.html.haml +1 -1
  102. data/app/views/rails_admin/main/_submit_buttons.html.haml +1 -0
  103. data/app/views/rails_admin/main/dashboard.html.haml +1 -1
  104. data/app/views/rails_admin/main/export.html.haml +19 -16
  105. data/app/views/rails_admin/main/index.html.haml +11 -7
  106. data/app/views/rails_admin/main/show.html.haml +1 -1
  107. data/lib/rails_admin/adapters/active_record.rb +2 -2
  108. data/lib/rails_admin/adapters/mongoid/property.rb +1 -1
  109. data/lib/rails_admin/config/actions/bulk_delete.rb +0 -1
  110. data/lib/rails_admin/config/actions/edit.rb +0 -2
  111. data/lib/rails_admin/config/actions/export.rb +0 -2
  112. data/lib/rails_admin/config/actions/index.rb +0 -3
  113. data/lib/rails_admin/config/actions/new.rb +0 -2
  114. data/lib/rails_admin/config/configurable.rb +1 -1
  115. data/lib/rails_admin/config/fields/base.rb +9 -0
  116. data/lib/rails_admin/config/fields/factories/enum.rb +2 -3
  117. data/lib/rails_admin/config/fields/types/polymorphic_association.rb +4 -0
  118. data/lib/rails_admin/config/model.rb +2 -1
  119. data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +2 -2
  120. data/lib/rails_admin/support/csv_converter.rb +22 -42
  121. data/lib/rails_admin/version.rb +1 -1
  122. metadata +59 -18
  123. data/app/assets/stylesheets/rails_admin/bootstrap/_accordion.scss +0 -34
  124. data/app/assets/stylesheets/rails_admin/bootstrap/_hero-unit.scss +0 -25
  125. data/app/assets/stylesheets/rails_admin/bootstrap/_labels-badges.scss +0 -83
  126. data/app/assets/stylesheets/rails_admin/bootstrap/_layouts.scss +0 -16
  127. data/app/assets/stylesheets/rails_admin/bootstrap/_reset.scss +0 -216
  128. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-1200px-min.scss +0 -28
  129. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-767px-max.scss +0 -193
  130. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-768px-979px.scss +0 -19
  131. data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-navbar.scss +0 -189
  132. data/app/assets/stylesheets/rails_admin/bootstrap/_sprites.scss +0 -197
  133. data/app/assets/stylesheets/rails_admin/bootstrap/responsive.scss +0 -48
@@ -3,407 +3,240 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // BASE CLASS
7
- // ----------
6
+ // Base class
7
+ // --------------------------------------------------
8
8
 
9
9
  .nav {
10
- margin-left: 0;
11
- margin-bottom: $baseLineHeight;
10
+ margin-bottom: 0;
11
+ padding-left: 0; // Override default ul/ol
12
12
  list-style: none;
13
- }
14
-
15
- // Make links block level
16
- .nav > li > a {
17
- display: block;
18
- }
19
- .nav > li > a:hover,
20
- .nav > li > a:focus {
21
- text-decoration: none;
22
- background-color: $grayLighter;
23
- }
24
-
25
- // Prevent IE8 from misplacing imgs
26
- // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
27
- .nav > li > a > img {
28
- max-width: none;
29
- }
30
-
31
- // Redeclare pull classes because of specifity
32
- .nav > .pull-right {
33
- float: right;
34
- }
35
-
36
- // Nav headers (for dropdowns and lists)
37
- .nav-header {
38
- display: block;
39
- padding: 3px 15px;
40
- font-size: 11px;
41
- font-weight: bold;
42
- line-height: $baseLineHeight;
43
- color: $grayLight;
44
- text-shadow: 0 1px 0 rgba(255,255,255,.5);
45
- text-transform: uppercase;
46
- }
47
- // Space them out when they follow another list item (link)
48
- .nav li + .nav-header {
49
- margin-top: 9px;
50
- }
13
+ @include clearfix();
51
14
 
15
+ > li {
16
+ position: relative;
17
+ display: block;
18
+
19
+ > a {
20
+ position: relative;
21
+ display: block;
22
+ padding: $nav-link-padding;
23
+ &:hover,
24
+ &:focus {
25
+ text-decoration: none;
26
+ background-color: $nav-link-hover-bg;
27
+ }
28
+ }
29
+
30
+ // Disabled state sets text to gray and nukes hover/tab effects
31
+ &.disabled > a {
32
+ color: $nav-disabled-link-color;
33
+
34
+ &:hover,
35
+ &:focus {
36
+ color: $nav-disabled-link-hover-color;
37
+ text-decoration: none;
38
+ background-color: transparent;
39
+ cursor: not-allowed;
40
+ }
41
+ }
42
+ }
52
43
 
44
+ // Open dropdowns
45
+ .open > a {
46
+ &,
47
+ &:hover,
48
+ &:focus {
49
+ background-color: $nav-link-hover-bg;
50
+ border-color: $link-color;
51
+ }
52
+ }
53
53
 
54
- // NAV LIST
55
- // --------
54
+ // Nav dividers (deprecated with v3.0.1)
55
+ //
56
+ // This should have been removed in v3 with the dropping of `.nav-list`, but
57
+ // we missed it. We don't currently support this anywhere, but in the interest
58
+ // of maintaining backward compatibility in case you use it, it's deprecated.
59
+ .nav-divider {
60
+ @include nav-divider();
61
+ }
56
62
 
57
- .nav-list {
58
- padding-left: 15px;
59
- padding-right: 15px;
60
- margin-bottom: 0;
61
- }
62
- .nav-list > li > a,
63
- .nav-list .nav-header {
64
- margin-left: -15px;
65
- margin-right: -15px;
66
- text-shadow: 0 1px 0 rgba(255,255,255,.5);
67
- }
68
- .nav-list > li > a {
69
- padding: 3px 15px;
70
- }
71
- .nav-list > .active > a,
72
- .nav-list > .active > a:hover,
73
- .nav-list > .active > a:focus {
74
- color: $white;
75
- text-shadow: 0 -1px 0 rgba(0,0,0,.2);
76
- background-color: $linkColor;
77
- }
78
- .nav-list [class^="icon-"],
79
- .nav-list [class*=" icon-"] {
80
- margin-right: 2px;
81
- }
82
- // Dividers (basically an hr) within the dropdown
83
- .nav-list .divider {
84
- @include nav-divider();
63
+ // Prevent IE8 from misplacing imgs
64
+ //
65
+ // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
66
+ > li > a > img {
67
+ max-width: none;
68
+ }
85
69
  }
86
70
 
87
71
 
88
-
89
- // TABS AND PILLS
90
- // -------------
91
-
92
- // Common styles
93
- .nav-tabs,
94
- .nav-pills {
95
- @include clearfix();
96
- }
97
- .nav-tabs > li,
98
- .nav-pills > li {
99
- float: left;
100
- }
101
- .nav-tabs > li > a,
102
- .nav-pills > li > a {
103
- padding-right: 12px;
104
- padding-left: 12px;
105
- margin-right: 2px;
106
- line-height: 14px; // keeps the overall height an even number
107
- }
108
-
109
- // TABS
110
- // ----
72
+ // Tabs
73
+ // -------------------------
111
74
 
112
75
  // Give the tabs something to sit on
113
76
  .nav-tabs {
114
- border-bottom: 1px solid #ddd;
115
- }
116
- // Make the list-items overlay the bottom border
117
- .nav-tabs > li {
118
- margin-bottom: -1px;
119
- }
120
- // Actual tabs (as links)
121
- .nav-tabs > li > a {
122
- padding-top: 8px;
123
- padding-bottom: 8px;
124
- line-height: $baseLineHeight;
125
- border: 1px solid transparent;
126
- @include border-radius(4px 4px 0 0);
127
- &:hover,
128
- &:focus {
129
- border-color: $grayLighter $grayLighter #ddd;
77
+ border-bottom: 1px solid $nav-tabs-border-color;
78
+ > li {
79
+ float: left;
80
+ // Make the list-items overlay the bottom border
81
+ margin-bottom: -1px;
82
+
83
+ // Actual tabs (as links)
84
+ > a {
85
+ margin-right: 2px;
86
+ line-height: $line-height-base;
87
+ border: 1px solid transparent;
88
+ border-radius: $border-radius-base $border-radius-base 0 0;
89
+ &:hover {
90
+ border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
91
+ }
92
+ }
93
+
94
+ // Active state, and its :hover to override normal :hover
95
+ &.active > a {
96
+ &,
97
+ &:hover,
98
+ &:focus {
99
+ color: $nav-tabs-active-link-hover-color;
100
+ background-color: $nav-tabs-active-link-hover-bg;
101
+ border: 1px solid $nav-tabs-active-link-hover-border-color;
102
+ border-bottom-color: transparent;
103
+ cursor: default;
104
+ }
105
+ }
106
+ }
107
+ // pulling this in mainly for less shorthand
108
+ &.nav-justified {
109
+ @extend .nav-justified;
110
+ @extend .nav-tabs-justified;
130
111
  }
131
- }
132
- // Active state, and it's :hover/:focus to override normal :hover/:focus
133
- .nav-tabs > .active > a,
134
- .nav-tabs > .active > a:hover,
135
- .nav-tabs > .active > a:focus {
136
- color: $gray;
137
- background-color: $bodyBackground;
138
- border: 1px solid #ddd;
139
- border-bottom-color: transparent;
140
- cursor: default;
141
- }
142
-
143
-
144
- // PILLS
145
- // -----
146
-
147
- // Links rendered as pills
148
- .nav-pills > li > a {
149
- padding-top: 8px;
150
- padding-bottom: 8px;
151
- margin-top: 2px;
152
- margin-bottom: 2px;
153
- @include border-radius(5px);
154
- }
155
-
156
- // Active state
157
- .nav-pills > .active > a,
158
- .nav-pills > .active > a:hover,
159
- .nav-pills > .active > a:focus {
160
- color: $white;
161
- background-color: $linkColor;
162
- }
163
-
164
-
165
-
166
- // STACKED NAV
167
- // -----------
168
-
169
- // Stacked tabs and pills
170
- .nav-stacked > li {
171
- float: none;
172
- }
173
- .nav-stacked > li > a {
174
- margin-right: 0; // no need for the gap between nav items
175
112
  }
176
113
 
177
- // Tabs
178
- .nav-tabs.nav-stacked {
179
- border-bottom: 0;
180
- }
181
- .nav-tabs.nav-stacked > li > a {
182
- border: 1px solid #ddd;
183
- @include border-radius(0);
184
- }
185
- .nav-tabs.nav-stacked > li:first-child > a {
186
- @include border-top-radius(4px);
187
- }
188
- .nav-tabs.nav-stacked > li:last-child > a {
189
- @include border-bottom-radius(4px);
190
- }
191
- .nav-tabs.nav-stacked > li > a:hover,
192
- .nav-tabs.nav-stacked > li > a:focus {
193
- border-color: #ddd;
194
- z-index: 2;
195
- }
196
114
 
197
115
  // Pills
198
- .nav-pills.nav-stacked > li > a {
199
- margin-bottom: 3px;
200
- }
201
- .nav-pills.nav-stacked > li:last-child > a {
202
- margin-bottom: 1px; // decrease margin to match sizing of stacked tabs
203
- }
204
-
205
-
206
-
207
- // DROPDOWNS
208
- // ---------
209
-
210
- .nav-tabs .dropdown-menu {
211
- @include border-radius(0 0 6px 6px); // remove the top rounded corners here since there is a hard edge above the menu
212
- }
213
- .nav-pills .dropdown-menu {
214
- @include border-radius(6px); // make rounded corners match the pills
215
- }
216
-
217
- // Default dropdown links
218
116
  // -------------------------
219
- // Make carets use linkColor to start
220
- .nav .dropdown-toggle .caret {
221
- border-top-color: $linkColor;
222
- border-bottom-color: $linkColor;
223
- margin-top: 6px;
224
- }
225
- .nav .dropdown-toggle:hover .caret,
226
- .nav .dropdown-toggle:focus .caret {
227
- border-top-color: $linkColorHover;
228
- border-bottom-color: $linkColorHover;
229
- }
230
- /* move down carets for tabs */
231
- .nav-tabs .dropdown-toggle .caret {
232
- margin-top: 8px;
233
- }
234
-
235
- // Active dropdown links
236
- // -------------------------
237
- .nav .active .dropdown-toggle .caret {
238
- border-top-color: #fff;
239
- border-bottom-color: #fff;
240
- }
241
- .nav-tabs .active .dropdown-toggle .caret {
242
- border-top-color: $gray;
243
- border-bottom-color: $gray;
117
+ .nav-pills {
118
+ > li {
119
+ float: left;
120
+
121
+ // Links rendered as pills
122
+ > a {
123
+ border-radius: $nav-pills-border-radius;
124
+ }
125
+ + li {
126
+ margin-left: 2px;
127
+ }
128
+
129
+ // Active state
130
+ &.active > a {
131
+ &,
132
+ &:hover,
133
+ &:focus {
134
+ color: $nav-pills-active-link-hover-color;
135
+ background-color: $nav-pills-active-link-hover-bg;
136
+ }
137
+ }
138
+ }
244
139
  }
245
140
 
246
- // Active:hover/:focus dropdown links
247
- // -------------------------
248
- .nav > .dropdown.active > a:hover,
249
- .nav > .dropdown.active > a:focus {
250
- cursor: pointer;
251
- }
252
141
 
253
- // Open dropdowns
254
- // -------------------------
255
- .nav-tabs .open .dropdown-toggle,
256
- .nav-pills .open .dropdown-toggle,
257
- .nav > li.dropdown.open.active > a:hover,
258
- .nav > li.dropdown.open.active > a:focus {
259
- color: $white;
260
- background-color: $grayLight;
261
- border-color: $grayLight;
262
- }
263
- .nav li.dropdown.open .caret,
264
- .nav li.dropdown.open.active .caret,
265
- .nav li.dropdown.open a:hover .caret,
266
- .nav li.dropdown.open a:focus .caret {
267
- border-top-color: $white;
268
- border-bottom-color: $white;
269
- @include opacity(100);
142
+ // Stacked pills
143
+ .nav-stacked {
144
+ > li {
145
+ float: none;
146
+ + li {
147
+ margin-top: 2px;
148
+ margin-left: 0; // no need for this gap between nav items
149
+ }
150
+ }
270
151
  }
271
152
 
272
- // Dropdowns in stacked tabs
273
- .tabs-stacked .open > a:hover,
274
- .tabs-stacked .open > a:focus {
275
- border-color: $grayLight;
276
- }
277
153
 
154
+ // Nav variations
155
+ // --------------------------------------------------
278
156
 
157
+ // Justified nav links
158
+ // -------------------------
279
159
 
280
- // TABBABLE
281
- // --------
160
+ .nav-justified {
161
+ width: 100%;
282
162
 
163
+ > li {
164
+ float: none;
165
+ > a {
166
+ text-align: center;
167
+ margin-bottom: 5px;
168
+ }
169
+ }
283
170
 
284
- // COMMON STYLES
285
- // -------------
171
+ > .dropdown .dropdown-menu {
172
+ top: auto;
173
+ left: auto;
174
+ }
286
175
 
287
- // Clear any floats
288
- .tabbable {
289
- @include clearfix();
290
- }
291
- .tab-content {
292
- overflow: auto; // prevent content from running below tabs
176
+ @media (min-width: $screen-sm-min) {
177
+ > li {
178
+ display: table-cell;
179
+ width: 1%;
180
+ > a {
181
+ margin-bottom: 0;
182
+ }
183
+ }
184
+ }
293
185
  }
294
186
 
295
- // Remove border on bottom, left, right
296
- .tabs-below > .nav-tabs,
297
- .tabs-right > .nav-tabs,
298
- .tabs-left > .nav-tabs {
187
+ // Move borders to anchors instead of bottom of list
188
+ //
189
+ // Mixin for adding on top the shared `.nav-justified` styles for our tabs
190
+ .nav-tabs-justified {
299
191
  border-bottom: 0;
300
- }
301
-
302
- // Show/hide tabbable areas
303
- .tab-content > .tab-pane,
304
- .pill-content > .pill-pane {
305
- display: none;
306
- }
307
- .tab-content > .active,
308
- .pill-content > .active {
309
- display: block;
310
- }
311
192
 
193
+ > li > a {
194
+ // Override margin from .nav-tabs
195
+ margin-right: 0;
196
+ border-radius: $border-radius-base;
197
+ }
312
198
 
313
- // BOTTOM
314
- // ------
199
+ > .active > a,
200
+ > .active > a:hover,
201
+ > .active > a:focus {
202
+ border: 1px solid $nav-tabs-justified-link-border-color;
203
+ }
315
204
 
316
- .tabs-below > .nav-tabs {
317
- border-top: 1px solid #ddd;
318
- }
319
- .tabs-below > .nav-tabs > li {
320
- margin-top: -1px;
321
- margin-bottom: 0;
322
- }
323
- .tabs-below > .nav-tabs > li > a {
324
- @include border-radius(0 0 4px 4px);
325
- &:hover,
326
- &:focus {
327
- border-bottom-color: transparent;
328
- border-top-color: #ddd;
205
+ @media (min-width: $screen-sm-min) {
206
+ > li > a {
207
+ border-bottom: 1px solid $nav-tabs-justified-link-border-color;
208
+ border-radius: $border-radius-base $border-radius-base 0 0;
209
+ }
210
+ > .active > a,
211
+ > .active > a:hover,
212
+ > .active > a:focus {
213
+ border-bottom-color: $nav-tabs-justified-active-link-border-color;
214
+ }
329
215
  }
330
216
  }
331
- .tabs-below > .nav-tabs > .active > a,
332
- .tabs-below > .nav-tabs > .active > a:hover,
333
- .tabs-below > .nav-tabs > .active > a:focus {
334
- border-color: transparent #ddd #ddd #ddd;
335
- }
336
217
 
337
- // LEFT & RIGHT
338
- // ------------
339
218
 
340
- // Common styles
341
- .tabs-left > .nav-tabs > li,
342
- .tabs-right > .nav-tabs > li {
343
- float: none;
344
- }
345
- .tabs-left > .nav-tabs > li > a,
346
- .tabs-right > .nav-tabs > li > a {
347
- min-width: 74px;
348
- margin-right: 0;
349
- margin-bottom: 3px;
350
- }
351
-
352
- // Tabs on the left
353
- .tabs-left > .nav-tabs {
354
- float: left;
355
- margin-right: 19px;
356
- border-right: 1px solid #ddd;
357
- }
358
- .tabs-left > .nav-tabs > li > a {
359
- margin-right: -1px;
360
- @include border-radius(4px 0 0 4px);
361
- }
362
- .tabs-left > .nav-tabs > li > a:hover,
363
- .tabs-left > .nav-tabs > li > a:focus {
364
- border-color: $grayLighter #ddd $grayLighter $grayLighter;
365
- }
366
- .tabs-left > .nav-tabs .active > a,
367
- .tabs-left > .nav-tabs .active > a:hover,
368
- .tabs-left > .nav-tabs .active > a:focus {
369
- border-color: #ddd transparent #ddd #ddd;
370
- *border-right-color: $white;
371
- }
219
+ // Tabbable tabs
220
+ // -------------------------
372
221
 
373
- // Tabs on the right
374
- .tabs-right > .nav-tabs {
375
- float: right;
376
- margin-left: 19px;
377
- border-left: 1px solid #ddd;
378
- }
379
- .tabs-right > .nav-tabs > li > a {
380
- margin-left: -1px;
381
- @include border-radius(0 4px 4px 0);
382
- }
383
- .tabs-right > .nav-tabs > li > a:hover,
384
- .tabs-right > .nav-tabs > li > a:focus {
385
- border-color: $grayLighter $grayLighter $grayLighter #ddd;
386
- }
387
- .tabs-right > .nav-tabs .active > a,
388
- .tabs-right > .nav-tabs .active > a:hover,
389
- .tabs-right > .nav-tabs .active > a:focus {
390
- border-color: #ddd #ddd #ddd transparent;
391
- *border-left-color: $white;
222
+ // Hide tabbable panes to start, show them when `.active`
223
+ .tab-content {
224
+ > .tab-pane {
225
+ display: none;
226
+ }
227
+ > .active {
228
+ display: block;
229
+ }
392
230
  }
393
231
 
394
232
 
233
+ // Dropdowns
234
+ // -------------------------
395
235
 
396
- // DISABLED STATES
397
- // ---------------
398
-
399
- // Gray out text
400
- .nav > .disabled > a {
401
- color: $grayLight;
402
- }
403
- // Nuke hover/focus effects
404
- .nav > .disabled > a:hover,
405
- .nav > .disabled > a:focus {
406
- text-decoration: none;
407
- background-color: transparent;
408
- cursor: default;
236
+ // Specific dropdowns
237
+ .nav-tabs .dropdown-menu {
238
+ // make dropdown border overlap tab border
239
+ margin-top: -1px;
240
+ // Remove the top rounded corners here since there is a hard edge above the menu
241
+ @include border-top-radius(0);
409
242
  }