openshift-origin-console 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYRIGHT +1 -0
- data/Gemfile +21 -0
- data/LICENSE +203 -0
- data/README.md +123 -0
- data/Rakefile +44 -0
- data/app/assets/images/cartridge-edge.gif +0 -0
- data/app/assets/images/console/arrow-down.png +0 -0
- data/app/assets/images/console/console-sprite.png +0 -0
- data/app/assets/images/favicon-32.png +0 -0
- data/app/assets/images/loader-dark.gif +0 -0
- data/app/assets/images/loader.gif +0 -0
- data/app/assets/images/sprite-vert.png +0 -0
- data/app/assets/javascripts/console.js +10 -0
- data/app/assets/javascripts/console/form.js.coffee +51 -0
- data/app/assets/stylesheets/_alerts.scss +84 -0
- data/app/assets/stylesheets/_breadcrumbs.scss +31 -0
- data/app/assets/stylesheets/_buttons.scss +229 -0
- data/app/assets/stylesheets/_code.scss +86 -0
- data/app/assets/stylesheets/_custom.scss +207 -0
- data/app/assets/stylesheets/_footer.scss +54 -0
- data/app/assets/stylesheets/_forms.scss +710 -0
- data/app/assets/stylesheets/_grid.scss +28 -0
- data/app/assets/stylesheets/_input-prepend-append.scss +138 -0
- data/app/assets/stylesheets/_labels.scss +40 -0
- data/app/assets/stylesheets/_mixins.scss +76 -0
- data/app/assets/stylesheets/_override-variables.scss +1 -0
- data/app/assets/stylesheets/_responsive.scss +438 -0
- data/app/assets/stylesheets/_ribbon.scss +57 -0
- data/app/assets/stylesheets/_type.scss +306 -0
- data/app/assets/stylesheets/_utilities.scss +10 -0
- data/app/assets/stylesheets/_variables.scss +131 -0
- data/app/assets/stylesheets/common.css.scss +82 -0
- data/app/assets/stylesheets/console/_application.scss +194 -0
- data/app/assets/stylesheets/console/_base.scss +26 -0
- data/app/assets/stylesheets/console/_breadcrumbs.scss +32 -0
- data/app/assets/stylesheets/console/_buttons.scss +214 -0
- data/app/assets/stylesheets/console/_core.scss +1002 -0
- data/app/assets/stylesheets/console/_dropdowns.scss +63 -0
- data/app/assets/stylesheets/console/_help.scss +54 -0
- data/app/assets/stylesheets/console/_mixins.scss +11 -0
- data/app/assets/stylesheets/console/_navbar.scss +415 -0
- data/app/assets/stylesheets/console/_ribbon.scss +82 -0
- data/app/assets/stylesheets/console/_tile.scss +122 -0
- data/app/assets/stylesheets/origin.css.scss +37 -0
- data/app/controllers/account/dashboard.rb +13 -0
- data/app/controllers/account_controller.rb +3 -0
- data/app/controllers/application_types_controller.rb +80 -0
- data/app/controllers/applications_controller.rb +183 -0
- data/app/controllers/building_controller.rb +81 -0
- data/app/controllers/capability_aware.rb +18 -0
- data/app/controllers/cartridge_types_controller.rb +53 -0
- data/app/controllers/cartridges_controller.rb +43 -0
- data/app/controllers/console/auth/basic.rb +65 -0
- data/app/controllers/console/auth/none.rb +5 -0
- data/app/controllers/console/auth/remote_user.rb +69 -0
- data/app/controllers/console/rescue.rb +48 -0
- data/app/controllers/console_controller.rb +19 -0
- data/app/controllers/console_index_controller.rb +14 -0
- data/app/controllers/domain_aware.rb +26 -0
- data/app/controllers/domain_session_sweeper.rb +29 -0
- data/app/controllers/domains_controller.rb +30 -0
- data/app/controllers/keys_controller.rb +43 -0
- data/app/controllers/scaling_controller.rb +46 -0
- data/app/controllers/sshkey_aware.rb +23 -0
- data/app/controllers/sshkey_session_sweeper.rb +29 -0
- data/app/controllers/user_session_sweeper.rb +29 -0
- data/app/helpers/console/community_helper.rb +78 -0
- data/app/helpers/console/console_helper.rb +26 -0
- data/app/helpers/console/help_helper.rb +270 -0
- data/app/helpers/console/html5_boilerplate_helper.rb +63 -0
- data/app/helpers/console/layout_helper.rb +277 -0
- data/app/helpers/console/model_helper.rb +106 -0
- data/app/helpers/console/secured_helper.rb +5 -0
- data/app/models/alias.rb +10 -0
- data/app/models/application.rb +148 -0
- data/app/models/application_associations.rb +36 -0
- data/app/models/application_template.rb +90 -0
- data/app/models/application_type.rb +258 -0
- data/app/models/async_aware.rb +60 -0
- data/app/models/capabilities.rb +62 -0
- data/app/models/cartridge.rb +122 -0
- data/app/models/cartridge_type.rb +140 -0
- data/app/models/domain.rb +44 -0
- data/app/models/domain_associations.rb +33 -0
- data/app/models/embedded.rb +11 -0
- data/app/models/gear.rb +13 -0
- data/app/models/gear_group.rb +104 -0
- data/app/models/key.rb +87 -0
- data/app/models/quickstart.rb +135 -0
- data/app/models/rest_api.rb +130 -0
- data/app/models/rest_api/base.rb +781 -0
- data/app/models/rest_api/cacheable.rb +91 -0
- data/app/models/rest_api/environment.rb +13 -0
- data/app/models/rest_api/info.rb +34 -0
- data/app/models/rest_api/log_subscriber.rb +29 -0
- data/app/models/rest_api/railties/controller_runtime.rb +37 -0
- data/app/models/user.rb +27 -0
- data/app/models/user_associations.rb +6 -0
- data/app/views/account/_domain.html.haml +14 -0
- data/app/views/account/_keys.html.haml +20 -0
- data/app/views/account/_user.html.haml +5 -0
- data/app/views/account/show.html.haml +15 -0
- data/app/views/application_templates/_application_template.html.haml +5 -0
- data/app/views/application_types/_application_type.html.haml +19 -0
- data/app/views/application_types/_custom.html.haml +19 -0
- data/app/views/application_types/_persisted.html.haml +26 -0
- data/app/views/application_types/_tile.html.haml +9 -0
- data/app/views/application_types/index.html.haml +87 -0
- data/app/views/application_types/search.html.haml +67 -0
- data/app/views/application_types/show.html.haml +219 -0
- data/app/views/applications/_application.html.haml +34 -0
- data/app/views/applications/_applications_filter.html.haml +8 -0
- data/app/views/applications/_footer.html.haml +0 -0
- data/app/views/applications/_name.html.haml +28 -0
- data/app/views/applications/delete.html.haml +19 -0
- data/app/views/applications/get_started.html.haml +145 -0
- data/app/views/applications/index.html.haml +55 -0
- data/app/views/applications/show.html.haml +193 -0
- data/app/views/building/delete.html.haml +22 -0
- data/app/views/building/new.html.haml +57 -0
- data/app/views/building/show.html.haml +12 -0
- data/app/views/cartridge_types/_cartridge_type.html.haml +61 -0
- data/app/views/cartridge_types/index.html.haml +37 -0
- data/app/views/cartridge_types/show.html.haml +21 -0
- data/app/views/cartridges/next_steps.html.haml +58 -0
- data/app/views/cartridges/show.html.haml +1 -0
- data/app/views/console/error.html.haml +58 -0
- data/app/views/console/help.html.haml +90 -0
- data/app/views/console/not_found.html.haml +69 -0
- data/app/views/console/unauthorized.html.haml +7 -0
- data/app/views/domains/_domain.html.haml +14 -0
- data/app/views/domains/_form.html.haml +13 -0
- data/app/views/domains/edit.html.haml +5 -0
- data/app/views/domains/new.html.haml +6 -0
- data/app/views/keys/_form.html.haml +14 -0
- data/app/views/keys/_simple_form.html.haml +14 -0
- data/app/views/keys/new.html.haml +2 -0
- data/app/views/layouts/_footer.html.haml +38 -0
- data/app/views/layouts/_head.html.haml +35 -0
- data/app/views/layouts/console.html.haml +60 -0
- data/app/views/layouts/console/_header.html.haml +44 -0
- data/app/views/layouts/console/_identity.html.haml +7 -0
- data/app/views/layouts/console/_javascripts.html.haml +5 -0
- data/app/views/layouts/console/_stylesheets.html.haml +6 -0
- data/app/views/scaling/delete.html.haml +17 -0
- data/app/views/scaling/new.html.haml +24 -0
- data/app/views/scaling/show.html.haml +81 -0
- data/app/views/shared/_tracking.html.haml +0 -0
- data/conf/console.conf.example +108 -0
- data/conf/openshift_console.conf +10 -0
- data/config/cartridge_types.yml +54 -0
- data/config/initializers/barista_config.rb +86 -0
- data/config/initializers/cartridge_types.rb +5 -0
- data/config/initializers/console_security.rb +1 -0
- data/config/initializers/date_helper.rb +5 -0
- data/config/initializers/extended_logger.rb +51 -0
- data/config/initializers/formtastic.rb +100 -0
- data/config/initializers/inflections.rb +38 -0
- data/config/initializers/rdiscount.rb +8 -0
- data/config/initializers/rest_api.rb +22 -0
- data/config/initializers/sass.rb +30 -0
- data/config/initializers/session_trace.rb +32 -0
- data/config/initializers/x_frame_options.rb +53 -0
- data/config/locales/en.yml +12 -0
- data/lib/active_resource/associations.rb +107 -0
- data/lib/active_resource/associations/builder/association.rb +35 -0
- data/lib/active_resource/associations/builder/belongs_to.rb +5 -0
- data/lib/active_resource/associations/builder/has_many.rb +5 -0
- data/lib/active_resource/associations/builder/has_one.rb +5 -0
- data/lib/active_resource/persistent_connection.rb +341 -0
- data/lib/active_resource/persistent_http_mock.rb +68 -0
- data/lib/active_resource/reflection.rb +78 -0
- data/lib/console.rb +8 -0
- data/lib/console/config_file.rb +13 -0
- data/lib/console/configuration.rb +163 -0
- data/lib/console/engine.rb +28 -0
- data/lib/console/formtastic/bootstrap_form_builder.rb +369 -0
- data/lib/console/rails/app_redirector.rb +40 -0
- data/lib/console/rails/filter_hash.rb +15 -0
- data/lib/console/rails/routes.rb +51 -0
- data/lib/console/version.rb +5 -0
- data/lib/tasks/assets.rake +79 -0
- data/lib/tasks/stats.rake +18 -0
- data/lib/tasks/test_suites.rake +73 -0
- data/test/coverage_helper.rb +27 -0
- data/test/fixtures/cartridges.json +1 -0
- data/test/fixtures/quickstarts.csv +3 -0
- data/test/functional/account_controller_test.rb +14 -0
- data/test/functional/application_types_controller_test.rb +251 -0
- data/test/functional/applications_controller_sanity_test.rb +26 -0
- data/test/functional/applications_controller_test.rb +365 -0
- data/test/functional/building_controller_test.rb +203 -0
- data/test/functional/cartridge_types_controller_isolation_test.rb +68 -0
- data/test/functional/cartridge_types_controller_test.rb +48 -0
- data/test/functional/cartridges_controller_test.rb +83 -0
- data/test/functional/console_auth_basic_controller_test.rb +82 -0
- data/test/functional/console_auth_remote_user_controller_test.rb +90 -0
- data/test/functional/console_index_controller_test.rb +22 -0
- data/test/functional/domains_controller_test.rb +194 -0
- data/test/functional/keys_controller_test.rb +163 -0
- data/test/functional/quickstarts.json +18 -0
- data/test/functional/scaling_controller_test.rb +153 -0
- data/test/integration/assets_test.rb +34 -0
- data/test/integration/help_link_test.rb +43 -0
- data/test/integration/quickstarts_test.rb +24 -0
- data/test/integration/rescue_from_test.rb +25 -0
- data/test/integration/rest_api/application_test.rb +115 -0
- data/test/integration/rest_api/cartridge_test.rb +44 -0
- data/test/integration/rest_api/cartridge_type_test.rb +143 -0
- data/test/integration/rest_api/domain_test.rb +91 -0
- data/test/integration/rest_api/info_test.rb +9 -0
- data/test/integration/rest_api/key_test.rb +85 -0
- data/test/integration/static_pages_test.rb +44 -0
- data/test/rails_app/Rakefile +7 -0
- data/test/rails_app/app/controllers/application_controller.rb +5 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/config/application.rb +48 -0
- data/test/rails_app/config/boot.rb +10 -0
- data/test/rails_app/config/database.yml +25 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +38 -0
- data/test/rails_app/config/environments/production.rb +70 -0
- data/test/rails_app/config/environments/test.rb +43 -0
- data/test/rails_app/config/initializers/auth.rb +0 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +10 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +4 -0
- data/test/rails_app/script/rails +6 -0
- data/test/support/auth.rb +111 -0
- data/test/support/base.rb +142 -0
- data/test/support/errors.rb +28 -0
- data/test/support/rest_api.rb +189 -0
- data/test/test_helper.rb +14 -0
- data/test/unit/active_model_compliance_test.rb +23 -0
- data/test/unit/async_aware_test.rb +55 -0
- data/test/unit/configuration_test.rb +158 -0
- data/test/unit/filter_hash_test.rb +64 -0
- data/test/unit/helpers/model_helper_test.rb +61 -0
- data/test/unit/overrides_test.rb +9 -0
- data/test/unit/rest_api_test.rb +1590 -0
- data/vendor/assets/javascripts/MIT-LICENSE.txt +20 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +157 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +100 -0
- data/vendor/assets/javascripts/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +61 -0
- data/vendor/assets/javascripts/jquery.spin.js +47 -0
- data/vendor/assets/javascripts/jquery.ui.widget.js +16 -0
- data/vendor/assets/javascripts/jquery_cookie.js +41 -0
- data/vendor/assets/javascripts/jquery_validate_min.js +51 -0
- data/vendor/assets/javascripts/modernizr.min.js +2 -0
- data/vendor/assets/javascripts/plugins.js +16 -0
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +28 -0
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +70 -0
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +22 -0
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +147 -0
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +183 -0
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/bootstrap/_close.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_code.scss +57 -0
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +130 -0
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +522 -0
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +20 -0
- data/vendor/assets/stylesheets/bootstrap/_labels.scss +32 -0
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +602 -0
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +84 -0
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +299 -0
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +353 -0
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +30 -0
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +55 -0
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +126 -0
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +33 -0
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +158 -0
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +150 -0
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_type.scss +218 -0
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +107 -0
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +66 -0
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +334 -0
- metadata +506 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#footer-nav {
|
|
2
|
+
padding: 35px 0;
|
|
3
|
+
|
|
4
|
+
a {
|
|
5
|
+
color: #666;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
#copyright {
|
|
9
|
+
padding: 10px 20px;
|
|
10
|
+
color: #666;
|
|
11
|
+
background-color: black;
|
|
12
|
+
|
|
13
|
+
> .container > div {
|
|
14
|
+
margin-top: 15px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@media (max-width:479px) {
|
|
21
|
+
#copyright {
|
|
22
|
+
text-align:center;
|
|
23
|
+
|
|
24
|
+
> .container > div {
|
|
25
|
+
float: none;
|
|
26
|
+
font-size: 11px;
|
|
27
|
+
margin-top: 15px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#footer-nav {
|
|
32
|
+
nav header h3 {
|
|
33
|
+
display: block;
|
|
34
|
+
text-align: center;
|
|
35
|
+
}
|
|
36
|
+
nav ul {
|
|
37
|
+
display: block;
|
|
38
|
+
text-align: center;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (max-width:767px) {
|
|
44
|
+
footer nav {margin-bottom: 15px !important;}
|
|
45
|
+
footer nav > header { display: inline; }
|
|
46
|
+
footer nav ul { margin-bottom: 5px; }
|
|
47
|
+
footer nav h3,
|
|
48
|
+
footer nav h4,
|
|
49
|
+
footer nav h5 { display: inline; font-size: 14px; }
|
|
50
|
+
footer nav ul { margin: 0; padding: 0; display: inline; }
|
|
51
|
+
footer nav li { margin: 0; padding: 0; display: inline; list-style-image: none; list-style: none; }
|
|
52
|
+
footer nav a { margin-left: 5px; white-space: nowrap}
|
|
53
|
+
footer nav > header a { margin-left: 0; }
|
|
54
|
+
}
|
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Forms partial based on Bootstrap v2.1.0
|
|
3
|
+
// --------------------------------------------------
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// GENERAL STYLES
|
|
7
|
+
// --------------
|
|
8
|
+
|
|
9
|
+
// Make all forms have space below them
|
|
10
|
+
form {
|
|
11
|
+
margin: 0 0 $baseLineHeight;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
fieldset {
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
border: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Groups of fields with labels on top (legends)
|
|
21
|
+
legend {
|
|
22
|
+
display: block;
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin-bottom: $baseLineHeight * 1.5;
|
|
26
|
+
font-size: $baseFontSize * 1.5;
|
|
27
|
+
line-height: $baseLineHeight * 2;
|
|
28
|
+
color: $grayDark;
|
|
29
|
+
border: 0;
|
|
30
|
+
border-bottom: 1px solid $grayLighter;
|
|
31
|
+
|
|
32
|
+
// Small
|
|
33
|
+
small {
|
|
34
|
+
font-size: $baseLineHeight * .75;
|
|
35
|
+
color: $grayLight;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Set font for forms
|
|
40
|
+
label,
|
|
41
|
+
input,
|
|
42
|
+
button,
|
|
43
|
+
select,
|
|
44
|
+
textarea {
|
|
45
|
+
@include font-shorthand(); // Set size, weight, line-height here
|
|
46
|
+
}
|
|
47
|
+
input,
|
|
48
|
+
button,
|
|
49
|
+
select,
|
|
50
|
+
textarea {
|
|
51
|
+
@include font-family-sans-serif(); // And only set font-family here for those that need it (note the missing label element)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Identify controls by their labels
|
|
55
|
+
label {
|
|
56
|
+
display: block;
|
|
57
|
+
margin-bottom: 5px;
|
|
58
|
+
color: $grayDark;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Form controls
|
|
62
|
+
// -------------------------
|
|
63
|
+
|
|
64
|
+
// Shared size and type resets
|
|
65
|
+
select,
|
|
66
|
+
textarea,
|
|
67
|
+
input,
|
|
68
|
+
.uneditable-input {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
//height: $baseLineHeight;
|
|
71
|
+
padding: 4px;
|
|
72
|
+
margin-bottom: 9px;
|
|
73
|
+
font-size: floor($baseFontSize);
|
|
74
|
+
line-height: $baseLineHeight;
|
|
75
|
+
min-height: $baseLineHeight;
|
|
76
|
+
color: $grayDark;
|
|
77
|
+
@include border-radius(3px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Reset appearance properties for textual inputs and textarea
|
|
81
|
+
// Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
|
|
82
|
+
input,
|
|
83
|
+
textarea,
|
|
84
|
+
.uneditable-input {
|
|
85
|
+
width: 206px; // plus 12px padding and 2px border
|
|
86
|
+
}
|
|
87
|
+
// Reset height since textareas have rows
|
|
88
|
+
textarea {
|
|
89
|
+
height: auto;
|
|
90
|
+
}
|
|
91
|
+
// Everything else
|
|
92
|
+
select,
|
|
93
|
+
textarea,
|
|
94
|
+
input,
|
|
95
|
+
.uneditable-input {
|
|
96
|
+
background-color: $inputBackground;
|
|
97
|
+
border: 1px solid $inputBorder;
|
|
98
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
|
99
|
+
$transition: border linear .2s, box-shadow linear .2s;
|
|
100
|
+
@include transition($transition);
|
|
101
|
+
|
|
102
|
+
// Focus state
|
|
103
|
+
&:focus {
|
|
104
|
+
border-color: rgba(82,168,236,.8);
|
|
105
|
+
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
|
|
106
|
+
@include box-shadow($shadow);
|
|
107
|
+
outline: 0;
|
|
108
|
+
outline: thin dotted \9; /* IE6-9 */
|
|
109
|
+
//background: #eee; color: #000;
|
|
110
|
+
//box-shadow: none;
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Position radios and checkboxes better
|
|
116
|
+
input[type="radio"],
|
|
117
|
+
input[type="checkbox"] {
|
|
118
|
+
margin: 4px 0 0;
|
|
119
|
+
*margin-top: 0; /* IE7 */
|
|
120
|
+
margin-top: 1px \9; /* IE8-9 */
|
|
121
|
+
line-height: normal;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Reset width of input images, buttons, radios, checkboxes
|
|
126
|
+
input[type="file"],
|
|
127
|
+
input[type="image"],
|
|
128
|
+
input[type="submit"],
|
|
129
|
+
input[type="reset"],
|
|
130
|
+
input[type="button"],
|
|
131
|
+
input[type="radio"],
|
|
132
|
+
input[type="checkbox"] {
|
|
133
|
+
width: auto; // Override of generic input selector
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Set the height of select and file controls to match text inputs
|
|
137
|
+
select,
|
|
138
|
+
input[type="file"] {
|
|
139
|
+
height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
|
|
140
|
+
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
|
|
141
|
+
line-height: 28px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/*
|
|
145
|
+
// Make select elements obey height by applying a border
|
|
146
|
+
select {
|
|
147
|
+
width: 220px; // default input width + 10px of padding that doesn't get applied
|
|
148
|
+
border: 1px solid #ccc;
|
|
149
|
+
background-color: $inputBackground;
|
|
150
|
+
}
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
// Make multiple select elements height not fixed
|
|
154
|
+
select[multiple],
|
|
155
|
+
select[size] {
|
|
156
|
+
height: auto;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Remove shadow from image inputs
|
|
160
|
+
input[type="image"] {
|
|
161
|
+
@include box-shadow(none);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Hidden inputs
|
|
165
|
+
input[type="hidden"] {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
// Focus for select, file, radio, and checkbox
|
|
171
|
+
select:focus,
|
|
172
|
+
input[type="file"]:focus,
|
|
173
|
+
input[type="radio"]:focus,
|
|
174
|
+
input[type="checkbox"]:focus {
|
|
175
|
+
@include tab-focus();
|
|
176
|
+
@include box-shadow(none); // override for file inputs
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
// Uneditable inputs
|
|
181
|
+
// -------------------------
|
|
182
|
+
|
|
183
|
+
// Make uneditable inputs look inactive
|
|
184
|
+
.uneditable-input,
|
|
185
|
+
.uneditable-textarea {
|
|
186
|
+
color: $grayLight;
|
|
187
|
+
background-color: darken($inputBackground, 1%);
|
|
188
|
+
border-color: $inputBorder;
|
|
189
|
+
//@include box-shadow(#{inset 0 1px 2px rgba(0,0,0,.025)});
|
|
190
|
+
cursor: not-allowed;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// For text that needs to appear as an input but should not be an input
|
|
194
|
+
.uneditable-input {
|
|
195
|
+
overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Make uneditable textareas behave like a textarea
|
|
200
|
+
.uneditable-textarea {
|
|
201
|
+
width: auto;
|
|
202
|
+
height: auto;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Inputs within a label
|
|
206
|
+
label input,
|
|
207
|
+
label textarea,
|
|
208
|
+
label select {
|
|
209
|
+
display: block;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
// Placeholder
|
|
214
|
+
// -------------------------
|
|
215
|
+
|
|
216
|
+
// Placeholder text gets special styles because when browsers invalidate entire lines if it doesn’t understand a selector
|
|
217
|
+
input,
|
|
218
|
+
textarea {
|
|
219
|
+
@include placeholder($grayLight);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
// CHECKBOXES & RADIOS
|
|
224
|
+
// -------------------
|
|
225
|
+
|
|
226
|
+
// Indent the labels to position radios/checkboxes as hanging
|
|
227
|
+
.radio,
|
|
228
|
+
.checkbox {
|
|
229
|
+
min-height: 18px; // clear the floating input if there is no label text
|
|
230
|
+
padding-left: 18px;
|
|
231
|
+
}
|
|
232
|
+
.radio input[type="radio"],
|
|
233
|
+
.checkbox input[type="checkbox"] {
|
|
234
|
+
float: left;
|
|
235
|
+
margin-left: -18px;
|
|
236
|
+
margin-top: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Move the options list down to align with labels
|
|
240
|
+
.controls > .radio:first-child,
|
|
241
|
+
.controls > .checkbox:first-child {
|
|
242
|
+
padding-top: 5px; // has to be padding because margin collaspes
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Radios and checkboxes on same line
|
|
246
|
+
// TODO v3: Convert .inline to .control-inline
|
|
247
|
+
.radio.inline,
|
|
248
|
+
.checkbox.inline {
|
|
249
|
+
display: inline-block;
|
|
250
|
+
padding-top: 5px;
|
|
251
|
+
margin-bottom: 0;
|
|
252
|
+
vertical-align: middle;
|
|
253
|
+
}
|
|
254
|
+
.radio.inline + .radio.inline,
|
|
255
|
+
.checkbox.inline + .checkbox.inline {
|
|
256
|
+
margin-left: 10px; // space out consecutive inline controls
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
// INPUT SIZES
|
|
262
|
+
// -----------
|
|
263
|
+
|
|
264
|
+
// General classes for quick sizes
|
|
265
|
+
.input-mini { width: 60px; }
|
|
266
|
+
.input-small { width: 90px; }
|
|
267
|
+
.input-medium { width: 150px; }
|
|
268
|
+
.input-large { width: 210px; }
|
|
269
|
+
.input-xlarge { width: 270px; }
|
|
270
|
+
.input-xxlarge { width: 530px; }
|
|
271
|
+
|
|
272
|
+
// Grid style input sizes
|
|
273
|
+
input[class*="span"],
|
|
274
|
+
select[class*="span"],
|
|
275
|
+
textarea[class*="span"],
|
|
276
|
+
.uneditable-input[class*="span"],
|
|
277
|
+
// Redeclare since the fluid row class is more specific
|
|
278
|
+
.row-fluid input[class*="span"],
|
|
279
|
+
.row-fluid select[class*="span"],
|
|
280
|
+
.row-fluid textarea[class*="span"],
|
|
281
|
+
.row-fluid .uneditable-input[class*="span"] {
|
|
282
|
+
float: none;
|
|
283
|
+
margin-left: 0;
|
|
284
|
+
}
|
|
285
|
+
// Ensure input-prepend/append never wraps
|
|
286
|
+
.input-append input[class*="span"],
|
|
287
|
+
.input-append .uneditable-input[class*="span"],
|
|
288
|
+
.input-prepend input[class*="span"],
|
|
289
|
+
.input-prepend .uneditable-input[class*="span"],
|
|
290
|
+
.row-fluid input[class*="span"],
|
|
291
|
+
.row-fluid select[class*="span"],
|
|
292
|
+
.row-fluid textarea[class*="span"],
|
|
293
|
+
.row-fluid .uneditable-input[class*="span"],
|
|
294
|
+
.row-fluid .input-prepend [class*="span"],
|
|
295
|
+
.row-fluid .input-append [class*="span"] {
|
|
296
|
+
display: inline-block;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
// GRID SIZING FOR INPUTS
|
|
302
|
+
// ----------------------
|
|
303
|
+
|
|
304
|
+
// Grid sizes
|
|
305
|
+
@include inputGridSystem-generate($gridColumns, $gridColumnWidth, $gridGutterWidth);
|
|
306
|
+
|
|
307
|
+
// Control row for multiple inputs per line
|
|
308
|
+
.controls-row {
|
|
309
|
+
@include clearfix(); // Clear the float from controls
|
|
310
|
+
}
|
|
311
|
+
.controls-row [class*="span"] {
|
|
312
|
+
float: left; // Float to collapse white-space for proper grid alignment
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
// DISABLED STATE
|
|
319
|
+
// --------------
|
|
320
|
+
|
|
321
|
+
// Disabled and read-only inputs
|
|
322
|
+
input[disabled],
|
|
323
|
+
select[disabled],
|
|
324
|
+
textarea[disabled],
|
|
325
|
+
input[readonly],
|
|
326
|
+
select[readonly],
|
|
327
|
+
textarea[readonly] {
|
|
328
|
+
cursor: not-allowed;
|
|
329
|
+
background-color: $inputDisabledBackground;
|
|
330
|
+
}
|
|
331
|
+
// Explicitly reset the colors here
|
|
332
|
+
input[type="radio"][disabled],
|
|
333
|
+
input[type="checkbox"][disabled],
|
|
334
|
+
input[type="radio"][readonly],
|
|
335
|
+
input[type="checkbox"][readonly] {
|
|
336
|
+
background-color: transparent;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
// FORM FIELD FEEDBACK STATES
|
|
343
|
+
// --------------------------
|
|
344
|
+
|
|
345
|
+
// Warning
|
|
346
|
+
.control-group.warning {
|
|
347
|
+
@include formFieldState($warningText, $warningText, $warningBackground);
|
|
348
|
+
}
|
|
349
|
+
// Error
|
|
350
|
+
.control-group.error {
|
|
351
|
+
@include formFieldState($errorText, $errorText, $errorBackground);
|
|
352
|
+
}
|
|
353
|
+
// Success
|
|
354
|
+
.control-group.success {
|
|
355
|
+
@include formFieldState($successText, $successText, $successBackground);
|
|
356
|
+
}
|
|
357
|
+
// Info
|
|
358
|
+
.control-group.info {
|
|
359
|
+
@include formFieldState($infoText, $infoText, $infoBackground);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// HTML5 invalid states
|
|
363
|
+
// Shares styles with the .control-group.error above
|
|
364
|
+
input:focus:required:invalid,
|
|
365
|
+
textarea:focus:required:invalid,
|
|
366
|
+
select:focus:required:invalid {
|
|
367
|
+
//color: $errorBackground;
|
|
368
|
+
//border-color: $errorBackground;
|
|
369
|
+
background-color: #fff;
|
|
370
|
+
background-position: right center;
|
|
371
|
+
&:focus {
|
|
372
|
+
//border-color: darken(#ee5f5b, 10%);
|
|
373
|
+
//@include box-shadow(#{0 0 6px lighten(#ee5f5b, 20%)});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
input:focus:required:valid,
|
|
378
|
+
select:focus:required:valid,
|
|
379
|
+
textarea:focus:required:valid {
|
|
380
|
+
background-color: #fff;
|
|
381
|
+
border: 1px solid $successBackground;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
// FORM ACTIONS
|
|
387
|
+
// ------------
|
|
388
|
+
|
|
389
|
+
.form-actions {
|
|
390
|
+
padding: ($baseLineHeight - 1) 20px $baseLineHeight;
|
|
391
|
+
margin-top: $baseLineHeight;
|
|
392
|
+
margin-bottom: $baseLineHeight;
|
|
393
|
+
background-color: #f5f5f5;
|
|
394
|
+
border-top: 1px solid #ddd;
|
|
395
|
+
@include clearfix(); // Adding clearfix to allow for .pull-right button containers
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// For text that needs to appear as an input but should not be an input
|
|
399
|
+
.uneditable-input {
|
|
400
|
+
display: block;
|
|
401
|
+
background-color: $white;
|
|
402
|
+
border-color: #eee;
|
|
403
|
+
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
|
|
404
|
+
cursor: not-allowed;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
// HELP TEXT
|
|
409
|
+
// ---------
|
|
410
|
+
|
|
411
|
+
.help-block,
|
|
412
|
+
.help-inline {
|
|
413
|
+
color: lighten($textColor, 15%); // lighten the text some for contrast
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.help-block {
|
|
417
|
+
display: block; // account for any element using help-block
|
|
418
|
+
margin-top: 5px;
|
|
419
|
+
margin-bottom: 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.help-inline {
|
|
423
|
+
display: inline-block;
|
|
424
|
+
@include ie7-inline-block();
|
|
425
|
+
vertical-align: middle;
|
|
426
|
+
padding-left: 5px;
|
|
427
|
+
margin-bottom: 9px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
// INPUT GROUPS
|
|
433
|
+
// ------------
|
|
434
|
+
|
|
435
|
+
// Allow us to put symbols and text within the input field for a cleaner look
|
|
436
|
+
.input-append,
|
|
437
|
+
.input-prepend {
|
|
438
|
+
margin-bottom: 5px;
|
|
439
|
+
font-size: 0;
|
|
440
|
+
white-space: nowrap; // Prevent span and input from separating
|
|
441
|
+
|
|
442
|
+
input,
|
|
443
|
+
select,
|
|
444
|
+
.uneditable-input {
|
|
445
|
+
position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
|
|
446
|
+
margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
|
|
447
|
+
*margin-left: 0;
|
|
448
|
+
font-size: $baseFontSize;
|
|
449
|
+
vertical-align: top;
|
|
450
|
+
border-left: 0;
|
|
451
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
|
452
|
+
// Make input on top when focused so blue border and shadow always show
|
|
453
|
+
&:focus {
|
|
454
|
+
z-index: 2;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
.add-on {
|
|
458
|
+
display: inline-block;
|
|
459
|
+
width: auto;
|
|
460
|
+
height: $baseLineHeight;
|
|
461
|
+
min-width: 16px;
|
|
462
|
+
padding: 4px 5px;
|
|
463
|
+
font-size: $baseFontSize;
|
|
464
|
+
font-weight: normal;
|
|
465
|
+
line-height: $baseLineHeight;
|
|
466
|
+
text-align: center;
|
|
467
|
+
//text-shadow: 0 1px 0 $white;
|
|
468
|
+
background-color: $inputDisabledBackground;
|
|
469
|
+
border: 1px solid $inputDisabledBorder;
|
|
470
|
+
color: $grayLight;
|
|
471
|
+
}
|
|
472
|
+
.add-on,
|
|
473
|
+
.btn {
|
|
474
|
+
vertical-align: top;
|
|
475
|
+
@include border-radius(0);
|
|
476
|
+
}
|
|
477
|
+
.active {
|
|
478
|
+
background-color: lighten($green, 30);
|
|
479
|
+
border-color: $green;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
.input-prepend {
|
|
483
|
+
.add-on,
|
|
484
|
+
.btn {
|
|
485
|
+
margin-right: -1px;
|
|
486
|
+
}
|
|
487
|
+
.add-on:first-child,
|
|
488
|
+
.btn:first-child {
|
|
489
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
.input-append {
|
|
493
|
+
input,
|
|
494
|
+
select,
|
|
495
|
+
.uneditable-input {
|
|
496
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
|
497
|
+
}
|
|
498
|
+
.add-on,
|
|
499
|
+
.btn {
|
|
500
|
+
margin-left: -1px;
|
|
501
|
+
}
|
|
502
|
+
.add-on:last-child,
|
|
503
|
+
.btn:last-child {
|
|
504
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
// Remove all border-radius for inputs with both prepend and append
|
|
508
|
+
.input-prepend.input-append {
|
|
509
|
+
input,
|
|
510
|
+
select,
|
|
511
|
+
.uneditable-input {
|
|
512
|
+
@include border-radius(0);
|
|
513
|
+
}
|
|
514
|
+
.add-on:first-child,
|
|
515
|
+
.btn:first-child {
|
|
516
|
+
margin-right: -1px;
|
|
517
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
|
518
|
+
}
|
|
519
|
+
.add-on:last-child,
|
|
520
|
+
.btn:last-child {
|
|
521
|
+
margin-left: -1px;
|
|
522
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
|
523
|
+
}
|
|
524
|
+
.add-on-middle {
|
|
525
|
+
font-size: $baseFontSize;
|
|
526
|
+
display: inline-table;
|
|
527
|
+
width: auto;
|
|
528
|
+
margin: 0 -1px;
|
|
529
|
+
padding: 8px 2px;
|
|
530
|
+
border-top: 1px solid $inputBorder;
|
|
531
|
+
border-bottom: 1px solid $inputBorder;
|
|
532
|
+
background-color: $inputBackground;
|
|
533
|
+
color: $inputDisabledBackground;
|
|
534
|
+
}
|
|
535
|
+
@include clearfix();
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
// SEARCH FORM
|
|
541
|
+
// -----------
|
|
542
|
+
|
|
543
|
+
input.search-query {
|
|
544
|
+
padding-right: 14px;
|
|
545
|
+
padding-right: 4px \9;
|
|
546
|
+
padding-left: 14px;
|
|
547
|
+
padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
|
|
548
|
+
margin-bottom: 0; // Remove the default margin on all inputs
|
|
549
|
+
@include border-radius(15px);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* Allow for input prepend/append in search forms */
|
|
553
|
+
.form-search .input-append .search-query,
|
|
554
|
+
.form-search .input-prepend .search-query {
|
|
555
|
+
@include border-radius(0); // Override due to specificity
|
|
556
|
+
}
|
|
557
|
+
.form-search .input-append .search-query {
|
|
558
|
+
@include border-radius(14px 0 0 14px);
|
|
559
|
+
}
|
|
560
|
+
.form-search .input-append .btn {
|
|
561
|
+
@include border-radius(0 14px 14px 0);
|
|
562
|
+
}
|
|
563
|
+
.form-search .input-prepend .search-query {
|
|
564
|
+
@include border-radius(0 14px 14px 0);
|
|
565
|
+
}
|
|
566
|
+
.form-search .input-prepend .btn {
|
|
567
|
+
@include border-radius(14px 0 0 14px);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
// HORIZONTAL & VERTICAL FORMS
|
|
574
|
+
// ---------------------------
|
|
575
|
+
|
|
576
|
+
// Common properties
|
|
577
|
+
// -----------------
|
|
578
|
+
|
|
579
|
+
.form-search,
|
|
580
|
+
.form-inline,
|
|
581
|
+
.form-horizontal {
|
|
582
|
+
input,
|
|
583
|
+
textarea,
|
|
584
|
+
select,
|
|
585
|
+
.help-inline,
|
|
586
|
+
.uneditable-input,
|
|
587
|
+
.input-prepend,
|
|
588
|
+
.input-append {
|
|
589
|
+
display: inline-block;
|
|
590
|
+
@include ie7-inline-block();
|
|
591
|
+
margin-bottom: 0;
|
|
592
|
+
vertical-align: middle;
|
|
593
|
+
}
|
|
594
|
+
// Re-hide hidden elements due to specifity
|
|
595
|
+
.hide {
|
|
596
|
+
display: none;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
.form-search label,
|
|
600
|
+
.form-inline label,
|
|
601
|
+
.form-search .btn-group,
|
|
602
|
+
.form-inline .btn-group {
|
|
603
|
+
display: inline-block;
|
|
604
|
+
}
|
|
605
|
+
// Remove margin for input-prepend/-append
|
|
606
|
+
.form-search .input-append,
|
|
607
|
+
.form-inline .input-append,
|
|
608
|
+
.form-search .input-prepend,
|
|
609
|
+
.form-inline .input-prepend {
|
|
610
|
+
margin-bottom: 0;
|
|
611
|
+
}
|
|
612
|
+
// Inline checkbox/radio labels (remove padding on left)
|
|
613
|
+
.form-search .radio,
|
|
614
|
+
.form-search .checkbox,
|
|
615
|
+
.form-inline .radio,
|
|
616
|
+
.form-inline .checkbox {
|
|
617
|
+
padding-left: 0;
|
|
618
|
+
margin-bottom: 0;
|
|
619
|
+
vertical-align: middle;
|
|
620
|
+
}
|
|
621
|
+
// Remove float and margin, set to inline-block
|
|
622
|
+
.form-search .radio input[type="radio"],
|
|
623
|
+
.form-search .checkbox input[type="checkbox"],
|
|
624
|
+
.form-inline .radio input[type="radio"],
|
|
625
|
+
.form-inline .checkbox input[type="checkbox"] {
|
|
626
|
+
float: left;
|
|
627
|
+
margin-right: 3px;
|
|
628
|
+
margin-left: 0;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.controls,
|
|
632
|
+
.control-group {
|
|
633
|
+
position: relative; // needed for focus validation message
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// Margin to space out fieldsets
|
|
637
|
+
.control-group {
|
|
638
|
+
margin-bottom: $baseLineHeight / 2;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// Legend collapses margin, so next element is responsible for spacing
|
|
642
|
+
legend + .control-group {
|
|
643
|
+
margin-top: $baseLineHeight;
|
|
644
|
+
-webkit-margin-top-collapse: separate;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// Horizontal-specific styles
|
|
648
|
+
// --------------------------
|
|
649
|
+
|
|
650
|
+
.form-horizontal {
|
|
651
|
+
// Increase spacing between groups
|
|
652
|
+
.control-group {
|
|
653
|
+
margin-bottom: $baseLineHeight / 2;
|
|
654
|
+
@include clearfix();
|
|
655
|
+
}
|
|
656
|
+
// Float the labels left
|
|
657
|
+
.control-label {
|
|
658
|
+
float: left;
|
|
659
|
+
width: $horizontalComponentOffset - 20;
|
|
660
|
+
padding-top: 5px;
|
|
661
|
+
text-align: right;
|
|
662
|
+
}
|
|
663
|
+
// Move over all input controls and content
|
|
664
|
+
.controls {
|
|
665
|
+
// Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
|
|
666
|
+
// don't inherit the margin of the parent, in this case .controls
|
|
667
|
+
*display: inline-block;
|
|
668
|
+
*padding-left: 20px;
|
|
669
|
+
margin-left: $horizontalComponentOffset;
|
|
670
|
+
*margin-left: 0;
|
|
671
|
+
&:first-child {
|
|
672
|
+
*padding-left: $horizontalComponentOffset;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
// Remove bottom margin on block level help text since that's accounted for on .control-group
|
|
676
|
+
.help-block {
|
|
677
|
+
margin-bottom: 0;
|
|
678
|
+
}
|
|
679
|
+
// And apply it only to .help-block instances that follow a form control
|
|
680
|
+
input,
|
|
681
|
+
select,
|
|
682
|
+
textarea {
|
|
683
|
+
+ .help-block {
|
|
684
|
+
margin-top: $baseLineHeight / 2;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
// Move over buttons in .form-actions to align with .controls
|
|
688
|
+
.form-actions {
|
|
689
|
+
padding-left: $horizontalComponentOffset;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// IMPORTANT FIELDS
|
|
694
|
+
// ---------------------------
|
|
695
|
+
|
|
696
|
+
.control-group-important {
|
|
697
|
+
font-size: floor($baseFontSize + 1);
|
|
698
|
+
input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], textarea, select, .uneditable-input, .add-on, .add-on-first, .add-on-last, .add-on-middle {
|
|
699
|
+
font-size: floor($baseFontSize + 1);
|
|
700
|
+
padding: 8px 10px;
|
|
701
|
+
}
|
|
702
|
+
.add-on.middle {
|
|
703
|
+
padding-left: 0;
|
|
704
|
+
padding-right: 0;
|
|
705
|
+
}
|
|
706
|
+
select {
|
|
707
|
+
height: 36px;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|