publish_my_data 0.0.32 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. data/app/assets/images/publish_my_data/small-spinner.gif +0 -0
  2. data/app/assets/images/publish_my_data/sort-asc.gif +0 -0
  3. data/app/assets/images/publish_my_data/sort-desc.gif +0 -0
  4. data/app/assets/javascripts/bootstrap/affix.js +126 -0
  5. data/app/assets/javascripts/bootstrap/alert.js +98 -0
  6. data/app/assets/javascripts/bootstrap/button.js +109 -0
  7. data/app/assets/javascripts/bootstrap/carousel.js +217 -0
  8. data/app/assets/javascripts/bootstrap/collapse.js +179 -0
  9. data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
  10. data/app/assets/javascripts/bootstrap/modal.js +246 -0
  11. data/app/assets/javascripts/bootstrap/popover.js +117 -0
  12. data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
  13. data/app/assets/javascripts/bootstrap/tab.js +135 -0
  14. data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
  15. data/app/assets/javascripts/bootstrap/transition.js +56 -0
  16. data/app/assets/javascripts/publish_my_data/grid/10_data-loader.js +142 -0
  17. data/app/assets/javascripts/publish_my_data/grid/20_cube-grid.js +512 -0
  18. data/app/assets/javascripts/publish_my_data/grid/30_cube-dimension.js +77 -0
  19. data/app/assets/javascripts/publish_my_data/grid/40_cube-dimension-dropdown.js +87 -0
  20. data/app/assets/javascripts/publish_my_data/grid/45_cube-dimension-label.js +58 -0
  21. data/app/assets/javascripts/publish_my_data/grid/50_cube-dimensions-controls.js +336 -0
  22. data/app/assets/javascripts/publish_my_data/grid/60_dataset_cube_grid.js +187 -0
  23. data/app/assets/javascripts/publish_my_data/grid/70_sparql_results_grid.js +135 -0
  24. data/app/assets/javascripts/publish_my_data/select_text.js +27 -0
  25. data/app/assets/javascripts/publish_my_data.js +3 -0
  26. data/app/assets/javascripts/slick_grid/10_event-drag.js +402 -0
  27. data/app/assets/javascripts/slick_grid/20_slick-core.js +458 -0
  28. data/app/assets/javascripts/slick_grid/30_slick-grid.js +3295 -0
  29. data/app/assets/stylesheets/bootstrap/_alerts.scss +67 -0
  30. data/app/assets/stylesheets/bootstrap/_badges.scss +51 -0
  31. data/app/assets/stylesheets/bootstrap/_breadcrumbs.scss +23 -0
  32. data/app/assets/stylesheets/bootstrap/_button-groups.scss +248 -0
  33. data/app/assets/stylesheets/bootstrap/_buttons.scss +160 -0
  34. data/app/assets/stylesheets/bootstrap/_carousel.scss +209 -0
  35. data/app/assets/stylesheets/bootstrap/_close.scss +33 -0
  36. data/app/assets/stylesheets/bootstrap/_code.scss +56 -0
  37. data/app/assets/stylesheets/bootstrap/_component-animations.scss +29 -0
  38. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +194 -0
  39. data/app/assets/stylesheets/bootstrap/_forms.scss +350 -0
  40. data/app/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
  41. data/app/assets/stylesheets/bootstrap/_grid.scss +346 -0
  42. data/app/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
  43. data/app/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
  44. data/app/assets/stylesheets/bootstrap/_labels.scss +58 -0
  45. data/app/assets/stylesheets/bootstrap/_list-group.scss +88 -0
  46. data/app/assets/stylesheets/bootstrap/_media.scss +56 -0
  47. data/app/assets/stylesheets/bootstrap/_mixins.scss +728 -0
  48. data/app/assets/stylesheets/bootstrap/_modals.scss +145 -0
  49. data/app/assets/stylesheets/bootstrap/_navbar.scss +625 -0
  50. data/app/assets/stylesheets/bootstrap/_navs.scss +229 -0
  51. data/app/assets/stylesheets/bootstrap/_normalize.scss +396 -0
  52. data/app/assets/stylesheets/bootstrap/_pager.scss +55 -0
  53. data/app/assets/stylesheets/bootstrap/_pagination.scss +83 -0
  54. data/app/assets/stylesheets/bootstrap/_panels.scss +148 -0
  55. data/app/assets/stylesheets/bootstrap/_popovers.scss +133 -0
  56. data/app/assets/stylesheets/bootstrap/_print.scss +100 -0
  57. data/app/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
  58. data/app/assets/stylesheets/bootstrap/_responsive-utilities.scss +209 -0
  59. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +130 -0
  60. data/app/assets/stylesheets/bootstrap/_tables.scss +236 -0
  61. data/app/assets/stylesheets/bootstrap/_theme.scss +232 -0
  62. data/app/assets/stylesheets/bootstrap/_thumbnails.scss +31 -0
  63. data/app/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
  64. data/app/assets/stylesheets/bootstrap/_type.scss +238 -0
  65. data/app/assets/stylesheets/bootstrap/_utilities.scss +42 -0
  66. data/app/assets/stylesheets/bootstrap/_variables.scss +620 -0
  67. data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
  68. data/app/assets/stylesheets/bootstrap/bootstrap.scss +59 -0
  69. data/app/assets/stylesheets/publish_my_data/core.scss +244 -0
  70. data/app/assets/stylesheets/publish_my_data/data_grid.scss +103 -0
  71. data/app/assets/stylesheets/publish_my_data/variables.scss +1 -0
  72. data/app/assets/stylesheets/{publish_my_data.css → publish_my_data.scss} +13 -2
  73. data/app/assets/stylesheets/slick_grid/slick_grid.scss +155 -0
  74. data/app/assets/stylesheets/slick_grid/slick_grid_default_theme.scss +97 -0
  75. data/app/controllers/concerns/publish_my_data/data_cube.rb +42 -0
  76. data/app/controllers/publish_my_data/data_cube/dimensions_controller.rb +58 -0
  77. data/app/controllers/publish_my_data/data_cube/observations_controller.rb +54 -0
  78. data/app/controllers/publish_my_data/datasets_controller.rb +0 -11
  79. data/app/controllers/publish_my_data/example_resources_controller.rb +11 -0
  80. data/app/controllers/publish_my_data/home_controller.rb +4 -0
  81. data/app/controllers/publish_my_data/information_resources_controller.rb +0 -13
  82. data/app/helpers/publish_my_data/application_helper.rb +66 -0
  83. data/app/helpers/publish_my_data/crumb_helper.rb +61 -0
  84. data/app/helpers/publish_my_data/datasets_helper.rb +31 -0
  85. data/app/helpers/publish_my_data/resources_helper.rb +24 -0
  86. data/app/models/concerns/publish_my_data/cube_results.rb +51 -0
  87. data/app/models/concerns/publish_my_data/dataset_powers.rb +13 -0
  88. data/app/models/publish_my_data/data_cube/cube.rb +358 -0
  89. data/app/models/publish_my_data/data_cube/dimension.rb +58 -0
  90. data/app/models/publish_my_data/vocabulary.rb +0 -4
  91. data/app/views/layouts/publish_my_data/application.html.haml +18 -0
  92. data/app/views/layouts/publish_my_data/error.html.haml +21 -0
  93. data/app/views/publish_my_data/classes/show.html.haml +28 -0
  94. data/app/views/publish_my_data/concept_schemes/show.html.haml +79 -0
  95. data/app/views/publish_my_data/concepts/show.html.haml +28 -0
  96. data/app/views/publish_my_data/data_cube/_controls.html.haml +19 -0
  97. data/app/views/publish_my_data/data_cube/_grid.html.haml +37 -0
  98. data/app/views/publish_my_data/datasets/_example_resources.html.haml +47 -0
  99. data/app/views/publish_my_data/datasets/_types_table.html.erb +33 -0
  100. data/app/views/publish_my_data/datasets/index.html.haml +32 -0
  101. data/app/views/publish_my_data/datasets/show.html.haml +186 -0
  102. data/app/views/publish_my_data/errors/not_found.html.haml +18 -0
  103. data/app/views/publish_my_data/errors/response_too_large.html.haml +16 -0
  104. data/app/views/publish_my_data/errors/timeout.html.haml +16 -0
  105. data/app/views/publish_my_data/errors/uncaught.html.haml +16 -0
  106. data/app/views/publish_my_data/example_resources/index.js.erb +1 -0
  107. data/app/views/publish_my_data/home/accessibility.html.haml +1 -0
  108. data/app/views/publish_my_data/home/docs.html.haml +1 -0
  109. data/app/views/publish_my_data/home/home.html.haml +5 -0
  110. data/app/views/publish_my_data/home/privacy.html.haml +1 -0
  111. data/app/views/publish_my_data/ontologies/show.html.haml +100 -0
  112. data/app/views/publish_my_data/properties/show.html.haml +28 -0
  113. data/app/views/publish_my_data/resources/_resource_data.html.haml +16 -0
  114. data/app/views/publish_my_data/resources/_sparql_section.html.haml +22 -0
  115. data/app/views/publish_my_data/resources/index.html.haml +37 -0
  116. data/app/views/publish_my_data/resources/show.html.haml +36 -0
  117. data/app/views/publish_my_data/shared/_browser_warning.html.haml +4 -0
  118. data/app/views/publish_my_data/shared/_deprecation_notice.html.haml +8 -0
  119. data/app/views/publish_my_data/shared/_footer.html.haml +11 -0
  120. data/app/views/publish_my_data/shared/_google_analytics.html.haml +11 -0
  121. data/app/views/publish_my_data/shared/_logo.html.haml +1 -0
  122. data/app/views/publish_my_data/shared/_meta_title.html.haml +2 -0
  123. data/app/views/publish_my_data/sparql/_form.html.haml +28 -0
  124. data/app/views/publish_my_data/sparql/_formats_dropdown.html.haml +11 -0
  125. data/app/views/publish_my_data/sparql/endpoint.html.haml +125 -0
  126. data/app/views/publish_my_data/sparql/formats_dropdowns/_ask.html.haml +7 -0
  127. data/app/views/publish_my_data/sparql/formats_dropdowns/_construct.html.haml +7 -0
  128. data/app/views/publish_my_data/sparql/formats_dropdowns/_describe.html.haml +1 -0
  129. data/app/views/publish_my_data/sparql/formats_dropdowns/_select.html.haml +9 -0
  130. data/app/views/publish_my_data/themes/index.html.haml +30 -0
  131. data/app/views/publish_my_data/themes/show.html.haml +43 -0
  132. data/config/routes.rb +20 -5
  133. data/lib/publish_my_data/version.rb +1 -1
  134. data/lib/publish_my_data.rb +7 -12
  135. data/spec/controllers/publish_my_data/datasets_controller_spec.rb +0 -75
  136. data/spec/controllers/publish_my_data/information_resources_controller_spec.rb +2 -11
  137. data/spec/dummy/config/environments/development.rb +0 -4
  138. data/spec/dummy/config/environments/test.rb +0 -4
  139. data/spec/dummy/log/test.log +62962 -0
  140. data/spec/dummy/tmp/cache/sass/e509ccd4d793d2c162d70125e9f3656b6c28f357/(__TEMPLATE__)c +0 -0
  141. data/spec/features/running_a_sparql_query_spec.rb +1 -1
  142. data/spec/features/uri_dereferencing_spec.rb +1 -1
  143. metadata +200 -58
  144. data/app/controllers/concerns/publish_my_data/data_download.rb +0 -22
  145. data/app/controllers/publish_my_data/vocabularies_controller.rb +0 -18
  146. data/app/views/layouts/publish_my_data/application.html.erb +0 -13
  147. data/app/views/layouts/publish_my_data/error.html.erb +0 -13
  148. data/app/views/publish_my_data/classes/show.html.erb +0 -3
  149. data/app/views/publish_my_data/concept_schemes/_concepts.html.erb +0 -18
  150. data/app/views/publish_my_data/concept_schemes/show.html.erb +0 -11
  151. data/app/views/publish_my_data/concepts/show.html.erb +0 -3
  152. data/app/views/publish_my_data/datasets/index.html.erb +0 -20
  153. data/app/views/publish_my_data/datasets/show.html.erb +0 -18
  154. data/app/views/publish_my_data/errors/not_found.html.erb +0 -1
  155. data/app/views/publish_my_data/errors/response_too_large.html.erb +0 -1
  156. data/app/views/publish_my_data/errors/timeout.html.erb +0 -1
  157. data/app/views/publish_my_data/errors/uncaught.html.erb +0 -6
  158. data/app/views/publish_my_data/ontologies/show.html.erb +0 -17
  159. data/app/views/publish_my_data/properties/show.html.erb +0 -3
  160. data/app/views/publish_my_data/resources/_predicates_table.html.erb +0 -30
  161. data/app/views/publish_my_data/resources/_predicates_table_head.html.erb +0 -6
  162. data/app/views/publish_my_data/resources/_resource_formats.html.erb +0 -4
  163. data/app/views/publish_my_data/resources/_summaries.html.erb +0 -18
  164. data/app/views/publish_my_data/resources/_uri_and_label.html.erb +0 -3
  165. data/app/views/publish_my_data/resources/index.html.erb +0 -40
  166. data/app/views/publish_my_data/resources/show.html.erb +0 -3
  167. data/app/views/publish_my_data/sparql/_ask_formats.html.erb +0 -3
  168. data/app/views/publish_my_data/sparql/_construct_formats.html.erb +0 -3
  169. data/app/views/publish_my_data/sparql/_describe_formats.html.erb +0 -1
  170. data/app/views/publish_my_data/sparql/_error_message.html.erb +0 -3
  171. data/app/views/publish_my_data/sparql/_form.html.erb +0 -4
  172. data/app/views/publish_my_data/sparql/_formats.html.erb +0 -6
  173. data/app/views/publish_my_data/sparql/_pagination.html.erb +0 -6
  174. data/app/views/publish_my_data/sparql/_results.html.erb +0 -5
  175. data/app/views/publish_my_data/sparql/_results_data.html.erb +0 -4
  176. data/app/views/publish_my_data/sparql/_select_formats.html.erb +0 -3
  177. data/app/views/publish_my_data/sparql/endpoint.html.erb +0 -10
  178. data/app/views/publish_my_data/themes/index.html.erb +0 -13
  179. data/app/views/publish_my_data/themes/show.html.erb +0 -15
  180. data/config/initializers/20_s3_setup.rb +0 -4
  181. data/spec/controllers/publish_my_data/vocabularies_controller_spec.rb +0 -14
  182. data/spec/support/data_download.rb +0 -60
@@ -0,0 +1,209 @@
1
+ //
2
+ // Carousel
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Wrapper for the slide container and indicators
7
+ .carousel {
8
+ position: relative;
9
+ }
10
+
11
+ .carousel-inner {
12
+ position: relative;
13
+ overflow: hidden;
14
+ width: 100%;
15
+
16
+ > .item {
17
+ display: none;
18
+ position: relative;
19
+ @include transition(.6s ease-in-out left);
20
+
21
+ // Account for jankitude on images
22
+ > img,
23
+ > a > img {
24
+ @include img-responsive();
25
+ line-height: 1;
26
+ }
27
+ }
28
+
29
+ > .active,
30
+ > .next,
31
+ > .prev { display: block; }
32
+
33
+ > .active {
34
+ left: 0;
35
+ }
36
+
37
+ > .next,
38
+ > .prev {
39
+ position: absolute;
40
+ top: 0;
41
+ width: 100%;
42
+ }
43
+
44
+ > .next {
45
+ left: 100%;
46
+ }
47
+ > .prev {
48
+ left: -100%;
49
+ }
50
+ > .next.left,
51
+ > .prev.right {
52
+ left: 0;
53
+ }
54
+
55
+ > .active.left {
56
+ left: -100%;
57
+ }
58
+ > .active.right {
59
+ left: 100%;
60
+ }
61
+
62
+ }
63
+
64
+ // Left/right controls for nav
65
+ // ---------------------------
66
+
67
+ .carousel-control {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ bottom: 0;
72
+ width: $carousel-control-width;
73
+ @include opacity($carousel-control-opacity);
74
+ font-size: $carousel-control-font-size;
75
+ color: $carousel-control-color;
76
+ text-align: center;
77
+ text-shadow: $carousel-text-shadow;
78
+ // We can't have this transition here because webkit cancels the carousel
79
+ // animation if you trip this while in the middle of another animation.
80
+
81
+ // Set gradients for backgrounds
82
+ &.left {
83
+ @include gradient-horizontal($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
84
+ }
85
+ &.right {
86
+ left: auto;
87
+ right: 0;
88
+ @include gradient-horizontal($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
89
+ }
90
+
91
+ // Hover/focus state
92
+ &:hover,
93
+ &:focus {
94
+ color: $carousel-control-color;
95
+ text-decoration: none;
96
+ @include opacity(.9);
97
+ }
98
+
99
+ // Toggles
100
+ .icon-prev,
101
+ .icon-next,
102
+ .glyphicon-chevron-left,
103
+ .glyphicon-chevron-right {
104
+ position: absolute;
105
+ top: 50%;
106
+ left: 50%;
107
+ z-index: 5;
108
+ display: inline-block;
109
+ }
110
+ .icon-prev,
111
+ .icon-next {
112
+ width: 20px;
113
+ height: 20px;
114
+ margin-top: -10px;
115
+ margin-left: -10px;
116
+ font-family: serif;
117
+ }
118
+
119
+ .icon-prev {
120
+ &:before {
121
+ content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
122
+ }
123
+ }
124
+ .icon-next {
125
+ &:before {
126
+ content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
127
+ }
128
+ }
129
+ }
130
+
131
+ // Optional indicator pips
132
+ //
133
+ // Add an unordered list with the following class and add a list item for each
134
+ // slide your carousel holds.
135
+
136
+ .carousel-indicators {
137
+ position: absolute;
138
+ bottom: 10px;
139
+ left: 50%;
140
+ z-index: 15;
141
+ width: 60%;
142
+ margin-left: -30%;
143
+ padding-left: 0;
144
+ list-style: none;
145
+ text-align: center;
146
+
147
+ li {
148
+ display: inline-block;
149
+ width: 10px;
150
+ height: 10px;
151
+ margin: 1px;
152
+ text-indent: -999px;
153
+ border: 1px solid $carousel-indicator-border-color;
154
+ border-radius: 10px;
155
+ cursor: pointer;
156
+ }
157
+ .active {
158
+ margin: 0;
159
+ width: 12px;
160
+ height: 12px;
161
+ background-color: $carousel-indicator-active-bg;
162
+ }
163
+ }
164
+
165
+ // Optional captions
166
+ // -----------------------------
167
+ // Hidden by default for smaller viewports
168
+ .carousel-caption {
169
+ position: absolute;
170
+ left: 15%;
171
+ right: 15%;
172
+ bottom: 20px;
173
+ z-index: 10;
174
+ padding-top: 20px;
175
+ padding-bottom: 20px;
176
+ color: $carousel-caption-color;
177
+ text-align: center;
178
+ text-shadow: $carousel-text-shadow;
179
+ & .btn {
180
+ text-shadow: none; // No shadow for button elements in carousel-caption
181
+ }
182
+ }
183
+
184
+
185
+ // Scale up controls for tablets and up
186
+ @media screen and (min-width: $screen-tablet) {
187
+
188
+ // Scale up the controls a smidge
189
+ .carousel-control .icon-prev,
190
+ .carousel-control .icon-next {
191
+ width: 30px;
192
+ height: 30px;
193
+ margin-top: -15px;
194
+ margin-left: -15px;
195
+ font-size: 30px;
196
+ }
197
+
198
+ // Show and left align the captions
199
+ .carousel-caption {
200
+ left: 20%;
201
+ right: 20%;
202
+ padding-bottom: 30px;
203
+ }
204
+
205
+ // Move up the indicators
206
+ .carousel-indicators {
207
+ bottom: 20px;
208
+ }
209
+ }
@@ -0,0 +1,33 @@
1
+ //
2
+ // Close icons
3
+ // --------------------------------------------------
4
+
5
+
6
+ .close {
7
+ float: right;
8
+ font-size: ($font-size-base * 1.5);
9
+ font-weight: $close-font-weight;
10
+ line-height: 1;
11
+ color: $close-color;
12
+ text-shadow: $close-text-shadow;
13
+ @include opacity(.2);
14
+
15
+ &:hover,
16
+ &:focus {
17
+ color: $close-color;
18
+ text-decoration: none;
19
+ cursor: pointer;
20
+ @include opacity(.5);
21
+ }
22
+ }
23
+
24
+ // Additional properties for button version
25
+ // iOS requires the button element instead of an anchor tag.
26
+ // If you want the anchor version, it requires `href="#"`.
27
+ button.close {
28
+ padding: 0;
29
+ cursor: pointer;
30
+ background: transparent;
31
+ border: 0;
32
+ -webkit-appearance: none;
33
+ }
@@ -0,0 +1,56 @@
1
+ //
2
+ // Code (inline and blocK)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ pre {
9
+ font-family: $font-family-monospace;
10
+ }
11
+
12
+ // Inline code
13
+ code {
14
+ padding: 2px 4px;
15
+ font-size: 90%;
16
+ color: $code-color;
17
+ background-color: $code-bg;
18
+ white-space: nowrap;
19
+ border-radius: $border-radius-base;
20
+ }
21
+
22
+ // Blocks of code
23
+ pre {
24
+ display: block;
25
+ padding: (($line-height-computed - 1) / 2);
26
+ margin: 0 0 ($line-height-computed / 2);
27
+ font-size: ($font-size-base - 1); // 14px to 13px
28
+ line-height: $line-height-base;
29
+ word-break: break-all;
30
+ word-wrap: break-word;
31
+ color: $pre-color;
32
+ background-color: $pre-bg;
33
+ border: 1px solid $pre-border-color;
34
+ border-radius: $border-radius-base;
35
+
36
+ // Make prettyprint styles more spaced out for readability
37
+ &.prettyprint {
38
+ margin-bottom: $line-height-computed;
39
+ }
40
+
41
+ // Account for some code outputs that place code tags in pre tags
42
+ code {
43
+ padding: 0;
44
+ font-size: inherit;
45
+ color: inherit;
46
+ white-space: pre-wrap;
47
+ background-color: transparent;
48
+ border: 0;
49
+ }
50
+ }
51
+
52
+ // Enable scrollable blocks of code
53
+ .pre-scrollable {
54
+ max-height: $pre-scrollable-max-height;
55
+ overflow-y: scroll;
56
+ }
@@ -0,0 +1,29 @@
1
+ //
2
+ // Component animations
3
+ // --------------------------------------------------
4
+
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
9
+
10
+ .fade {
11
+ opacity: 0;
12
+ @include transition(opacity .15s linear);
13
+ &.in {
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ .collapse {
19
+ display: none;
20
+ &.in {
21
+ display: block;
22
+ }
23
+ }
24
+ .collapsing {
25
+ position: relative;
26
+ height: 0;
27
+ overflow: hidden;
28
+ @include transition(height .35s ease);
29
+ }
@@ -0,0 +1,194 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Dropdown arrow/caret
7
+ .caret {
8
+ display: inline-block;
9
+ width: 0;
10
+ height: 0;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: $caret-width-base solid $dropdown-caret-color;
14
+ border-right: $caret-width-base solid transparent;
15
+ border-left: $caret-width-base solid transparent;
16
+ // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed,
17
+ // we can just straight up remove this.
18
+ border-bottom: 0 dotted;
19
+ content: "";
20
+ }
21
+
22
+ // The dropdown wrapper (div)
23
+ .dropdown {
24
+ position: relative;
25
+ }
26
+
27
+ // Prevent the focus on the dropdown toggle when closing dropdowns
28
+ .dropdown-toggle:focus {
29
+ outline: 0;
30
+ }
31
+
32
+ // The dropdown menu (ul)
33
+ .dropdown-menu {
34
+ position: absolute;
35
+ top: 100%;
36
+ left: 0;
37
+ z-index: $zindex-dropdown;
38
+ display: none; // none by default, but block on "open" of the menu
39
+ float: left;
40
+ min-width: 160px;
41
+ padding: 5px 0;
42
+ margin: 2px 0 0; // override default ul
43
+ list-style: none;
44
+ font-size: $font-size-base;
45
+ background-color: $dropdown-bg;
46
+ border: 1px solid $dropdown-fallback-border; // IE8 fallback
47
+ border: 1px solid $dropdown-border;
48
+ border-radius: $border-radius-base;
49
+ @include box-shadow(0 6px 12px rgba(0,0,0,.175));
50
+ background-clip: padding-box;
51
+
52
+ // Aligns the dropdown menu to right
53
+ &.pull-right {
54
+ right: 0;
55
+ left: auto;
56
+ }
57
+
58
+ // Dividers (basically an hr) within the dropdown
59
+ .divider {
60
+ @include nav-divider($dropdown-divider-bg);
61
+ }
62
+
63
+ // Links within the dropdown menu
64
+ > li > a {
65
+ display: block;
66
+ padding: 3px 20px;
67
+ clear: both;
68
+ font-weight: normal;
69
+ line-height: $line-height-base;
70
+ color: $dropdown-link-color;
71
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
72
+ }
73
+ }
74
+
75
+ // Hover/Focus state
76
+ .dropdown-menu > li > a {
77
+ &:hover,
78
+ &:focus {
79
+ text-decoration: none;
80
+ color: $dropdown-link-hover-color;
81
+ background-color: $dropdown-link-hover-bg;
82
+ }
83
+ }
84
+
85
+ // Active state
86
+ .dropdown-menu > .active > a {
87
+ &,
88
+ &:hover,
89
+ &:focus {
90
+ color: $dropdown-link-active-color;
91
+ text-decoration: none;
92
+ outline: 0;
93
+ background-color: $dropdown-link-active-bg;
94
+ }
95
+ }
96
+
97
+ // Disabled state
98
+ //
99
+ // Gray out text and ensure the hover/focus state remains gray
100
+
101
+ .dropdown-menu > .disabled > a {
102
+ &,
103
+ &:hover,
104
+ &:focus {
105
+ color: $dropdown-link-disabled-color;
106
+ }
107
+ }
108
+ // Nuke hover/focus effects
109
+ .dropdown-menu > .disabled > a {
110
+ &:hover,
111
+ &:focus {
112
+ text-decoration: none;
113
+ background-color: transparent;
114
+ background-image: none; // Remove CSS gradient
115
+ @include reset-filter();
116
+ cursor: not-allowed;
117
+ }
118
+ }
119
+
120
+ // Open state for the dropdown
121
+ .open {
122
+ // Show the menu
123
+ > .dropdown-menu {
124
+ display: block;
125
+ }
126
+
127
+ // Remove the outline when :focus is triggered
128
+ > a {
129
+ outline: 0;
130
+ }
131
+ }
132
+
133
+ // Dropdown section headers
134
+ .dropdown-header {
135
+ display: block;
136
+ padding: 3px 20px;
137
+ font-size: $font-size-small;
138
+ line-height: $line-height-base;
139
+ color: $dropdown-header-color;
140
+ }
141
+
142
+ // Backdrop to catch body clicks on mobile, etc.
143
+ .dropdown-backdrop {
144
+ position: fixed;
145
+ left: 0;
146
+ right: 0;
147
+ bottom: 0;
148
+ top: 0;
149
+ z-index: $zindex-dropdown - 10;
150
+ }
151
+
152
+ // Right aligned dropdowns
153
+ .pull-right > .dropdown-menu {
154
+ right: 0;
155
+ left: auto;
156
+ }
157
+
158
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
159
+ //
160
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
161
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
162
+
163
+ .dropup,
164
+ .navbar-fixed-bottom .dropdown {
165
+ // Reverse the caret
166
+ .caret {
167
+ // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this
168
+ // gets fixed, restore `border-top: 0;`.
169
+ border-top: 0 dotted;
170
+ border-bottom: 4px solid $dropdown-caret-color;
171
+ content: "";
172
+ }
173
+ // Different positioning for bottom up menu
174
+ .dropdown-menu {
175
+ top: auto;
176
+ bottom: 100%;
177
+ margin-bottom: 1px;
178
+ }
179
+ }
180
+
181
+
182
+ // Component alignment
183
+ //
184
+ // Reiterate per navbar.less and the modified component alignment there.
185
+
186
+ @media (min-width: $grid-float-breakpoint) {
187
+ .navbar-right {
188
+ .dropdown-menu {
189
+ right: 0;
190
+ left: auto;
191
+ }
192
+ }
193
+ }
194
+