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.
- data/app/assets/images/publish_my_data/small-spinner.gif +0 -0
- data/app/assets/images/publish_my_data/sort-asc.gif +0 -0
- data/app/assets/images/publish_my_data/sort-desc.gif +0 -0
- data/app/assets/javascripts/bootstrap/affix.js +126 -0
- data/app/assets/javascripts/bootstrap/alert.js +98 -0
- data/app/assets/javascripts/bootstrap/button.js +109 -0
- data/app/assets/javascripts/bootstrap/carousel.js +217 -0
- data/app/assets/javascripts/bootstrap/collapse.js +179 -0
- data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/app/assets/javascripts/bootstrap/modal.js +246 -0
- data/app/assets/javascripts/bootstrap/popover.js +117 -0
- data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/app/assets/javascripts/bootstrap/tab.js +135 -0
- data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/app/assets/javascripts/bootstrap/transition.js +56 -0
- data/app/assets/javascripts/publish_my_data/grid/10_data-loader.js +142 -0
- data/app/assets/javascripts/publish_my_data/grid/20_cube-grid.js +512 -0
- data/app/assets/javascripts/publish_my_data/grid/30_cube-dimension.js +77 -0
- data/app/assets/javascripts/publish_my_data/grid/40_cube-dimension-dropdown.js +87 -0
- data/app/assets/javascripts/publish_my_data/grid/45_cube-dimension-label.js +58 -0
- data/app/assets/javascripts/publish_my_data/grid/50_cube-dimensions-controls.js +336 -0
- data/app/assets/javascripts/publish_my_data/grid/60_dataset_cube_grid.js +187 -0
- data/app/assets/javascripts/publish_my_data/grid/70_sparql_results_grid.js +135 -0
- data/app/assets/javascripts/publish_my_data/select_text.js +27 -0
- data/app/assets/javascripts/publish_my_data.js +3 -0
- data/app/assets/javascripts/slick_grid/10_event-drag.js +402 -0
- data/app/assets/javascripts/slick_grid/20_slick-core.js +458 -0
- data/app/assets/javascripts/slick_grid/30_slick-grid.js +3295 -0
- data/app/assets/stylesheets/bootstrap/_alerts.scss +67 -0
- data/app/assets/stylesheets/bootstrap/_badges.scss +51 -0
- data/app/assets/stylesheets/bootstrap/_breadcrumbs.scss +23 -0
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +248 -0
- data/app/assets/stylesheets/bootstrap/_buttons.scss +160 -0
- data/app/assets/stylesheets/bootstrap/_carousel.scss +209 -0
- data/app/assets/stylesheets/bootstrap/_close.scss +33 -0
- data/app/assets/stylesheets/bootstrap/_code.scss +56 -0
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +29 -0
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +194 -0
- data/app/assets/stylesheets/bootstrap/_forms.scss +350 -0
- data/app/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
- data/app/assets/stylesheets/bootstrap/_grid.scss +346 -0
- data/app/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
- data/app/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
- data/app/assets/stylesheets/bootstrap/_labels.scss +58 -0
- data/app/assets/stylesheets/bootstrap/_list-group.scss +88 -0
- data/app/assets/stylesheets/bootstrap/_media.scss +56 -0
- data/app/assets/stylesheets/bootstrap/_mixins.scss +728 -0
- data/app/assets/stylesheets/bootstrap/_modals.scss +145 -0
- data/app/assets/stylesheets/bootstrap/_navbar.scss +625 -0
- data/app/assets/stylesheets/bootstrap/_navs.scss +229 -0
- data/app/assets/stylesheets/bootstrap/_normalize.scss +396 -0
- data/app/assets/stylesheets/bootstrap/_pager.scss +55 -0
- data/app/assets/stylesheets/bootstrap/_pagination.scss +83 -0
- data/app/assets/stylesheets/bootstrap/_panels.scss +148 -0
- data/app/assets/stylesheets/bootstrap/_popovers.scss +133 -0
- data/app/assets/stylesheets/bootstrap/_print.scss +100 -0
- data/app/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
- data/app/assets/stylesheets/bootstrap/_responsive-utilities.scss +209 -0
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +130 -0
- data/app/assets/stylesheets/bootstrap/_tables.scss +236 -0
- data/app/assets/stylesheets/bootstrap/_theme.scss +232 -0
- data/app/assets/stylesheets/bootstrap/_thumbnails.scss +31 -0
- data/app/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
- data/app/assets/stylesheets/bootstrap/_type.scss +238 -0
- data/app/assets/stylesheets/bootstrap/_utilities.scss +42 -0
- data/app/assets/stylesheets/bootstrap/_variables.scss +620 -0
- data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/bootstrap/bootstrap.scss +59 -0
- data/app/assets/stylesheets/publish_my_data/core.scss +244 -0
- data/app/assets/stylesheets/publish_my_data/data_grid.scss +103 -0
- data/app/assets/stylesheets/publish_my_data/variables.scss +1 -0
- data/app/assets/stylesheets/{publish_my_data.css → publish_my_data.scss} +13 -2
- data/app/assets/stylesheets/slick_grid/slick_grid.scss +155 -0
- data/app/assets/stylesheets/slick_grid/slick_grid_default_theme.scss +97 -0
- data/app/controllers/concerns/publish_my_data/data_cube.rb +42 -0
- data/app/controllers/publish_my_data/data_cube/dimensions_controller.rb +58 -0
- data/app/controllers/publish_my_data/data_cube/observations_controller.rb +54 -0
- data/app/controllers/publish_my_data/datasets_controller.rb +0 -11
- data/app/controllers/publish_my_data/example_resources_controller.rb +11 -0
- data/app/controllers/publish_my_data/home_controller.rb +4 -0
- data/app/controllers/publish_my_data/information_resources_controller.rb +0 -13
- data/app/helpers/publish_my_data/application_helper.rb +66 -0
- data/app/helpers/publish_my_data/crumb_helper.rb +61 -0
- data/app/helpers/publish_my_data/datasets_helper.rb +31 -0
- data/app/helpers/publish_my_data/resources_helper.rb +24 -0
- data/app/models/concerns/publish_my_data/cube_results.rb +51 -0
- data/app/models/concerns/publish_my_data/dataset_powers.rb +13 -0
- data/app/models/publish_my_data/data_cube/cube.rb +358 -0
- data/app/models/publish_my_data/data_cube/dimension.rb +58 -0
- data/app/models/publish_my_data/vocabulary.rb +0 -4
- data/app/views/layouts/publish_my_data/application.html.haml +18 -0
- data/app/views/layouts/publish_my_data/error.html.haml +21 -0
- data/app/views/publish_my_data/classes/show.html.haml +28 -0
- data/app/views/publish_my_data/concept_schemes/show.html.haml +79 -0
- data/app/views/publish_my_data/concepts/show.html.haml +28 -0
- data/app/views/publish_my_data/data_cube/_controls.html.haml +19 -0
- data/app/views/publish_my_data/data_cube/_grid.html.haml +37 -0
- data/app/views/publish_my_data/datasets/_example_resources.html.haml +47 -0
- data/app/views/publish_my_data/datasets/_types_table.html.erb +33 -0
- data/app/views/publish_my_data/datasets/index.html.haml +32 -0
- data/app/views/publish_my_data/datasets/show.html.haml +186 -0
- data/app/views/publish_my_data/errors/not_found.html.haml +18 -0
- data/app/views/publish_my_data/errors/response_too_large.html.haml +16 -0
- data/app/views/publish_my_data/errors/timeout.html.haml +16 -0
- data/app/views/publish_my_data/errors/uncaught.html.haml +16 -0
- data/app/views/publish_my_data/example_resources/index.js.erb +1 -0
- data/app/views/publish_my_data/home/accessibility.html.haml +1 -0
- data/app/views/publish_my_data/home/docs.html.haml +1 -0
- data/app/views/publish_my_data/home/home.html.haml +5 -0
- data/app/views/publish_my_data/home/privacy.html.haml +1 -0
- data/app/views/publish_my_data/ontologies/show.html.haml +100 -0
- data/app/views/publish_my_data/properties/show.html.haml +28 -0
- data/app/views/publish_my_data/resources/_resource_data.html.haml +16 -0
- data/app/views/publish_my_data/resources/_sparql_section.html.haml +22 -0
- data/app/views/publish_my_data/resources/index.html.haml +37 -0
- data/app/views/publish_my_data/resources/show.html.haml +36 -0
- data/app/views/publish_my_data/shared/_browser_warning.html.haml +4 -0
- data/app/views/publish_my_data/shared/_deprecation_notice.html.haml +8 -0
- data/app/views/publish_my_data/shared/_footer.html.haml +11 -0
- data/app/views/publish_my_data/shared/_google_analytics.html.haml +11 -0
- data/app/views/publish_my_data/shared/_logo.html.haml +1 -0
- data/app/views/publish_my_data/shared/_meta_title.html.haml +2 -0
- data/app/views/publish_my_data/sparql/_form.html.haml +28 -0
- data/app/views/publish_my_data/sparql/_formats_dropdown.html.haml +11 -0
- data/app/views/publish_my_data/sparql/endpoint.html.haml +125 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_ask.html.haml +7 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_construct.html.haml +7 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_describe.html.haml +1 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_select.html.haml +9 -0
- data/app/views/publish_my_data/themes/index.html.haml +30 -0
- data/app/views/publish_my_data/themes/show.html.haml +43 -0
- data/config/routes.rb +20 -5
- data/lib/publish_my_data/version.rb +1 -1
- data/lib/publish_my_data.rb +7 -12
- data/spec/controllers/publish_my_data/datasets_controller_spec.rb +0 -75
- data/spec/controllers/publish_my_data/information_resources_controller_spec.rb +2 -11
- data/spec/dummy/config/environments/development.rb +0 -4
- data/spec/dummy/config/environments/test.rb +0 -4
- data/spec/dummy/log/test.log +62962 -0
- data/spec/dummy/tmp/cache/sass/e509ccd4d793d2c162d70125e9f3656b6c28f357/(__TEMPLATE__)c +0 -0
- data/spec/features/running_a_sparql_query_spec.rb +1 -1
- data/spec/features/uri_dereferencing_spec.rb +1 -1
- metadata +200 -58
- data/app/controllers/concerns/publish_my_data/data_download.rb +0 -22
- data/app/controllers/publish_my_data/vocabularies_controller.rb +0 -18
- data/app/views/layouts/publish_my_data/application.html.erb +0 -13
- data/app/views/layouts/publish_my_data/error.html.erb +0 -13
- data/app/views/publish_my_data/classes/show.html.erb +0 -3
- data/app/views/publish_my_data/concept_schemes/_concepts.html.erb +0 -18
- data/app/views/publish_my_data/concept_schemes/show.html.erb +0 -11
- data/app/views/publish_my_data/concepts/show.html.erb +0 -3
- data/app/views/publish_my_data/datasets/index.html.erb +0 -20
- data/app/views/publish_my_data/datasets/show.html.erb +0 -18
- data/app/views/publish_my_data/errors/not_found.html.erb +0 -1
- data/app/views/publish_my_data/errors/response_too_large.html.erb +0 -1
- data/app/views/publish_my_data/errors/timeout.html.erb +0 -1
- data/app/views/publish_my_data/errors/uncaught.html.erb +0 -6
- data/app/views/publish_my_data/ontologies/show.html.erb +0 -17
- data/app/views/publish_my_data/properties/show.html.erb +0 -3
- data/app/views/publish_my_data/resources/_predicates_table.html.erb +0 -30
- data/app/views/publish_my_data/resources/_predicates_table_head.html.erb +0 -6
- data/app/views/publish_my_data/resources/_resource_formats.html.erb +0 -4
- data/app/views/publish_my_data/resources/_summaries.html.erb +0 -18
- data/app/views/publish_my_data/resources/_uri_and_label.html.erb +0 -3
- data/app/views/publish_my_data/resources/index.html.erb +0 -40
- data/app/views/publish_my_data/resources/show.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_ask_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_construct_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_describe_formats.html.erb +0 -1
- data/app/views/publish_my_data/sparql/_error_message.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_form.html.erb +0 -4
- data/app/views/publish_my_data/sparql/_formats.html.erb +0 -6
- data/app/views/publish_my_data/sparql/_pagination.html.erb +0 -6
- data/app/views/publish_my_data/sparql/_results.html.erb +0 -5
- data/app/views/publish_my_data/sparql/_results_data.html.erb +0 -4
- data/app/views/publish_my_data/sparql/_select_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/endpoint.html.erb +0 -10
- data/app/views/publish_my_data/themes/index.html.erb +0 -13
- data/app/views/publish_my_data/themes/show.html.erb +0 -15
- data/config/initializers/20_s3_setup.rb +0 -4
- data/spec/controllers/publish_my_data/vocabularies_controller_spec.rb +0 -14
- data/spec/support/data_download.rb +0 -60
@@ -0,0 +1,67 @@
|
|
1
|
+
//
|
2
|
+
// Alerts
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base styles
|
7
|
+
// -------------------------
|
8
|
+
|
9
|
+
.alert {
|
10
|
+
padding: $alert-padding;
|
11
|
+
margin-bottom: $line-height-computed;
|
12
|
+
border: 1px solid transparent;
|
13
|
+
border-radius: $alert-border-radius;
|
14
|
+
|
15
|
+
// Headings for larger alerts
|
16
|
+
h4 {
|
17
|
+
margin-top: 0;
|
18
|
+
// Specified for the h4 to prevent conflicts of changing $headingsColor
|
19
|
+
color: inherit;
|
20
|
+
}
|
21
|
+
// Provide class for links that match alerts
|
22
|
+
.alert-link {
|
23
|
+
font-weight: $alert-link-font-weight;
|
24
|
+
}
|
25
|
+
|
26
|
+
// Improve alignment and spacing of inner content
|
27
|
+
> p,
|
28
|
+
> ul {
|
29
|
+
margin-bottom: 0;
|
30
|
+
}
|
31
|
+
> p + p {
|
32
|
+
margin-top: 5px;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// Dismissable alerts
|
37
|
+
//
|
38
|
+
// Expand the right padding and account for the close button's positioning.
|
39
|
+
|
40
|
+
.alert-dismissable {
|
41
|
+
padding-right: ($alert-padding + 20);
|
42
|
+
|
43
|
+
// Adjust close link position
|
44
|
+
.close {
|
45
|
+
position: relative;
|
46
|
+
top: -2px;
|
47
|
+
right: -21px;
|
48
|
+
color: inherit;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
// Alternate styles
|
53
|
+
//
|
54
|
+
// Generate contextual modifier classes for colorizing the alert.
|
55
|
+
|
56
|
+
.alert-success {
|
57
|
+
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
58
|
+
}
|
59
|
+
.alert-info {
|
60
|
+
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
61
|
+
}
|
62
|
+
.alert-warning {
|
63
|
+
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
|
64
|
+
}
|
65
|
+
.alert-danger {
|
66
|
+
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
|
67
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
//
|
2
|
+
// Badges
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base classes
|
7
|
+
.badge {
|
8
|
+
display: inline-block;
|
9
|
+
min-width: 10px;
|
10
|
+
padding: 3px 7px;
|
11
|
+
font-size: $font-size-small;
|
12
|
+
font-weight: $badge-font-weight;
|
13
|
+
color: $badge-color;
|
14
|
+
line-height: $badge-line-height;
|
15
|
+
vertical-align: baseline;
|
16
|
+
white-space: nowrap;
|
17
|
+
text-align: center;
|
18
|
+
background-color: $badge-bg;
|
19
|
+
border-radius: $badge-border-radius;
|
20
|
+
|
21
|
+
// Empty badges collapse automatically (not available in IE8)
|
22
|
+
&:empty {
|
23
|
+
display: none;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
// Hover state, but only for links
|
28
|
+
a.badge {
|
29
|
+
&:hover,
|
30
|
+
&:focus {
|
31
|
+
color: $badge-link-hover-color;
|
32
|
+
text-decoration: none;
|
33
|
+
cursor: pointer;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
// Quick fix for labels/badges in buttons
|
38
|
+
.btn .badge {
|
39
|
+
position: relative;
|
40
|
+
top: -1px;
|
41
|
+
}
|
42
|
+
|
43
|
+
// Account for counters in navs
|
44
|
+
a.list-group-item.active > .badge,
|
45
|
+
.nav-pills > .active > a > .badge {
|
46
|
+
color: $badge-active-color;
|
47
|
+
background-color: $badge-active-bg;
|
48
|
+
}
|
49
|
+
.nav-pills > li > a > .badge {
|
50
|
+
margin-left: 3px;
|
51
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
//
|
2
|
+
// Breadcrumbs
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.breadcrumb {
|
7
|
+
padding: 8px 15px;
|
8
|
+
margin-bottom: $line-height-computed;
|
9
|
+
list-style: none;
|
10
|
+
background-color: $breadcrumb-bg;
|
11
|
+
border-radius: $border-radius-base;
|
12
|
+
> li {
|
13
|
+
display: inline-block;
|
14
|
+
&+li:before {
|
15
|
+
content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
|
16
|
+
padding: 0 5px;
|
17
|
+
color: $breadcrumb-color;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
> .active {
|
21
|
+
color: $breadcrumb-active-color;
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,248 @@
|
|
1
|
+
//
|
2
|
+
// Button groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Button carets
|
6
|
+
//
|
7
|
+
// Match the button text color to the arrow/caret for indicating dropdown-ness.
|
8
|
+
|
9
|
+
.caret {
|
10
|
+
.btn-default & {
|
11
|
+
border-top-color: $btn-default-color;
|
12
|
+
}
|
13
|
+
.btn-primary &,
|
14
|
+
.btn-success &,
|
15
|
+
.btn-warning &,
|
16
|
+
.btn-danger &,
|
17
|
+
.btn-info & {
|
18
|
+
border-top-color: #fff;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
.dropup {
|
22
|
+
& .btn-default .caret {
|
23
|
+
border-bottom-color: $btn-default-color;
|
24
|
+
}
|
25
|
+
.btn-primary,
|
26
|
+
.btn-success,
|
27
|
+
.btn-warning,
|
28
|
+
.btn-danger,
|
29
|
+
.btn-info {
|
30
|
+
.caret {
|
31
|
+
border-bottom-color: #fff;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// Make the div behave like a button
|
37
|
+
.btn-group,
|
38
|
+
.btn-group-vertical {
|
39
|
+
position: relative;
|
40
|
+
display: inline-block;
|
41
|
+
vertical-align: middle; // match .btn alignment given font-size hack above
|
42
|
+
> .btn {
|
43
|
+
position: relative;
|
44
|
+
float: left;
|
45
|
+
// Bring the "active" button to the front
|
46
|
+
&:hover,
|
47
|
+
&:focus,
|
48
|
+
&:active,
|
49
|
+
&.active {
|
50
|
+
z-index: 2;
|
51
|
+
}
|
52
|
+
&:focus {
|
53
|
+
// Remove focus outline when dropdown JS adds it after closing the menu
|
54
|
+
outline: none;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
// Prevent double borders when buttons are next to each other
|
60
|
+
.btn-group {
|
61
|
+
.btn + .btn,
|
62
|
+
.btn + .btn-group,
|
63
|
+
.btn-group + .btn,
|
64
|
+
.btn-group + .btn-group {
|
65
|
+
margin-left: -1px;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
// Optional: Group multiple button groups together for a toolbar
|
70
|
+
.btn-toolbar {
|
71
|
+
@include clearfix();
|
72
|
+
|
73
|
+
.btn-group {
|
74
|
+
float: left;
|
75
|
+
}
|
76
|
+
// Space out series of button groups
|
77
|
+
> .btn,
|
78
|
+
> .btn-group {
|
79
|
+
+ .btn,
|
80
|
+
+ .btn-group {
|
81
|
+
margin-left: 5px;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
87
|
+
border-radius: 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
// 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
|
91
|
+
.btn-group > .btn:first-child {
|
92
|
+
margin-left: 0;
|
93
|
+
&:not(:last-child):not(.dropdown-toggle) {
|
94
|
+
@include border-right-radius(0);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
98
|
+
.btn-group > .btn:last-child:not(:first-child),
|
99
|
+
.btn-group > .dropdown-toggle:not(:first-child) {
|
100
|
+
@include border-left-radius(0);
|
101
|
+
}
|
102
|
+
|
103
|
+
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
|
104
|
+
.btn-group > .btn-group {
|
105
|
+
float: left;
|
106
|
+
}
|
107
|
+
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
108
|
+
border-radius: 0;
|
109
|
+
}
|
110
|
+
.btn-group > .btn-group:first-child {
|
111
|
+
> .btn:last-child,
|
112
|
+
> .dropdown-toggle {
|
113
|
+
@include border-right-radius(0);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
.btn-group > .btn-group:last-child > .btn:first-child {
|
117
|
+
@include border-left-radius(0);
|
118
|
+
}
|
119
|
+
|
120
|
+
// On active and open, don't show outline
|
121
|
+
.btn-group .dropdown-toggle:active,
|
122
|
+
.btn-group.open .dropdown-toggle {
|
123
|
+
outline: 0;
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
// Sizing
|
128
|
+
//
|
129
|
+
// Remix the default button sizing classes into new ones for easier manipulation.
|
130
|
+
|
131
|
+
.btn-group-xs > .btn { @extend .btn-xs; }
|
132
|
+
.btn-group-sm > .btn { @extend .btn-sm; }
|
133
|
+
.btn-group-lg > .btn { @extend .btn-lg; }
|
134
|
+
|
135
|
+
|
136
|
+
// Split button dropdowns
|
137
|
+
// ----------------------
|
138
|
+
|
139
|
+
// Give the line between buttons some depth
|
140
|
+
.btn-group > .btn + .dropdown-toggle {
|
141
|
+
padding-left: 8px;
|
142
|
+
padding-right: 8px;
|
143
|
+
}
|
144
|
+
.btn-group > .btn-lg + .dropdown-toggle {
|
145
|
+
padding-left: 12px;
|
146
|
+
padding-right: 12px;
|
147
|
+
}
|
148
|
+
|
149
|
+
// The clickable button for toggling the menu
|
150
|
+
// Remove the gradient and set the same inset shadow as the :active state
|
151
|
+
.btn-group.open .dropdown-toggle {
|
152
|
+
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
// Reposition the caret
|
157
|
+
.btn .caret {
|
158
|
+
margin-left: 0;
|
159
|
+
}
|
160
|
+
// Carets in other button sizes
|
161
|
+
.btn-lg .caret {
|
162
|
+
border-width: $caret-width-large $caret-width-large 0;
|
163
|
+
border-bottom-width: 0;
|
164
|
+
}
|
165
|
+
// Upside down carets for .dropup
|
166
|
+
.dropup .btn-lg .caret {
|
167
|
+
border-width: 0 $caret-width-large $caret-width-large;
|
168
|
+
}
|
169
|
+
|
170
|
+
|
171
|
+
// Vertical button groups
|
172
|
+
// ----------------------
|
173
|
+
|
174
|
+
.btn-group-vertical {
|
175
|
+
> .btn,
|
176
|
+
> .btn-group {
|
177
|
+
display: block;
|
178
|
+
float: none;
|
179
|
+
width: 100%;
|
180
|
+
max-width: 100%;
|
181
|
+
}
|
182
|
+
|
183
|
+
// Clear floats so dropdown menus can be properly placed
|
184
|
+
> .btn-group {
|
185
|
+
@include clearfix();
|
186
|
+
> .btn {
|
187
|
+
float: none;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
> .btn + .btn,
|
192
|
+
> .btn + .btn-group,
|
193
|
+
> .btn-group + .btn,
|
194
|
+
> .btn-group + .btn-group {
|
195
|
+
margin-top: -1px;
|
196
|
+
margin-left: 0;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
.btn-group-vertical > .btn {
|
201
|
+
&:not(:first-child):not(:last-child) {
|
202
|
+
border-radius: 0;
|
203
|
+
}
|
204
|
+
&:first-child:not(:last-child) {
|
205
|
+
border-top-right-radius: $border-radius-base;
|
206
|
+
@include border-bottom-radius(0);
|
207
|
+
}
|
208
|
+
&:last-child:not(:first-child) {
|
209
|
+
border-bottom-left-radius: $border-radius-base;
|
210
|
+
@include border-top-radius(0);
|
211
|
+
}
|
212
|
+
}
|
213
|
+
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
214
|
+
border-radius: 0;
|
215
|
+
}
|
216
|
+
.btn-group-vertical > .btn-group:first-child {
|
217
|
+
> .btn:last-child,
|
218
|
+
> .dropdown-toggle {
|
219
|
+
@include border-bottom-radius(0);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
|
223
|
+
@include border-top-radius(0);
|
224
|
+
}
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
// Justified button groups
|
229
|
+
// ----------------------
|
230
|
+
|
231
|
+
.btn-group-justified {
|
232
|
+
display: table;
|
233
|
+
width: 100%;
|
234
|
+
table-layout: fixed;
|
235
|
+
border-collapse: separate;
|
236
|
+
.btn {
|
237
|
+
float: none;
|
238
|
+
display: table-cell;
|
239
|
+
width: 1%;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
|
243
|
+
|
244
|
+
// Checkbox and radio options
|
245
|
+
[data-toggle="buttons"] > .btn > input[type="radio"],
|
246
|
+
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
|
247
|
+
display: none;
|
248
|
+
}
|
@@ -0,0 +1,160 @@
|
|
1
|
+
//
|
2
|
+
// Buttons
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base styles
|
7
|
+
// --------------------------------------------------
|
8
|
+
|
9
|
+
// Core styles
|
10
|
+
.btn {
|
11
|
+
display: inline-block;
|
12
|
+
padding: $padding-base-vertical $padding-base-horizontal;
|
13
|
+
margin-bottom: 0; // For input.btn
|
14
|
+
font-size: $font-size-base;
|
15
|
+
font-weight: $btn-font-weight;
|
16
|
+
line-height: $line-height-base;
|
17
|
+
text-align: center;
|
18
|
+
vertical-align: middle;
|
19
|
+
cursor: pointer;
|
20
|
+
border: 1px solid transparent;
|
21
|
+
border-radius: $border-radius-base;
|
22
|
+
white-space: nowrap;
|
23
|
+
@include user-select(none);
|
24
|
+
|
25
|
+
&:focus {
|
26
|
+
@include tab-focus();
|
27
|
+
}
|
28
|
+
|
29
|
+
&:hover,
|
30
|
+
&:focus {
|
31
|
+
color: $btn-default-color;
|
32
|
+
text-decoration: none;
|
33
|
+
}
|
34
|
+
|
35
|
+
&:active,
|
36
|
+
&.active {
|
37
|
+
outline: 0;
|
38
|
+
background-image: none;
|
39
|
+
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
40
|
+
}
|
41
|
+
|
42
|
+
&.disabled,
|
43
|
+
&[disabled],
|
44
|
+
fieldset[disabled] & {
|
45
|
+
cursor: not-allowed;
|
46
|
+
pointer-events: none; // Future-proof disabling of clicks
|
47
|
+
@include opacity(.65);
|
48
|
+
@include box-shadow(none);
|
49
|
+
}
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
// Alternate buttons
|
55
|
+
// --------------------------------------------------
|
56
|
+
|
57
|
+
.btn-default {
|
58
|
+
@include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
|
59
|
+
}
|
60
|
+
.btn-primary {
|
61
|
+
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
62
|
+
}
|
63
|
+
// Warning appears as orange
|
64
|
+
.btn-warning {
|
65
|
+
@include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
66
|
+
}
|
67
|
+
// Danger and error appear as red
|
68
|
+
.btn-danger {
|
69
|
+
@include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
70
|
+
}
|
71
|
+
// Success appears as green
|
72
|
+
.btn-success {
|
73
|
+
@include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
74
|
+
}
|
75
|
+
// Info appears as blue-green
|
76
|
+
.btn-info {
|
77
|
+
@include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
// Link buttons
|
82
|
+
// -------------------------
|
83
|
+
|
84
|
+
// Make a button look and behave like a link
|
85
|
+
.btn-link {
|
86
|
+
color: $link-color;
|
87
|
+
font-weight: normal;
|
88
|
+
cursor: pointer;
|
89
|
+
border-radius: 0;
|
90
|
+
|
91
|
+
&,
|
92
|
+
&:active,
|
93
|
+
&[disabled],
|
94
|
+
fieldset[disabled] & {
|
95
|
+
background-color: transparent;
|
96
|
+
@include box-shadow(none);
|
97
|
+
}
|
98
|
+
&,
|
99
|
+
&:hover,
|
100
|
+
&:focus,
|
101
|
+
&:active {
|
102
|
+
border-color: transparent;
|
103
|
+
}
|
104
|
+
&:hover,
|
105
|
+
&:focus {
|
106
|
+
color: $link-hover-color;
|
107
|
+
text-decoration: underline;
|
108
|
+
background-color: transparent;
|
109
|
+
}
|
110
|
+
&[disabled],
|
111
|
+
fieldset[disabled] & {
|
112
|
+
&:hover,
|
113
|
+
&:focus {
|
114
|
+
color: $btn-link-disabled-color;
|
115
|
+
text-decoration: none;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
|
121
|
+
// Button Sizes
|
122
|
+
// --------------------------------------------------
|
123
|
+
|
124
|
+
.btn-lg {
|
125
|
+
// line-height: ensure even-numbered height of button next to large input
|
126
|
+
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
|
127
|
+
}
|
128
|
+
.btn-sm,
|
129
|
+
.btn-xs {
|
130
|
+
// line-height: ensure proper height of button next to small input
|
131
|
+
@include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
132
|
+
}
|
133
|
+
.btn-xs {
|
134
|
+
padding: 1px 5px;
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
// Block button
|
139
|
+
// --------------------------------------------------
|
140
|
+
|
141
|
+
.btn-block {
|
142
|
+
display: block;
|
143
|
+
width: 100%;
|
144
|
+
padding-left: 0;
|
145
|
+
padding-right: 0;
|
146
|
+
}
|
147
|
+
|
148
|
+
// Vertically space out multiple block buttons
|
149
|
+
.btn-block + .btn-block {
|
150
|
+
margin-top: 5px;
|
151
|
+
}
|
152
|
+
|
153
|
+
// Specificity overrides
|
154
|
+
input[type="submit"],
|
155
|
+
input[type="reset"],
|
156
|
+
input[type="button"] {
|
157
|
+
&.btn-block {
|
158
|
+
width: 100%;
|
159
|
+
}
|
160
|
+
}
|