adhoq 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +80 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/adhoq/application.js +19 -0
- data/app/assets/javascripts/adhoq/bootstrap-sprockets.js +12 -0
- data/app/assets/javascripts/adhoq/bootstrap.js +2107 -0
- data/app/assets/javascripts/adhoq/bootstrap/affix.js +142 -0
- data/app/assets/javascripts/adhoq/bootstrap/alert.js +92 -0
- data/app/assets/javascripts/adhoq/bootstrap/button.js +110 -0
- data/app/assets/javascripts/adhoq/bootstrap/carousel.js +223 -0
- data/app/assets/javascripts/adhoq/bootstrap/collapse.js +170 -0
- data/app/assets/javascripts/adhoq/bootstrap/dropdown.js +151 -0
- data/app/assets/javascripts/adhoq/bootstrap/modal.js +280 -0
- data/app/assets/javascripts/adhoq/bootstrap/popover.js +113 -0
- data/app/assets/javascripts/adhoq/bootstrap/scrollspy.js +170 -0
- data/app/assets/javascripts/adhoq/bootstrap/tab.js +128 -0
- data/app/assets/javascripts/adhoq/bootstrap/tooltip.js +457 -0
- data/app/assets/javascripts/adhoq/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/adhoq/previewer.js.coffee +25 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-compass.scss +7 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-mincer.scss +17 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss +7 -0
- data/app/assets/stylesheets/adhoq/adhoq.css.sass +57 -0
- data/app/assets/stylesheets/adhoq/application.css +16 -0
- data/app/assets/stylesheets/adhoq/bootstrap.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_alerts.scss +68 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_badges.scss +57 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_breadcrumbs.scss +26 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_button-groups.scss +240 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_buttons.scss +157 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_carousel.scss +243 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_close.scss +35 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_code.scss +68 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_component-animations.scss +35 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_dropdowns.scss +215 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_forms.scss +538 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_glyphicons.scss +237 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_grid.scss +84 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_input-groups.scss +166 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_jumbotron.scss +48 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_list-group.scss +131 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_media.scss +56 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_mixins.scss +39 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_modals.scss +150 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_navbar.scss +659 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_navs.scss +242 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_normalize.scss +425 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_pager.scss +55 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_pagination.scss +88 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_panels.scss +243 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_popovers.scss +133 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_print.scss +101 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_progress-bars.scss +105 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_responsive-embed.scss +34 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_responsive-utilities.scss +174 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_scaffolding.scss +150 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_tables.scss +233 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_theme.scss +258 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_thumbnails.scss +38 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_tooltip.scss +95 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_type.scss +304 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_utilities.scss +57 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_variables.scss +850 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/adhoq/bootstrap/bootstrap.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_background-variant.scss +11 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_buttons.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_forms.scss +84 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_image.scss +34 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_list-group.scss +31 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_pagination.scss +23 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_vendor-prefixes.scss +219 -0
- data/app/controllers/adhoq/application_controller.rb +5 -0
- data/app/controllers/adhoq/authorization_methods.rb +36 -0
- data/app/controllers/adhoq/executions_controller.rb +25 -0
- data/app/controllers/adhoq/previews_controller.rb +13 -0
- data/app/controllers/adhoq/queries_controller.rb +38 -0
- data/app/helpers/adhoq/application_helper.rb +11 -0
- data/app/models/adhoq/execution.rb +29 -0
- data/app/models/adhoq/query.rb +14 -0
- data/app/models/adhoq/report.rb +42 -0
- data/app/models/adhoq/time_based_orders.rb +9 -0
- data/app/views/adhoq/application/_global_nav.html.slim +11 -0
- data/app/views/adhoq/application/_sidebar_queries_index.html.slim +10 -0
- data/app/views/adhoq/previews/create.html.slim +12 -0
- data/app/views/adhoq/previews/statement_invalid.html.slim +5 -0
- data/app/views/adhoq/queries/_form.html.slim +38 -0
- data/app/views/adhoq/queries/_query.html.slim +43 -0
- data/app/views/adhoq/queries/edit.html.slim +2 -0
- data/app/views/adhoq/queries/index.html.slim +1 -0
- data/app/views/adhoq/queries/new.html.slim +2 -0
- data/app/views/adhoq/queries/show.html.slim +1 -0
- data/app/views/layouts/adhoq/application.html.slim +18 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20141003095645_create_adhoq_queries.rb +11 -0
- data/db/migrate/20141006014750_create_adhoq_executions.rb +13 -0
- data/db/migrate/20141007052308_create_adhoq_reports.rb +12 -0
- data/lib/adhoq.rb +13 -0
- data/lib/adhoq/configuration.rb +21 -0
- data/lib/adhoq/engine.rb +15 -0
- data/lib/adhoq/error.rb +4 -0
- data/lib/adhoq/executor.rb +27 -0
- data/lib/adhoq/global_variable.rb +34 -0
- data/lib/adhoq/reporter.rb +5 -0
- data/lib/adhoq/reporter/xlsx.rb +32 -0
- data/lib/adhoq/result.rb +18 -0
- data/lib/adhoq/storage.rb +5 -0
- data/lib/adhoq/storage/local_file.rb +45 -0
- data/lib/adhoq/version.rb +3 -0
- data/lib/tasks/adhoq_tasks.rake +4 -0
- data/spec/adhoq/executor_spec.rb +11 -0
- data/spec/adhoq/storage_spec.rb +19 -0
- data/spec/factories/adhoq_queries.rb +29 -0
- data/spec/models/adhoq/execution_spec.rb +4 -0
- data/spec/models/adhoq/query_spec.rb +4 -0
- data/spec/models/adhoq/report_spec.rb +25 -0
- data/spec/spec_helper.rb +36 -0
- data/spec/support/have_values_in_xlsx_sheet_matcher.rb +20 -0
- metadata +375 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
//
|
2
|
+
// Jumbotron
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.jumbotron {
|
7
|
+
padding: $jumbotron-padding;
|
8
|
+
margin-bottom: $jumbotron-padding;
|
9
|
+
color: $jumbotron-color;
|
10
|
+
background-color: $jumbotron-bg;
|
11
|
+
|
12
|
+
h1,
|
13
|
+
.h1 {
|
14
|
+
color: $jumbotron-heading-color;
|
15
|
+
}
|
16
|
+
p {
|
17
|
+
margin-bottom: ($jumbotron-padding / 2);
|
18
|
+
font-size: $jumbotron-font-size;
|
19
|
+
font-weight: 200;
|
20
|
+
}
|
21
|
+
|
22
|
+
> hr {
|
23
|
+
border-top-color: darken($jumbotron-bg, 10%);
|
24
|
+
}
|
25
|
+
|
26
|
+
.container & {
|
27
|
+
border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
|
28
|
+
}
|
29
|
+
|
30
|
+
.container {
|
31
|
+
max-width: 100%;
|
32
|
+
}
|
33
|
+
|
34
|
+
@media screen and (min-width: $screen-sm-min) {
|
35
|
+
padding-top: ($jumbotron-padding * 1.6);
|
36
|
+
padding-bottom: ($jumbotron-padding * 1.6);
|
37
|
+
|
38
|
+
.container & {
|
39
|
+
padding-left: ($jumbotron-padding * 2);
|
40
|
+
padding-right: ($jumbotron-padding * 2);
|
41
|
+
}
|
42
|
+
|
43
|
+
h1,
|
44
|
+
.h1 {
|
45
|
+
font-size: ($font-size-base * 4.5);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
//
|
2
|
+
// Labels
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
.label {
|
6
|
+
display: inline;
|
7
|
+
padding: .2em .6em .3em;
|
8
|
+
font-size: 75%;
|
9
|
+
font-weight: bold;
|
10
|
+
line-height: 1;
|
11
|
+
color: $label-color;
|
12
|
+
text-align: center;
|
13
|
+
white-space: nowrap;
|
14
|
+
vertical-align: baseline;
|
15
|
+
border-radius: .25em;
|
16
|
+
|
17
|
+
// [converter] extracted a& to a.label
|
18
|
+
|
19
|
+
// Empty labels collapse automatically (not available in IE8)
|
20
|
+
&:empty {
|
21
|
+
display: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Quick fix for labels in buttons
|
25
|
+
.btn & {
|
26
|
+
position: relative;
|
27
|
+
top: -1px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
// Add hover effects, but only for links
|
32
|
+
a.label {
|
33
|
+
&:hover,
|
34
|
+
&:focus {
|
35
|
+
color: $label-link-hover-color;
|
36
|
+
text-decoration: none;
|
37
|
+
cursor: pointer;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
// Colors
|
42
|
+
// Contextual variations (linked labels get darker on :hover)
|
43
|
+
|
44
|
+
.label-default {
|
45
|
+
@include label-variant($label-default-bg);
|
46
|
+
}
|
47
|
+
|
48
|
+
.label-primary {
|
49
|
+
@include label-variant($label-primary-bg);
|
50
|
+
}
|
51
|
+
|
52
|
+
.label-success {
|
53
|
+
@include label-variant($label-success-bg);
|
54
|
+
}
|
55
|
+
|
56
|
+
.label-info {
|
57
|
+
@include label-variant($label-info-bg);
|
58
|
+
}
|
59
|
+
|
60
|
+
.label-warning {
|
61
|
+
@include label-variant($label-warning-bg);
|
62
|
+
}
|
63
|
+
|
64
|
+
.label-danger {
|
65
|
+
@include label-variant($label-danger-bg);
|
66
|
+
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
//
|
2
|
+
// List groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base class
|
7
|
+
//
|
8
|
+
// Easily usable on <ul>, <ol>, or <div>.
|
9
|
+
|
10
|
+
.list-group {
|
11
|
+
// No need to set list-style: none; since .list-group-item is block level
|
12
|
+
margin-bottom: 20px;
|
13
|
+
padding-left: 0; // reset padding because ul and ol
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
// Individual list items
|
18
|
+
//
|
19
|
+
// Use on `li`s or `div`s within the `.list-group` parent.
|
20
|
+
|
21
|
+
.list-group-item {
|
22
|
+
position: relative;
|
23
|
+
display: block;
|
24
|
+
padding: 10px 15px;
|
25
|
+
// Place the border on the list items and negative margin up for better styling
|
26
|
+
margin-bottom: -1px;
|
27
|
+
background-color: $list-group-bg;
|
28
|
+
border: 1px solid $list-group-border;
|
29
|
+
|
30
|
+
// Round the first and last items
|
31
|
+
&:first-child {
|
32
|
+
@include border-top-radius($list-group-border-radius);
|
33
|
+
}
|
34
|
+
&:last-child {
|
35
|
+
margin-bottom: 0;
|
36
|
+
@include border-bottom-radius($list-group-border-radius);
|
37
|
+
}
|
38
|
+
|
39
|
+
// Align badges within list items
|
40
|
+
> .badge {
|
41
|
+
float: right;
|
42
|
+
}
|
43
|
+
> .badge + .badge {
|
44
|
+
margin-right: 5px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
// Linked list items
|
50
|
+
//
|
51
|
+
// Use anchor elements instead of `li`s or `div`s to create linked list items.
|
52
|
+
// Includes an extra `.active` modifier class for showing selected items.
|
53
|
+
|
54
|
+
a.list-group-item {
|
55
|
+
color: $list-group-link-color;
|
56
|
+
|
57
|
+
.list-group-item-heading {
|
58
|
+
color: $list-group-link-heading-color;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Hover state
|
62
|
+
&:hover,
|
63
|
+
&:focus {
|
64
|
+
text-decoration: none;
|
65
|
+
color: $list-group-link-hover-color;
|
66
|
+
background-color: $list-group-hover-bg;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
.list-group-item {
|
71
|
+
// Disabled state
|
72
|
+
&.disabled,
|
73
|
+
&.disabled:hover,
|
74
|
+
&.disabled:focus {
|
75
|
+
background-color: $list-group-disabled-bg;
|
76
|
+
color: $list-group-disabled-color;
|
77
|
+
|
78
|
+
// Force color to inherit for custom content
|
79
|
+
.list-group-item-heading {
|
80
|
+
color: inherit;
|
81
|
+
}
|
82
|
+
.list-group-item-text {
|
83
|
+
color: $list-group-disabled-text-color;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
// Active class on item itself, not parent
|
88
|
+
&.active,
|
89
|
+
&.active:hover,
|
90
|
+
&.active:focus {
|
91
|
+
z-index: 2; // Place active items above their siblings for proper border styling
|
92
|
+
color: $list-group-active-color;
|
93
|
+
background-color: $list-group-active-bg;
|
94
|
+
border-color: $list-group-active-border;
|
95
|
+
|
96
|
+
// Force color to inherit for custom content
|
97
|
+
.list-group-item-heading,
|
98
|
+
.list-group-item-heading > small,
|
99
|
+
.list-group-item-heading > .small {
|
100
|
+
color: inherit;
|
101
|
+
}
|
102
|
+
.list-group-item-text {
|
103
|
+
color: $list-group-active-text-color;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
// Contextual variants
|
110
|
+
//
|
111
|
+
// Add modifier classes to change text and background color on individual items.
|
112
|
+
// Organizationally, this must come after the `:hover` states.
|
113
|
+
|
114
|
+
@include list-group-item-variant(success, $state-success-bg, $state-success-text);
|
115
|
+
@include list-group-item-variant(info, $state-info-bg, $state-info-text);
|
116
|
+
@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
|
117
|
+
@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
|
118
|
+
|
119
|
+
|
120
|
+
// Custom content options
|
121
|
+
//
|
122
|
+
// Extra classes for creating well-formatted content within `.list-group-item`s.
|
123
|
+
|
124
|
+
.list-group-item-heading {
|
125
|
+
margin-top: 0;
|
126
|
+
margin-bottom: 5px;
|
127
|
+
}
|
128
|
+
.list-group-item-text {
|
129
|
+
margin-bottom: 0;
|
130
|
+
line-height: 1.3;
|
131
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// Media objects
|
2
|
+
// Source: http://stubbornella.org/content/?p=497
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Common styles
|
7
|
+
// -------------------------
|
8
|
+
|
9
|
+
// Clear the floats
|
10
|
+
.media,
|
11
|
+
.media-body {
|
12
|
+
overflow: hidden;
|
13
|
+
zoom: 1;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Proper spacing between instances of .media
|
17
|
+
.media,
|
18
|
+
.media .media {
|
19
|
+
margin-top: 15px;
|
20
|
+
}
|
21
|
+
.media:first-child {
|
22
|
+
margin-top: 0;
|
23
|
+
}
|
24
|
+
|
25
|
+
// For images and videos, set to block
|
26
|
+
.media-object {
|
27
|
+
display: block;
|
28
|
+
}
|
29
|
+
|
30
|
+
// Reset margins on headings for tighter default spacing
|
31
|
+
.media-heading {
|
32
|
+
margin: 0 0 5px;
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
// Media image alignment
|
37
|
+
// -------------------------
|
38
|
+
|
39
|
+
.media {
|
40
|
+
> .pull-left {
|
41
|
+
margin-right: 10px;
|
42
|
+
}
|
43
|
+
> .pull-right {
|
44
|
+
margin-left: 10px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
// Media list variation
|
50
|
+
// -------------------------
|
51
|
+
|
52
|
+
// Undo default ul/ol styles
|
53
|
+
.media-list {
|
54
|
+
padding-left: 0;
|
55
|
+
list-style: none;
|
56
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Mixins
|
2
|
+
// --------------------------------------------------
|
3
|
+
|
4
|
+
// Utilities
|
5
|
+
@import "mixins/hide-text";
|
6
|
+
@import "mixins/opacity";
|
7
|
+
@import "mixins/image";
|
8
|
+
@import "mixins/labels";
|
9
|
+
@import "mixins/reset-filter";
|
10
|
+
@import "mixins/resize";
|
11
|
+
@import "mixins/responsive-visibility";
|
12
|
+
@import "mixins/size";
|
13
|
+
@import "mixins/tab-focus";
|
14
|
+
@import "mixins/text-emphasis";
|
15
|
+
@import "mixins/text-overflow";
|
16
|
+
@import "mixins/vendor-prefixes";
|
17
|
+
|
18
|
+
// Components
|
19
|
+
@import "mixins/alerts";
|
20
|
+
@import "mixins/buttons";
|
21
|
+
@import "mixins/panels";
|
22
|
+
@import "mixins/pagination";
|
23
|
+
@import "mixins/list-group";
|
24
|
+
@import "mixins/nav-divider";
|
25
|
+
@import "mixins/forms";
|
26
|
+
@import "mixins/progress-bar";
|
27
|
+
@import "mixins/table-row";
|
28
|
+
|
29
|
+
// Skins
|
30
|
+
@import "mixins/background-variant";
|
31
|
+
@import "mixins/border-radius";
|
32
|
+
@import "mixins/gradients";
|
33
|
+
|
34
|
+
// Layout
|
35
|
+
@import "mixins/clearfix";
|
36
|
+
@import "mixins/center-block";
|
37
|
+
@import "mixins/nav-vertical-align";
|
38
|
+
@import "mixins/grid-framework";
|
39
|
+
@import "mixins/grid";
|
@@ -0,0 +1,150 @@
|
|
1
|
+
//
|
2
|
+
// Modals
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// .modal-open - body class for killing the scroll
|
6
|
+
// .modal - container to scroll within
|
7
|
+
// .modal-dialog - positioning shell for the actual modal
|
8
|
+
// .modal-content - actual modal w/ bg and corners and shit
|
9
|
+
|
10
|
+
// Kill the scroll on the body
|
11
|
+
.modal-open {
|
12
|
+
overflow: hidden;
|
13
|
+
}
|
14
|
+
|
15
|
+
// Container that the modal scrolls within
|
16
|
+
.modal {
|
17
|
+
display: none;
|
18
|
+
overflow: hidden;
|
19
|
+
position: fixed;
|
20
|
+
top: 0;
|
21
|
+
right: 0;
|
22
|
+
bottom: 0;
|
23
|
+
left: 0;
|
24
|
+
z-index: $zindex-modal;
|
25
|
+
-webkit-overflow-scrolling: touch;
|
26
|
+
|
27
|
+
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
28
|
+
// https://github.com/twbs/bootstrap/pull/10951.
|
29
|
+
outline: 0;
|
30
|
+
|
31
|
+
// When fading in the modal, animate it to slide down
|
32
|
+
&.fade .modal-dialog {
|
33
|
+
@include translate3d(0, -25%, 0);
|
34
|
+
@include transition-transform(0.3s ease-out);
|
35
|
+
}
|
36
|
+
&.in .modal-dialog { @include translate3d(0, 0, 0) }
|
37
|
+
}
|
38
|
+
.modal-open .modal {
|
39
|
+
overflow-x: hidden;
|
40
|
+
overflow-y: auto;
|
41
|
+
}
|
42
|
+
|
43
|
+
// Shell div to position the modal with bottom padding
|
44
|
+
.modal-dialog {
|
45
|
+
position: relative;
|
46
|
+
width: auto;
|
47
|
+
margin: 10px;
|
48
|
+
}
|
49
|
+
|
50
|
+
// Actual modal
|
51
|
+
.modal-content {
|
52
|
+
position: relative;
|
53
|
+
background-color: $modal-content-bg;
|
54
|
+
border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
|
55
|
+
border: 1px solid $modal-content-border-color;
|
56
|
+
border-radius: $border-radius-large;
|
57
|
+
@include box-shadow(0 3px 9px rgba(0,0,0,.5));
|
58
|
+
background-clip: padding-box;
|
59
|
+
// Remove focus outline from opened modal
|
60
|
+
outline: 0;
|
61
|
+
}
|
62
|
+
|
63
|
+
// Modal background
|
64
|
+
.modal-backdrop {
|
65
|
+
position: fixed;
|
66
|
+
top: 0;
|
67
|
+
right: 0;
|
68
|
+
bottom: 0;
|
69
|
+
left: 0;
|
70
|
+
z-index: $zindex-modal-background;
|
71
|
+
background-color: $modal-backdrop-bg;
|
72
|
+
// Fade for backdrop
|
73
|
+
&.fade { @include opacity(0); }
|
74
|
+
&.in { @include opacity($modal-backdrop-opacity); }
|
75
|
+
}
|
76
|
+
|
77
|
+
// Modal header
|
78
|
+
// Top section of the modal w/ title and dismiss
|
79
|
+
.modal-header {
|
80
|
+
padding: $modal-title-padding;
|
81
|
+
border-bottom: 1px solid $modal-header-border-color;
|
82
|
+
min-height: ($modal-title-padding + $modal-title-line-height);
|
83
|
+
}
|
84
|
+
// Close icon
|
85
|
+
.modal-header .close {
|
86
|
+
margin-top: -2px;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Title text within header
|
90
|
+
.modal-title {
|
91
|
+
margin: 0;
|
92
|
+
line-height: $modal-title-line-height;
|
93
|
+
}
|
94
|
+
|
95
|
+
// Modal body
|
96
|
+
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
97
|
+
.modal-body {
|
98
|
+
position: relative;
|
99
|
+
padding: $modal-inner-padding;
|
100
|
+
}
|
101
|
+
|
102
|
+
// Footer (for actions)
|
103
|
+
.modal-footer {
|
104
|
+
padding: $modal-inner-padding;
|
105
|
+
text-align: right; // right align buttons
|
106
|
+
border-top: 1px solid $modal-footer-border-color;
|
107
|
+
@include clearfix(); // clear it in case folks use .pull-* classes on buttons
|
108
|
+
|
109
|
+
// Properly space out buttons
|
110
|
+
.btn + .btn {
|
111
|
+
margin-left: 5px;
|
112
|
+
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
113
|
+
}
|
114
|
+
// but override that for button groups
|
115
|
+
.btn-group .btn + .btn {
|
116
|
+
margin-left: -1px;
|
117
|
+
}
|
118
|
+
// and override it for block buttons as well
|
119
|
+
.btn-block + .btn-block {
|
120
|
+
margin-left: 0;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
// Measure scrollbar width for padding body during modal show/hide
|
125
|
+
.modal-scrollbar-measure {
|
126
|
+
position: absolute;
|
127
|
+
top: -9999px;
|
128
|
+
width: 50px;
|
129
|
+
height: 50px;
|
130
|
+
overflow: scroll;
|
131
|
+
}
|
132
|
+
|
133
|
+
// Scale up the modal
|
134
|
+
@media (min-width: $screen-sm-min) {
|
135
|
+
// Automatically set modal's width for larger viewports
|
136
|
+
.modal-dialog {
|
137
|
+
width: $modal-md;
|
138
|
+
margin: 30px auto;
|
139
|
+
}
|
140
|
+
.modal-content {
|
141
|
+
@include box-shadow(0 5px 15px rgba(0,0,0,.5));
|
142
|
+
}
|
143
|
+
|
144
|
+
// Modal sizes
|
145
|
+
.modal-sm { width: $modal-sm; }
|
146
|
+
}
|
147
|
+
|
148
|
+
@media (min-width: $screen-md-min) {
|
149
|
+
.modal-lg { width: $modal-lg; }
|
150
|
+
}
|