├── img ├── .gitignore ├── glyphicons-halflings.png └── glyphicons-halflings-white.png ├── js ├── src │ └── global │ │ ├── ORDERING │ │ └── log.js ├── lib │ └── bootstrap │ │ ├── tests │ │ ├── unit │ │ │ ├── bootstrap-transition.js │ │ │ ├── bootstrap-collapse.js │ │ │ ├── bootstrap-scrollspy.js │ │ │ ├── bootstrap-alert.js │ │ │ ├── bootstrap-tab.js │ │ │ ├── bootstrap-button.js │ │ │ ├── bootstrap-dropdown.js │ │ │ ├── bootstrap-tooltip.js │ │ │ ├── bootstrap-modal.js │ │ │ ├── bootstrap-popover.js │ │ │ └── bootstrap-typeahead.js │ │ ├── index.html │ │ └── vendor │ │ │ └── qunit.css │ │ ├── bootstrap-transition.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-popover.js │ │ ├── README.md │ │ ├── bootstrap-tab.js │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-carousel.js │ │ ├── bootstrap-modal.js │ │ ├── bootstrap-typeahead.js │ │ └── bootstrap-tooltip.js └── bin │ ├── global.min.js │ ├── global.js │ └── json2.min.js ├── css ├── lib │ ├── grid.less │ ├── utilities.less │ ├── component-animations.less │ ├── close.less │ ├── wells.less │ ├── hero-unit.less │ ├── layouts.less │ ├── breadcrumbs.less │ ├── pager.less │ ├── accordion.less │ ├── scaffolding.less │ ├── thumbnails.less │ ├── tooltip.less │ ├── labels.less │ ├── pagination.less │ ├── popovers.less │ ├── code.less │ ├── alerts.less │ ├── modals.less │ ├── progress-bars.less │ ├── carousel.less │ ├── reset.less │ ├── variables.less │ ├── dropdowns.less │ ├── tables.less │ ├── button-groups.less │ ├── type.less │ ├── buttons.less │ ├── navbar.less │ ├── navs.less │ ├── responsive.less │ ├── sprites.less │ ├── html5boilerplate.less │ └── forms.less └── src │ └── styles.less ├── index.html ├── README.md └── Rakefile /img/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/src/global/ORDERING: -------------------------------------------------------------------------------- 1 | log.js 2 | -------------------------------------------------------------------------------- /img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emorikawa/boilerstrap/HEAD/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emorikawa/boilerstrap/HEAD/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /css/lib/grid.less: -------------------------------------------------------------------------------- 1 | // GRID SYSTEM 2 | // ----------- 3 | 4 | // Fixed (940px) 5 | #gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth); 6 | 7 | // Fluid (940px) 8 | #fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth); 9 | -------------------------------------------------------------------------------- /css/lib/utilities.less: -------------------------------------------------------------------------------- 1 | // UTILITY CLASSES 2 | // --------------- 3 | 4 | // Quick floats 5 | .pull-right { 6 | float: right; 7 | } 8 | .pull-left { 9 | float: left; 10 | } 11 | 12 | // Toggling content 13 | .hide { 14 | display: none; 15 | } 16 | .show { 17 | display: block; 18 | } 19 | 20 | // Visibility 21 | .invisible { 22 | visibility: hidden; 23 | } 24 | -------------------------------------------------------------------------------- /css/lib/component-animations.less: -------------------------------------------------------------------------------- 1 | // COMPONENT ANIMATIONS 2 | // -------------------- 3 | 4 | .fade { 5 | .transition(opacity .15s linear); 6 | opacity: 0; 7 | &.in { 8 | opacity: 1; 9 | } 10 | } 11 | 12 | .collapse { 13 | .transition(height .35s ease); 14 | position:relative; 15 | overflow:hidden; 16 | height: 0; 17 | &.in { height: auto; } 18 | } 19 | -------------------------------------------------------------------------------- /css/lib/close.less: -------------------------------------------------------------------------------- 1 | // CLOSE ICONS 2 | // ----------- 3 | 4 | .close { 5 | float: right; 6 | font-size: 20px; 7 | font-weight: bold; 8 | line-height: @baseLineHeight; 9 | color: @black; 10 | text-shadow: 0 1px 0 rgba(255,255,255,1); 11 | .opacity(20); 12 | &:hover { 13 | color: @black; 14 | text-decoration: none; 15 | .opacity(40); 16 | cursor: pointer; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /css/lib/wells.less: -------------------------------------------------------------------------------- 1 | // WELLS 2 | // ----- 3 | 4 | .well { 5 | min-height: 20px; 6 | padding: 19px; 7 | margin-bottom: 20px; 8 | background-color: #f5f5f5; 9 | border: 1px solid #eee; 10 | border: 1px solid rgba(0,0,0,.05); 11 | .border-radius(4px); 12 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 13 | blockquote { 14 | border-color: #ddd; 15 | border-color: rgba(0,0,0,.15); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /css/lib/hero-unit.less: -------------------------------------------------------------------------------- 1 | // HERO UNIT 2 | // --------- 3 | 4 | .hero-unit { 5 | padding: 60px; 6 | margin-bottom: 30px; 7 | background-color: #f5f5f5; 8 | .border-radius(6px); 9 | h1 { 10 | margin-bottom: 0; 11 | font-size: 60px; 12 | line-height: 1; 13 | letter-spacing: -1px; 14 | } 15 | p { 16 | font-size: 18px; 17 | font-weight: 200; 18 | line-height: @baseLineHeight * 1.5; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /css/lib/layouts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // Fixed-width and fluid (with sidebar) layouts 4 | // -------------------------------------------- 5 | 6 | 7 | // Container (centered, fixed-width layouts) 8 | .container { 9 | .container-fixed(); 10 | } 11 | 12 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 13 | .container-fluid { 14 | padding-left: @gridGutterWidth; 15 | padding-right: @gridGutterWidth; 16 | .clearfix(); 17 | } -------------------------------------------------------------------------------- /js/lib/bootstrap/tests/unit/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-transition") 4 | 5 | test("should be defined on jquery support object", function () { 6 | ok($.support.transition != undefined, 'transition object is defined') 7 | }) 8 | 9 | test("should provide an end object", function () { 10 | ok($.support.transition ? $.support.transition.end : true, 'end string is defined') 11 | }) 12 | 13 | }) -------------------------------------------------------------------------------- /css/lib/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // BREADCRUMBS 2 | // ----------- 3 | 4 | .breadcrumb { 5 | padding: 7px 14px; 6 | margin: 0 0 @baseLineHeight; 7 | #gradient > .vertical(@white, #f5f5f5); 8 | border: 1px solid #ddd; 9 | .border-radius(3px); 10 | .box-shadow(inset 0 1px 0 @white); 11 | li { 12 | display: inline-block; 13 | text-shadow: 0 1px 0 @white; 14 | } 15 | .divider { 16 | padding: 0 5px; 17 | color: @grayLight; 18 | } 19 | .active a { 20 | color: @grayDark; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /css/lib/pager.less: -------------------------------------------------------------------------------- 1 | // PAGER 2 | // ----- 3 | 4 | .pager { 5 | margin-left: 0; 6 | margin-bottom: @baseLineHeight; 7 | list-style: none; 8 | text-align: center; 9 | .clearfix(); 10 | } 11 | .pager li { 12 | display: inline; 13 | } 14 | .pager a { 15 | display: inline-block; 16 | padding: 5px 14px; 17 | background-color: #fff; 18 | border: 1px solid #ddd; 19 | .border-radius(15px); 20 | } 21 | .pager a:hover { 22 | text-decoration: none; 23 | background-color: #f5f5f5; 24 | } 25 | .pager .next a { 26 | float: right; 27 | } 28 | .pager .previous a { 29 | float: left; 30 | } 31 | -------------------------------------------------------------------------------- /css/lib/accordion.less: -------------------------------------------------------------------------------- 1 | // ACCORDION 2 | // --------- 3 | 4 | 5 | // Parent container 6 | .accordion { 7 | margin-bottom: @baseLineHeight; 8 | } 9 | 10 | // Group == heading + body 11 | .accordion-group { 12 | margin-bottom: 2px; 13 | border: 1px solid #e5e5e5; 14 | .border-radius(4px); 15 | } 16 | .accordion-heading { 17 | border-bottom: 0; 18 | } 19 | .accordion-heading .accordion-toggle { 20 | display: block; 21 | padding: 8px 15px; 22 | } 23 | 24 | // Inner needs the styles because you can't animate properly with any styles on the element 25 | .accordion-inner { 26 | padding: 9px 15px; 27 | border-top: 1px solid #e5e5e5; 28 | } 29 | -------------------------------------------------------------------------------- /css/lib/scaffolding.less: -------------------------------------------------------------------------------- 1 | // Scaffolding 2 | // Basic and global styles for generating a grid system, structural layout, and page templates 3 | // ------------------------------------------------------------------------------------------- 4 | 5 | 6 | // STRUCTURAL LAYOUT 7 | // ----------------- 8 | 9 | body { 10 | margin: 0; 11 | font-family: @baseFontFamily; 12 | font-size: @baseFontSize; 13 | line-height: @baseLineHeight; 14 | color: @textColor; 15 | background-color: @white; 16 | } 17 | 18 | 19 | // LINKS 20 | // ----- 21 | 22 | a { 23 | color: @linkColor; 24 | text-decoration: none; 25 | } 26 | a:hover { 27 | color: @linkColorHover; 28 | text-decoration: underline; 29 | } 30 | -------------------------------------------------------------------------------- /js/bin/global.min.js: -------------------------------------------------------------------------------- 1 | // usage: log('inside coolFunc', this, arguments); 2 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 3 | window.log=function(){log.history=log.history||[],log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);typeof console.log=="object"?log.apply.call(console.log,console,a):console.log.apply(console,a)}},function(a){function b(){}for(var c="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),d;d=c.pop();)a[d]=a[d]||b}(function(){try{return console.log(),window.console}catch(a){return window.console={}}}()); -------------------------------------------------------------------------------- /css/lib/thumbnails.less: -------------------------------------------------------------------------------- 1 | // THUMBNAILS 2 | // ---------- 3 | 4 | .thumbnails { 5 | margin-left: -@gridGutterWidth; 6 | list-style: none; 7 | .clearfix(); 8 | } 9 | .thumbnails > li { 10 | float: left; 11 | margin: 0 0 @baseLineHeight @gridGutterWidth; 12 | } 13 | .thumbnail { 14 | display: block; 15 | padding: 4px; 16 | line-height: 1; 17 | border: 1px solid #ddd; 18 | .border-radius(4px); 19 | .box-shadow(0 1px 1px rgba(0,0,0,.075)); 20 | } 21 | // Add a hover state for linked versions only 22 | a.thumbnail:hover { 23 | border-color: @linkColor; 24 | .box-shadow(0 1px 4px rgba(0,105,214,.25)); 25 | } 26 | // Images and captions 27 | .thumbnail > img { 28 | display: block; 29 | max-width: 100%; 30 | margin-left: auto; 31 | margin-right: auto; 32 | } 33 | .thumbnail .caption { 34 | padding: 9px; 35 | } 36 | -------------------------------------------------------------------------------- /js/bin/global.js: -------------------------------------------------------------------------------- 1 | 2 | // usage: log('inside coolFunc', this, arguments); 3 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 4 | window.log = function(){ 5 | log.history = log.history || []; // store logs to an array for reference 6 | log.history.push(arguments); 7 | if(this.console) { 8 | arguments.callee = arguments.callee.caller; 9 | var newarr = [].slice.call(arguments); 10 | (typeof console.log === 'object' ? log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr)); 11 | } 12 | }; 13 | 14 | // make it safe to use console.log always 15 | (function(b){function c(){}for(var d="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try 16 | {console.log();return window.console;}catch(err){return window.console={};}})()); 17 | -------------------------------------------------------------------------------- /css/lib/tooltip.less: -------------------------------------------------------------------------------- 1 | // TOOLTIP 2 | // ------= 3 | 4 | .tooltip { 5 | position: absolute; 6 | z-index: @zindexTooltip; 7 | display: block; 8 | visibility: visible; 9 | padding: 5px; 10 | font-size: 11px; 11 | .opacity(0); 12 | &.in { .opacity(80); } 13 | &.top { margin-top: -2px; } 14 | &.right { margin-left: 2px; } 15 | &.bottom { margin-top: 2px; } 16 | &.left { margin-left: -2px; } 17 | &.top .tooltip-arrow { #popoverArrow > .top(); } 18 | &.left .tooltip-arrow { #popoverArrow > .left(); } 19 | &.bottom .tooltip-arrow { #popoverArrow > .bottom(); } 20 | &.right .tooltip-arrow { #popoverArrow > .right(); } 21 | } 22 | .tooltip-inner { 23 | max-width: 200px; 24 | padding: 3px 8px; 25 | color: @white; 26 | text-align: center; 27 | text-decoration: none; 28 | background-color: @black; 29 | .border-radius(4px); 30 | } 31 | .tooltip-arrow { 32 | position: absolute; 33 | width: 0; 34 | height: 0; 35 | } 36 | -------------------------------------------------------------------------------- /js/src/global/log.js: -------------------------------------------------------------------------------- 1 | 2 | // usage: log('inside coolFunc', this, arguments); 3 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 4 | window.log = function(){ 5 | log.history = log.history || []; // store logs to an array for reference 6 | log.history.push(arguments); 7 | if(this.console) { 8 | arguments.callee = arguments.callee.caller; 9 | var newarr = [].slice.call(arguments); 10 | (typeof console.log === 'object' ? log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr)); 11 | } 12 | }; 13 | 14 | // make it safe to use console.log always 15 | (function(b){function c(){}for(var d="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try 16 | {console.log();return window.console;}catch(err){return window.console={};}})()); 17 | -------------------------------------------------------------------------------- /css/lib/labels.less: -------------------------------------------------------------------------------- 1 | // LABELS 2 | // ------ 3 | 4 | // Base 5 | .label { 6 | padding: 2px 4px 3px; 7 | font-size: @baseFontSize * .85; 8 | font-weight: bold; 9 | color: @white; 10 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 11 | background-color: @grayLight; 12 | .border-radius(3px); 13 | } 14 | 15 | // Hover state 16 | .label:hover { 17 | color: @white; 18 | text-decoration: none; 19 | } 20 | 21 | // Colors 22 | .label-important { background-color: @errorText; } 23 | .label-important:hover { background-color: darken(@errorText, 10%); } 24 | 25 | .label-warning { background-color: @orange; } 26 | .label-warning:hover { background-color: darken(@orange, 10%); } 27 | 28 | .label-success { background-color: @successText; } 29 | .label-success:hover { background-color: darken(@successText, 10%); } 30 | 31 | .label-info { background-color: @infoText; } 32 | .label-info:hover { background-color: darken(@infoText, 10%); } 33 | -------------------------------------------------------------------------------- /js/lib/bootstrap/tests/unit/bootstrap-collapse.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-collapse") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).collapse, 'collapse method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).collapse()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should show a collapsed element", function () { 14 | var el = $('
').collapse('show') 15 | ok(el.hasClass('in'), 'has class in') 16 | ok(/height/.test(el.attr('style')), 'has height set') 17 | }) 18 | 19 | test("should hide a collapsed element", function () { 20 | var el = $('').collapse('hide') 21 | ok(!el.hasClass('in'), 'does not have class in') 22 | ok(/height/.test(el.attr('style')), 'has height set') 23 | }) 24 | 25 | }) -------------------------------------------------------------------------------- /js/lib/bootstrap/tests/unit/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-scrollspy") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).scrollspy, 'scrollspy method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should switch active class on scroll", function () { 14 | var sectionHTML = '' 15 | , $section = $(sectionHTML).append('#qunit-fixture') 16 | , topbarHTML ='' 26 | , $topbar = $(topbarHTML).scrollspy() 27 | 28 | ok($topbar.find('.active', true)) 29 | }) 30 | 31 | }) -------------------------------------------------------------------------------- /css/lib/pagination.less: -------------------------------------------------------------------------------- 1 | // PAGINATION 2 | // ---------- 3 | 4 | .pagination { 5 | height: @baseLineHeight * 2; 6 | margin: @baseLineHeight 0; 7 | } 8 | .pagination ul { 9 | display: inline-block; 10 | .ie7-inline-block(); 11 | margin-left: 0; 12 | margin-bottom: 0; 13 | .border-radius(3px); 14 | .box-shadow(0 1px 2px rgba(0,0,0,.05)); 15 | } 16 | .pagination li { 17 | display: inline; 18 | } 19 | .pagination a { 20 | float: left; 21 | padding: 0 14px; 22 | line-height: (@baseLineHeight * 2) - 2; 23 | text-decoration: none; 24 | border: 1px solid #ddd; 25 | border-left-width: 0; 26 | } 27 | .pagination a:hover, 28 | .pagination .active a { 29 | background-color: #f5f5f5; 30 | } 31 | .pagination .active a { 32 | color: @grayLight; 33 | cursor: default; 34 | } 35 | .pagination .disabled a, 36 | .pagination .disabled a:hover { 37 | color: @grayLight; 38 | background-color: transparent; 39 | cursor: default; 40 | } 41 | .pagination li:first-child a { 42 | border-left-width: 1px; 43 | .border-radius(3px 0 0 3px); 44 | } 45 | .pagination li:last-child a { 46 | .border-radius(0 3px 3px 0); 47 | } 48 | 49 | // Centered 50 | .pagination-centered { 51 | text-align: center; 52 | } 53 | .pagination-right { 54 | text-align: right; 55 | } 56 | -------------------------------------------------------------------------------- /css/lib/popovers.less: -------------------------------------------------------------------------------- 1 | // POPOVERS 2 | // -------- 3 | 4 | .popover { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: @zindexPopover; 9 | display: none; 10 | padding: 5px; 11 | &.top { margin-top: -5px; } 12 | &.right { margin-left: 5px; } 13 | &.bottom { margin-top: 5px; } 14 | &.left { margin-left: -5px; } 15 | &.top .arrow { #popoverArrow > .top(); } 16 | &.right .arrow { #popoverArrow > .right(); } 17 | &.bottom .arrow { #popoverArrow > .bottom(); } 18 | &.left .arrow { #popoverArrow > .left(); } 19 | .arrow { 20 | position: absolute; 21 | width: 0; 22 | height: 0; 23 | } 24 | } 25 | .popover-inner { 26 | padding: 3px; 27 | width: 280px; 28 | overflow: hidden; 29 | background: @black; // has to be full background declaration for IE fallback 30 | background: rgba(0,0,0,.8); 31 | .border-radius(6px); 32 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 33 | } 34 | .popover-title { 35 | padding: 9px 15px; 36 | line-height: 1; 37 | background-color: #f5f5f5; 38 | border-bottom:1px solid #eee; 39 | .border-radius(3px 3px 0 0); 40 | } 41 | .popover-content { 42 | padding: 14px; 43 | background-color: @white; 44 | .border-radius(0 0 3px 3px); 45 | .background-clip(padding-box); 46 | p, ul, ol { 47 | margin-bottom: 0; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /css/lib/code.less: -------------------------------------------------------------------------------- 1 | // Code.less 2 | // Code typography styles for the and elements
3 | // --------------------------------------------------------
4 |
5 | // Inline and block code styles
6 | code,
7 | pre {
8 | padding: 0 3px 2px;
9 | #font > #family > .monospace;
10 | font-size: @baseFontSize - 1;
11 | color: @grayDark;
12 | .border-radius(3px);
13 | }
14 |
15 | // Inline code
16 | code {
17 | padding: 3px 4px;
18 | color: #d14;
19 | background-color: #f7f7f9;
20 | border: 1px solid #e1e1e8;
21 | }
22 |
23 | // Blocks of code
24 | pre {
25 | display: block;
26 | padding: (@baseLineHeight - 1) / 2;
27 | margin: 0 0 @baseLineHeight / 2;
28 | font-size: 12px;
29 | line-height: @baseLineHeight;
30 | background-color: #f5f5f5;
31 | border: 1px solid #ccc; // fallback for IE7-8
32 | border: 1px solid rgba(0,0,0,.15);
33 | .border-radius(4px);
34 | white-space: pre;
35 | white-space: pre-wrap;
36 | word-break: break-all;
37 | word-wrap: break-word;
38 |
39 | // Make prettyprint styles more spaced out for readability
40 | &.prettyprint {
41 | margin-bottom: @baseLineHeight;
42 | }
43 |
44 | // Account for some code outputs that place code tags in pre tags
45 | code {
46 | padding: 0;
47 | color: inherit;
48 | background-color: transparent;
49 | border: 0;
50 | }
51 | }
52 |
53 | // Enable scrollable blocks of code
54 | .pre-scrollable {
55 | max-height: 340px;
56 | overflow-y: scroll;
57 | }
--------------------------------------------------------------------------------
/css/lib/alerts.less:
--------------------------------------------------------------------------------
1 | // ALERT STYLES
2 | // ------------
3 |
4 | // Base alert styles
5 | .alert {
6 | padding: 8px 35px 8px 14px;
7 | margin-bottom: @baseLineHeight;
8 | text-shadow: 0 1px 0 rgba(255,255,255,.5);
9 | background-color: @warningBackground;
10 | border: 1px solid @warningBorder;
11 | .border-radius(4px);
12 | }
13 | .alert,
14 | .alert-heading {
15 | color: @warningText;
16 | }
17 |
18 | // Adjust close link position
19 | .alert .close {
20 | position: relative;
21 | top: -2px;
22 | right: -21px;
23 | line-height: 18px;
24 | }
25 |
26 | // Alternate styles
27 | // ----------------
28 |
29 | .alert-success {
30 | background-color: @successBackground;
31 | border-color: @successBorder;
32 | }
33 | .alert-success,
34 | .alert-success .alert-heading {
35 | color: @successText;
36 | }
37 | .alert-danger,
38 | .alert-error {
39 | background-color: @errorBackground;
40 | border-color: @errorBorder;
41 | }
42 | .alert-danger,
43 | .alert-error,
44 | .alert-danger .alert-heading,
45 | .alert-error .alert-heading {
46 | color: @errorText;
47 | }
48 | .alert-info {
49 | background-color: @infoBackground;
50 | border-color: @infoBorder;
51 | }
52 | .alert-info,
53 | .alert-info .alert-heading {
54 | color: @infoText;
55 | }
56 |
57 |
58 | // Block alerts
59 | // ------------------------
60 | .alert-block {
61 | padding-top: 14px;
62 | padding-bottom: 14px;
63 | }
64 | .alert-block > p,
65 | .alert-block > ul {
66 | margin-bottom: 0;
67 | }
68 | .alert-block p + p {
69 | margin-top: 5px;
70 | }
71 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-alerts")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).alert, 'alert method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).alert()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should fade element out on clicking .close", function () {
14 | var alertHTML = ''
18 | , alert = $(alertHTML).alert()
19 |
20 | alert.find('.close').click()
21 |
22 | ok(!alert.hasClass('in'), 'remove .in class on .close click')
23 | })
24 |
25 | test("should remove element when clicking .close", function () {
26 | $.support.transition = false
27 |
28 | var alertHTML = ''
32 | , alert = $(alertHTML).appendTo('#qunit-fixture').alert()
33 |
34 | ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')
35 |
36 | alert.find('.close').click()
37 |
38 | ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
39 | })
40 |
41 | })
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-tabs")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).tab, 'tabs method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).tab()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should activate element by tab id", function () {
14 | var tabsHTML =
15 | ''
19 |
20 | $('
').appendTo("#qunit-fixture")
21 |
22 | $(tabsHTML).find('li:last a').tab('show')
23 | equals($("#qunit-fixture").find('.active').attr('id'), "profile")
24 |
25 | $(tabsHTML).find('li:first a').tab('show')
26 | equals($("#qunit-fixture").find('.active').attr('id'), "home")
27 | })
28 |
29 | test("should activate element by tab id", function () {
30 | var pillsHTML =
31 | ''
35 |
36 | $('
').appendTo("#qunit-fixture")
37 |
38 | $(pillsHTML).find('li:last a').tab('show')
39 | equals($("#qunit-fixture").find('.active').attr('id'), "profile")
40 |
41 | $(pillsHTML).find('li:first a').tab('show')
42 | equals($("#qunit-fixture").find('.active').attr('id'), "home")
43 | })
44 |
45 | })
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bootstrap Plugin Test Suite
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | Bootstrap Plugin Test Suite
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/css/src/styles.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v2.0.0
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */
10 |
11 | // CSS Reset
12 | @import "../lib/reset.less";
13 |
14 | // Core variables and mixins
15 | @import "../lib/variables.less"; // Modify this for custom colors, font-sizes, etc
16 | @import "../lib/html5boilerplate.less"; // Include HTML5 Boilerplate reset styles
17 | @import "../lib/mixins.less";
18 |
19 | // Grid system and page structure
20 | @import "../lib/scaffolding.less";
21 | @import "../lib/grid.less";
22 | @import "../lib/layouts.less";
23 |
24 | // Base CSS
25 | @import "../lib/type.less";
26 | @import "../lib/code.less";
27 | @import "../lib/forms.less";
28 | @import "../lib/tables.less";
29 |
30 | // Components: common
31 | @import "../lib/sprites.less";
32 | @import "../lib/dropdowns.less";
33 | @import "../lib/wells.less";
34 | @import "../lib/component-animations.less";
35 | @import "../lib/close.less";
36 |
37 | // Components: Buttons & Alerts
38 | @import "../lib/buttons.less";
39 | @import "../lib/button-groups.less";
40 | @import "../lib/alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
41 |
42 | // Components: Nav
43 | @import "../lib/navs.less";
44 | @import "../lib/navbar.less";
45 | @import "../lib/breadcrumbs.less";
46 | @import "../lib/pagination.less";
47 | @import "../lib/pager.less";
48 |
49 | // Components: Popovers
50 | @import "../lib/modals.less";
51 | @import "../lib/tooltip.less";
52 | @import "../lib/popovers.less";
53 |
54 | // Components: Misc
55 | @import "../lib/thumbnails.less";
56 | @import "../lib/labels.less";
57 | @import "../lib/progress-bars.less";
58 | @import "../lib/accordion.less";
59 | @import "../lib/carousel.less";
60 | @import "../lib/hero-unit.less";
61 |
62 | // Utility classes
63 | @import "../lib/utilities.less"; // Has to be last to override when necessary
64 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-transition.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 | !function( $ ) {
21 |
22 | $(function () {
23 |
24 | "use strict"
25 |
26 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
27 | * ======================================================= */
28 |
29 | $.support.transition = (function () {
30 | var thisBody = document.body || document.documentElement
31 | , thisStyle = thisBody.style
32 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
33 |
34 | return support && {
35 | end: (function () {
36 | var transitionEnd = "TransitionEnd"
37 | if ( $.browser.webkit ) {
38 | transitionEnd = "webkitTransitionEnd"
39 | } else if ( $.browser.mozilla ) {
40 | transitionEnd = "transitionend"
41 | } else if ( $.browser.opera ) {
42 | transitionEnd = "oTransitionEnd"
43 | }
44 | return transitionEnd
45 | }())
46 | }
47 | })()
48 |
49 | })
50 |
51 | }( window.jQuery );
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-buttons")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).button, 'button method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).button()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should return set state to loading", function () {
14 | var btn = $('')
15 | equals(btn.html(), 'mdo', 'btn text equals mdo')
16 | btn.button('loading')
17 | equals(btn.html(), 'fat', 'btn text equals fat')
18 | stop()
19 | setTimeout(function () {
20 | ok(btn.attr('disabled'), 'btn is disabled')
21 | ok(btn.hasClass('disabled'), 'btn has disabled class')
22 | start()
23 | }, 0)
24 | })
25 |
26 | test("should return reset state", function () {
27 | var btn = $('')
28 | equals(btn.html(), 'mdo', 'btn text equals mdo')
29 | btn.button('loading')
30 | equals(btn.html(), 'fat', 'btn text equals fat')
31 | stop()
32 | setTimeout(function () {
33 | ok(btn.attr('disabled'), 'btn is disabled')
34 | ok(btn.hasClass('disabled'), 'btn has disabled class')
35 | start()
36 | stop()
37 | }, 0)
38 | btn.button('reset')
39 | equals(btn.html(), 'mdo', 'btn text equals mdo')
40 | setTimeout(function () {
41 | ok(!btn.attr('disabled'), 'btn is not disabled')
42 | ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
43 | start()
44 | }, 0)
45 | })
46 |
47 | test("should toggle active", function () {
48 | var btn = $('')
49 | ok(!btn.hasClass('active'), 'btn does not have active class')
50 | btn.button('toggle')
51 | ok(btn.hasClass('active'), 'btn has class active')
52 | })
53 |
54 | })
--------------------------------------------------------------------------------
/css/lib/modals.less:
--------------------------------------------------------------------------------
1 | // MODALS
2 | // ------
3 |
4 | // Recalculate z-index where appropriate
5 | .modal-open {
6 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
7 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
8 | .popover { z-index: @zindexPopover + @zindexModal; }
9 | .tooltip { z-index: @zindexTooltip + @zindexModal; }
10 | }
11 |
12 | // Background
13 | .modal-backdrop {
14 | position: fixed;
15 | top: 0;
16 | right: 0;
17 | bottom: 0;
18 | left: 0;
19 | z-index: @zindexModalBackdrop;
20 | background-color: @black;
21 | // Fade for backdrop
22 | &.fade { opacity: 0; }
23 | }
24 |
25 | .modal-backdrop,
26 | .modal-backdrop.fade.in {
27 | .opacity(80);
28 | }
29 |
30 | // Base modal
31 | .modal {
32 | position: fixed;
33 | top: 50%;
34 | left: 50%;
35 | z-index: @zindexModal;
36 | max-height: 500px;
37 | overflow: auto;
38 | width: 560px;
39 | margin: -250px 0 0 -280px;
40 | background-color: @white;
41 | border: 1px solid #999;
42 | border: 1px solid rgba(0,0,0,.3);
43 | *border: 1px solid #999; /* IE6-7 */
44 | .border-radius(6px);
45 | .box-shadow(0 3px 7px rgba(0,0,0,0.3));
46 | .background-clip(padding-box);
47 | &.fade {
48 | .transition(e('opacity .3s linear, top .3s ease-out'));
49 | top: -25%;
50 | }
51 | &.fade.in { top: 50%; }
52 | }
53 | .modal-header {
54 | padding: 9px 15px;
55 | border-bottom: 1px solid #eee;
56 | // Close icon
57 | .close { margin-top: 2px; }
58 | }
59 |
60 | // Body (where all modal content resises)
61 | .modal-body {
62 | padding: 15px;
63 | }
64 | // Remove bottom margin if need be
65 | .modal-body .modal-form {
66 | margin-bottom: 0;
67 | }
68 |
69 | // Footer (for actions)
70 | .modal-footer {
71 | padding: 14px 15px 15px;
72 | margin-bottom: 0;
73 | background-color: #f5f5f5;
74 | border-top: 1px solid #ddd;
75 | .border-radius(0 0 6px 6px);
76 | .box-shadow(inset 0 1px 0 @white);
77 | .clearfix();
78 | .btn {
79 | float: right;
80 | margin-left: 5px;
81 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-dropdowns")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).dropdown, 'dropdown method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).dropdown()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should add class open to menu if clicked", function () {
14 | var dropdownHTML = ''
15 | + '- '
16 | + 'Dropdown'
17 | + ''
23 | + '
'
24 | + '
'
25 | , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
26 |
27 | ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
28 | })
29 |
30 | test("should remove open class if body clicked", function () {
31 | var dropdownHTML = ''
32 | + '- '
33 | + 'Dropdown'
34 | + ''
40 | + '
'
41 | + '
'
42 | , dropdown = $(dropdownHTML)
43 | .appendTo('#qunit-fixture')
44 | .find('[data-toggle="dropdown"]')
45 | .dropdown()
46 | .click()
47 | ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
48 | $('body').click()
49 | ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
50 | dropdown.remove()
51 | })
52 |
53 | })
--------------------------------------------------------------------------------
/css/lib/progress-bars.less:
--------------------------------------------------------------------------------
1 | // PROGRESS BARS
2 | // -------------
3 |
4 |
5 | // ANIMATIONS
6 | // ----------
7 |
8 | // Webkit
9 | @-webkit-keyframes progress-bar-stripes {
10 | from { background-position: 0 0; }
11 | to { background-position: 40px 0; }
12 | }
13 |
14 | // Firefox
15 | @-moz-keyframes progress-bar-stripes {
16 | from { background-position: 0 0; }
17 | to { background-position: 40px 0; }
18 | }
19 |
20 | // Spec
21 | @keyframes progress-bar-stripes {
22 | from { background-position: 0 0; }
23 | to { background-position: 40px 0; }
24 | }
25 |
26 |
27 |
28 | // THE BARS
29 | // --------
30 |
31 | // Outer container
32 | .progress {
33 | overflow: hidden;
34 | height: 18px;
35 | margin-bottom: 18px;
36 | #gradient > .vertical(#f5f5f5, #f9f9f9);
37 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
38 | .border-radius(4px);
39 | }
40 |
41 | // Bar of progress
42 | .progress .bar {
43 | width: 0%;
44 | height: 18px;
45 | color: @white;
46 | font-size: 12px;
47 | text-align: center;
48 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
49 | #gradient > .vertical(#149bdf, #0480be);
50 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
51 | .box-sizing(border-box);
52 | .transition(width .6s ease);
53 | }
54 |
55 | // Striped bars
56 | .progress-striped .bar {
57 | #gradient > .striped(#62c462);
58 | .background-size(40px 40px);
59 | }
60 |
61 | // Call animation for the active one
62 | .progress.active .bar {
63 | -webkit-animation: progress-bar-stripes 2s linear infinite;
64 | -moz-animation: progress-bar-stripes 2s linear infinite;
65 | animation: progress-bar-stripes 2s linear infinite;
66 | }
67 |
68 |
69 |
70 | // COLORS
71 | // ------
72 |
73 | // Danger (red)
74 | .progress-danger .bar {
75 | #gradient > .vertical(#ee5f5b, #c43c35);
76 | }
77 | .progress-danger.progress-striped .bar {
78 | #gradient > .striped(#ee5f5b);
79 | }
80 |
81 | // Success (green)
82 | .progress-success .bar {
83 | #gradient > .vertical(#62c462, #57a957);
84 | }
85 | .progress-success.progress-striped .bar {
86 | #gradient > .striped(#62c462);
87 | }
88 |
89 | // Info (teal)
90 | .progress-info .bar {
91 | #gradient > .vertical(#5bc0de, #339bb9);
92 | }
93 | .progress-info.progress-striped .bar {
94 | #gradient > .striped(#5bc0de);
95 | }
96 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Boilerstrap
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
38 |
39 |
40 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/css/lib/carousel.less:
--------------------------------------------------------------------------------
1 | // CAROUSEL
2 | // --------
3 |
4 | .carousel {
5 | position: relative;
6 | margin-bottom: @baseLineHeight;
7 | line-height: 1;
8 | }
9 |
10 | .carousel-inner {
11 | overflow: hidden;
12 | width: 100%;
13 | position: relative;
14 | }
15 |
16 | .carousel {
17 |
18 | .item {
19 | display: none;
20 | position: relative;
21 | .transition(.6s ease-in-out left);
22 | }
23 |
24 | // Account for jankitude on images
25 | .item > img {
26 | display: block;
27 | line-height: 1;
28 | }
29 |
30 | .active,
31 | .next,
32 | .prev { display: block; }
33 |
34 | .active {
35 | left: 0;
36 | }
37 |
38 | .next,
39 | .prev {
40 | position: absolute;
41 | top: 0;
42 | width: 100%;
43 | }
44 |
45 | .next {
46 | left: 100%;
47 | }
48 | .prev {
49 | left: -100%;
50 | }
51 | .next.left,
52 | .prev.right {
53 | left: 0;
54 | }
55 |
56 | .active.left {
57 | left: -100%;
58 | }
59 | .active.right {
60 | left: 100%;
61 | }
62 |
63 | }
64 |
65 | // Left/right controls for nav
66 | // ---------------------------
67 |
68 | .carousel-control {
69 | position: absolute;
70 | top: 40%;
71 | left: 15px;
72 | width: 40px;
73 | height: 40px;
74 | margin-top: -20px;
75 | font-size: 60px;
76 | font-weight: 100;
77 | line-height: 30px;
78 | color: @white;
79 | text-align: center;
80 | background: @grayDarker;
81 | border: 3px solid @white;
82 | .border-radius(23px);
83 | .opacity(50);
84 |
85 | // we can't have this transition here
86 | // because webkit cancels the carousel
87 | // animation if you trip this while
88 | // in the middle of another animation
89 | // ;_;
90 | // .transition(opacity .2s linear);
91 |
92 | // Reposition the right one
93 | &.right {
94 | left: auto;
95 | right: 15px;
96 | }
97 |
98 | // Hover state
99 | &:hover {
100 | color: @white;
101 | text-decoration: none;
102 | .opacity(90);
103 | }
104 | }
105 |
106 | // Caption for text below images
107 | // -----------------------------
108 |
109 | .carousel-caption {
110 | position: absolute;
111 | left: 0;
112 | right: 0;
113 | bottom: 0;
114 | padding: 10px 15px 5px;
115 | background: @grayDark;
116 | background: rgba(0,0,0,.75);
117 | }
118 | .carousel-caption h4,
119 | .carousel-caption p {
120 | color: @white;
121 | }
122 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-tooltip.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-tooltip")
4 |
5 | test("should be defined on jquery object", function () {
6 | var div = $("")
7 | ok(div.tooltip, 'popover method is defined')
8 | })
9 |
10 | test("should return element", function () {
11 | var div = $("")
12 | ok(div.tooltip() == div, 'document.body returned')
13 | })
14 |
15 | test("should expose default settings", function () {
16 | ok(!!$.fn.tooltip.defaults, 'defaults is defined')
17 | })
18 |
19 | test("should remove title attribute", function () {
20 | var tooltip = $('').tooltip()
21 | ok(!tooltip.attr('title'), 'title tag was removed')
22 | })
23 |
24 | test("should add data attribute for referencing original title", function () {
25 | var tooltip = $('').tooltip()
26 | equals(tooltip.attr('data-original-title'), 'Another tooltip', 'original title preserved in data attribute')
27 | })
28 |
29 | test("should place tooltips relative to placement option", function () {
30 | $.support.transition = false
31 | var tooltip = $('')
32 | .appendTo('#qunit-fixture')
33 | .tooltip({placement: 'bottom'})
34 | .tooltip('show')
35 |
36 | ok($(".tooltip").hasClass('fade bottom in'), 'has correct classes applied')
37 | tooltip.tooltip('hide')
38 | })
39 |
40 | test("should always allow html entities", function () {
41 | $.support.transition = false
42 | var tooltip = $('')
43 | .appendTo('#qunit-fixture')
44 | .tooltip('show')
45 |
46 | ok($('.tooltip b').length, 'b tag was inserted')
47 | tooltip.tooltip('hide')
48 | ok(!$(".tooltip").length, 'tooltip removed')
49 | })
50 |
51 | test("should respect custom classes", function () {
52 | var tooltip = $('')
53 | .appendTo('#qunit-fixture')
54 | .tooltip({ template: ''})
55 | .tooltip('show')
56 |
57 | ok($('.tooltip').hasClass('some-class'), 'custom class is present')
58 | tooltip.tooltip('hide')
59 | ok(!$(".tooltip").length, 'tooltip removed')
60 | })
61 |
62 | })
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-alert.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#alerts
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function( $ ){
22 |
23 | "use strict"
24 |
25 | /* ALERT CLASS DEFINITION
26 | * ====================== */
27 |
28 | var dismiss = '[data-dismiss="alert"]'
29 | , Alert = function ( el ) {
30 | $(el).on('click', dismiss, this.close)
31 | }
32 |
33 | Alert.prototype = {
34 |
35 | constructor: Alert
36 |
37 | , close: function ( e ) {
38 | var $this = $(this)
39 | , selector = $this.attr('data-target')
40 | , $parent
41 |
42 | if (!selector) {
43 | selector = $this.attr('href')
44 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
45 | }
46 |
47 | $parent = $(selector)
48 | $parent.trigger('close')
49 |
50 | e && e.preventDefault()
51 |
52 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
53 |
54 | $parent
55 | .trigger('close')
56 | .removeClass('in')
57 |
58 | function removeElement() {
59 | $parent
60 | .trigger('closed')
61 | .remove()
62 | }
63 |
64 | $.support.transition && $parent.hasClass('fade') ?
65 | $parent.on($.support.transition.end, removeElement) :
66 | removeElement()
67 | }
68 |
69 | }
70 |
71 |
72 | /* ALERT PLUGIN DEFINITION
73 | * ======================= */
74 |
75 | $.fn.alert = function ( option ) {
76 | return this.each(function () {
77 | var $this = $(this)
78 | , data = $this.data('alert')
79 | if (!data) $this.data('alert', (data = new Alert(this)))
80 | if (typeof option == 'string') data[option].call($this)
81 | })
82 | }
83 |
84 | $.fn.alert.Constructor = Alert
85 |
86 |
87 | /* ALERT DATA-API
88 | * ============== */
89 |
90 | $(function () {
91 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
92 | })
93 |
94 | }( window.jQuery );
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function( $ ){
22 |
23 | "use strict"
24 |
25 | /* DROPDOWN CLASS DEFINITION
26 | * ========================= */
27 |
28 | var toggle = '[data-toggle="dropdown"]'
29 | , Dropdown = function ( element ) {
30 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
31 | $('html').on('click.dropdown.data-api', function () {
32 | $el.parent().removeClass('open')
33 | })
34 | }
35 |
36 | Dropdown.prototype = {
37 |
38 | constructor: Dropdown
39 |
40 | , toggle: function ( e ) {
41 | var $this = $(this)
42 | , selector = $this.attr('data-target')
43 | , $parent
44 | , isActive
45 |
46 | if (!selector) {
47 | selector = $this.attr('href')
48 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
49 | }
50 |
51 | $parent = $(selector)
52 | $parent.length || ($parent = $this.parent())
53 |
54 | isActive = $parent.hasClass('open')
55 |
56 | clearMenus()
57 | !isActive && $parent.toggleClass('open')
58 |
59 | return false
60 | }
61 |
62 | }
63 |
64 | function clearMenus() {
65 | $(toggle).parent().removeClass('open')
66 | }
67 |
68 |
69 | /* DROPDOWN PLUGIN DEFINITION
70 | * ========================== */
71 |
72 | $.fn.dropdown = function ( option ) {
73 | return this.each(function () {
74 | var $this = $(this)
75 | , data = $this.data('dropdown')
76 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
77 | if (typeof option == 'string') data[option].call($this)
78 | })
79 | }
80 |
81 | $.fn.dropdown.Constructor = Dropdown
82 |
83 |
84 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
85 | * =================================== */
86 |
87 | $(function () {
88 | $('html').on('click.dropdown.data-api', clearMenus)
89 | $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
90 | })
91 |
92 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/reset.less:
--------------------------------------------------------------------------------
1 | // Reset.less
2 | // Adapted from Normalize.css http://github.com/necolas/normalize.css
3 | // ------------------------------------------------------------------------
4 |
5 | // Display in IE6-9 and FF3
6 | // -------------------------
7 |
8 | article,
9 | aside,
10 | details,
11 | figcaption,
12 | figure,
13 | footer,
14 | header,
15 | hgroup,
16 | nav,
17 | section {
18 | display: block;
19 | }
20 |
21 | // Display block in IE6-9 and FF3
22 | // -------------------------
23 |
24 | audio,
25 | canvas,
26 | video {
27 | display: inline-block;
28 | *display: inline;
29 | *zoom: 1;
30 | }
31 |
32 | // Prevents modern browsers from displaying 'audio' without controls
33 | // -------------------------
34 |
35 | audio:not([controls]) {
36 | display: none;
37 | }
38 |
39 | // Base settings
40 | // -------------------------
41 |
42 | html {
43 | font-size: 100%;
44 | -webkit-text-size-adjust: 100%;
45 | -ms-text-size-adjust: 100%;
46 | }
47 | // Focus states
48 | a:focus {
49 | .tab-focus();
50 | }
51 | // Hover & Active
52 | a:hover,
53 | a:active {
54 | outline: 0;
55 | }
56 |
57 | // Prevents sub and sup affecting line-height in all browsers
58 | // -------------------------
59 |
60 | sub,
61 | sup {
62 | position: relative;
63 | font-size: 75%;
64 | line-height: 0;
65 | vertical-align: baseline;
66 | }
67 | sup {
68 | top: -0.5em;
69 | }
70 | sub {
71 | bottom: -0.25em;
72 | }
73 |
74 | // Img border in a's and image quality
75 | // -------------------------
76 |
77 | img {
78 | max-width: 100%;
79 | height: auto;
80 | border: 0;
81 | -ms-interpolation-mode: bicubic;
82 | }
83 |
84 | // Forms
85 | // -------------------------
86 |
87 | // Font size in all browsers, margin changes, misc consistency
88 | button,
89 | input,
90 | select,
91 | textarea {
92 | margin: 0;
93 | font-size: 100%;
94 | vertical-align: middle;
95 | }
96 | button,
97 | input {
98 | *overflow: visible; // Inner spacing ie IE6/7
99 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
100 | }
101 | button::-moz-focus-inner,
102 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
103 | padding: 0;
104 | border: 0;
105 | }
106 | button,
107 | input[type="button"],
108 | input[type="reset"],
109 | input[type="submit"] {
110 | cursor: pointer; // Cursors on all buttons applied consistently
111 | -webkit-appearance: button; // Style clickable inputs in iOS
112 | }
113 | input[type="search"] { // Appearance in Safari/Chrome
114 | -webkit-appearance: textfield;
115 | -webkit-box-sizing: content-box;
116 | -moz-box-sizing: content-box;
117 | box-sizing: content-box;
118 | }
119 | input[type="search"]::-webkit-search-decoration,
120 | input[type="search"]::-webkit-search-cancel-button {
121 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
122 | }
123 | textarea {
124 | overflow: auto; // Remove vertical scrollbar in IE6-9
125 | vertical-align: top; // Readability and alignment cross-browser
126 | }
127 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-button.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#buttons
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 | !function( $ ){
21 |
22 | "use strict"
23 |
24 | /* BUTTON PUBLIC CLASS DEFINITION
25 | * ============================== */
26 |
27 | var Button = function ( element, options ) {
28 | this.$element = $(element)
29 | this.options = $.extend({}, $.fn.button.defaults, options)
30 | }
31 |
32 | Button.prototype = {
33 |
34 | constructor: Button
35 |
36 | , setState: function ( state ) {
37 | var d = 'disabled'
38 | , $el = this.$element
39 | , data = $el.data()
40 | , val = $el.is('input') ? 'val' : 'html'
41 |
42 | state = state + 'Text'
43 | data.resetText || $el.data('resetText', $el[val]())
44 |
45 | $el[val](data[state] || this.options[state])
46 |
47 | // push to event loop to allow forms to submit
48 | setTimeout(function () {
49 | state == 'loadingText' ?
50 | $el.addClass(d).attr(d, d) :
51 | $el.removeClass(d).removeAttr(d)
52 | }, 0)
53 | }
54 |
55 | , toggle: function () {
56 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
57 |
58 | $parent && $parent
59 | .find('.active')
60 | .removeClass('active')
61 |
62 | this.$element.toggleClass('active')
63 | }
64 |
65 | }
66 |
67 |
68 | /* BUTTON PLUGIN DEFINITION
69 | * ======================== */
70 |
71 | $.fn.button = function ( option ) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('button')
75 | , options = typeof option == 'object' && option
76 | if (!data) $this.data('button', (data = new Button(this, options)))
77 | if (option == 'toggle') data.toggle()
78 | else if (option) data.setState(option)
79 | })
80 | }
81 |
82 | $.fn.button.defaults = {
83 | loadingText: 'loading...'
84 | }
85 |
86 | $.fn.button.Constructor = Button
87 |
88 |
89 | /* BUTTON DATA-API
90 | * =============== */
91 |
92 | $(function () {
93 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
94 | $(e.currentTarget).button('toggle')
95 | })
96 | })
97 |
98 | }( window.jQuery );
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-modal.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-modal")
4 |
5 | test("should be defined on jquery object", function () {
6 | var div = $("")
7 | ok(div.modal, 'modal method is defined')
8 | })
9 |
10 | test("should return element", function () {
11 | var div = $("")
12 | ok(div.modal() == div, 'document.body returned')
13 | $('#modal-test').remove()
14 | })
15 |
16 | test("should expose defaults var for settings", function () {
17 | ok($.fn.modal.defaults, 'default object exposed')
18 | })
19 |
20 | test("should insert into dom when show method is called", function () {
21 | stop()
22 | $.support.transition = false
23 | $("")
24 | .bind("shown", function () {
25 | ok($('#modal-test').length, 'modal insterted into dom')
26 | $(this).remove()
27 | start()
28 | })
29 | .modal("show")
30 | })
31 |
32 | test("should hide modal when hide is called", function () {
33 | stop()
34 | $.support.transition = false
35 |
36 | $("")
37 | .bind("shown", function () {
38 | ok($('#modal-test').is(":visible"), 'modal visible')
39 | ok($('#modal-test').length, 'modal insterted into dom')
40 | $(this).modal("hide")
41 | })
42 | .bind("hidden", function() {
43 | ok(!$('#modal-test').is(":visible"), 'modal hidden')
44 | $('#modal-test').remove()
45 | start()
46 | })
47 | .modal("show")
48 | })
49 |
50 | test("should toggle when toggle is called", function () {
51 | stop()
52 | $.support.transition = false
53 | var div = $("")
54 | div
55 | .bind("shown", function () {
56 | ok($('#modal-test').is(":visible"), 'modal visible')
57 | ok($('#modal-test').length, 'modal insterted into dom')
58 | div.modal("toggle")
59 | })
60 | .bind("hidden", function() {
61 | ok(!$('#modal-test').is(":visible"), 'modal hidden')
62 | div.remove()
63 | start()
64 | })
65 | .modal("toggle")
66 | })
67 |
68 | test("should remove from dom when click [data-dismiss=modal]", function () {
69 | stop()
70 | $.support.transition = false
71 | var div = $("")
72 | div
73 | .bind("shown", function () {
74 | ok($('#modal-test').is(":visible"), 'modal visible')
75 | ok($('#modal-test').length, 'modal insterted into dom')
76 | div.find('.close').click()
77 | })
78 | .bind("hidden", function() {
79 | ok(!$('#modal-test').is(":visible"), 'modal hidden')
80 | div.remove()
81 | start()
82 | })
83 | .modal("toggle")
84 | })
85 | })
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-popover.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#popovers
4 | * ===========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * =========================================================== */
19 |
20 |
21 | !function( $ ) {
22 |
23 | "use strict"
24 |
25 | var Popover = function ( element, options ) {
26 | this.init('popover', element, options)
27 | }
28 |
29 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
30 | ========================================== */
31 |
32 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
33 |
34 | constructor: Popover
35 |
36 | , setContent: function () {
37 | var $tip = this.tip()
38 | , title = this.getTitle()
39 | , content = this.getContent()
40 |
41 | $tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
42 | $tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
43 |
44 | $tip.removeClass('fade top bottom left right in')
45 | }
46 |
47 | , hasContent: function () {
48 | return this.getTitle() || this.getContent()
49 | }
50 |
51 | , getContent: function () {
52 | var content
53 | , $e = this.$element
54 | , o = this.options
55 |
56 | content = $e.attr('data-content')
57 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
58 |
59 | content = content.toString().replace(/(^\s*|\s*$)/, "")
60 |
61 | return content
62 | }
63 |
64 | , tip: function() {
65 | if (!this.$tip) {
66 | this.$tip = $(this.options.template)
67 | }
68 | return this.$tip
69 | }
70 |
71 | })
72 |
73 |
74 | /* POPOVER PLUGIN DEFINITION
75 | * ======================= */
76 |
77 | $.fn.popover = function ( option ) {
78 | return this.each(function () {
79 | var $this = $(this)
80 | , data = $this.data('popover')
81 | , options = typeof option == 'object' && option
82 | if (!data) $this.data('popover', (data = new Popover(this, options)))
83 | if (typeof option == 'string') data[option]()
84 | })
85 | }
86 |
87 | $.fn.popover.Constructor = Popover
88 |
89 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
90 | placement: 'right'
91 | , content: ''
92 | , template: ''
93 | })
94 |
95 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/variables.less:
--------------------------------------------------------------------------------
1 | // Variables.less
2 | // Variables to customize the look and feel of Bootstrap
3 | // -----------------------------------------------------
4 |
5 |
6 |
7 | // GLOBAL VALUES
8 | // --------------------------------------------------
9 |
10 | // Links
11 | @linkColor: #08c;
12 | @linkColorHover: darken(@linkColor, 15%);
13 |
14 | // Grays
15 | @black: #000;
16 | @grayDarker: #222;
17 | @grayDark: #333;
18 | @gray: #555;
19 | @grayLight: #999;
20 | @grayLighter: #eee;
21 | @white: #fff;
22 |
23 | // Accent colors
24 | @blue: #049cdb;
25 | @blueDark: #0064cd;
26 | @green: #46a546;
27 | @red: #9d261d;
28 | @yellow: #ffc40d;
29 | @orange: #f89406;
30 | @pink: #c3325f;
31 | @purple: #7a43b6;
32 |
33 | // Typography
34 | @baseFontSize: 13px;
35 | @baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
36 | @baseLineHeight: 18px;
37 | @textColor: @grayDark;
38 |
39 | // Buttons
40 | @primaryButtonBackground: @linkColor;
41 |
42 |
43 |
44 | // COMPONENT VARIABLES
45 | // --------------------------------------------------
46 |
47 | // Z-index master list
48 | // Used for a bird's eye view of components dependent on the z-axis
49 | // Try to avoid customizing these :)
50 | @zindexDropdown: 1000;
51 | @zindexPopover: 1010;
52 | @zindexTooltip: 1020;
53 | @zindexFixedNavbar: 1030;
54 | @zindexModalBackdrop: 1040;
55 | @zindexModal: 1050;
56 |
57 | // Sprite icons path
58 | @iconSpritePath: "../../img/glyphicons-halflings.png";
59 | @iconWhiteSpritePath: "../../img/glyphicons-halflings-white.png";
60 |
61 | // Input placeholder text color
62 | @placeholderText: @grayLight;
63 |
64 | // Hr border color
65 | @hrBorder: @grayLighter;
66 |
67 | // Navbar
68 | @navbarHeight: 40px;
69 | @navbarBackground: @grayDarker;
70 | @navbarBackgroundHighlight: @grayDark;
71 | @navbarLinkBackgroundHover: transparent;
72 |
73 | @navbarText: @grayLight;
74 | @navbarLinkColor: @grayLight;
75 | @navbarLinkColorHover: @white;
76 |
77 | // Form states and alerts
78 | @warningText: #c09853;
79 | @warningBackground: #fcf8e3;
80 | @warningBorder: darken(spin(@warningBackground, -10), 3%);
81 |
82 | @errorText: #b94a48;
83 | @errorBackground: #f2dede;
84 | @errorBorder: darken(spin(@errorBackground, -10), 3%);
85 |
86 | @successText: #468847;
87 | @successBackground: #dff0d8;
88 | @successBorder: darken(spin(@successBackground, -10), 5%);
89 |
90 | @infoText: #3a87ad;
91 | @infoBackground: #d9edf7;
92 | @infoBorder: darken(spin(@infoBackground, -10), 7%);
93 |
94 |
95 |
96 | // GRID
97 | // --------------------------------------------------
98 |
99 | // Default 940px grid
100 | @gridColumns: 12;
101 | @gridColumnWidth: 60px;
102 | @gridGutterWidth: 20px;
103 | @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
104 |
105 | // Fluid grid
106 | @fluidGridColumnWidth: 6.382978723%;
107 | @fluidGridGutterWidth: 2.127659574%;
108 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Boilerstrap
2 | A blank slate for the modern web. Just add creativity.
3 |
4 | ## Wait, what? Why?
5 | I wanted bootstrap, but with all of the HTML5 Boilerplate tweaks, Modernizr loading, js compression, plus better coffeescript support, and control of js concatenation.
6 |
7 | I also wanted an asset organizational strcuture that better assessed the reality that nowdays we live with an uncomforatble mix of compiled and static sources files for css and javascript.
8 |
9 | Furthermore, it's nice to have support for coffeescript, less, and sass, plus easy extensibility to whatever else you want.
10 |
11 | Finally, I just wanted the peace of mind that with a single clone, I'm ready to go with a robust, clean, efficient, cross-browser, optimized, and organized blank slate.
12 |
13 | ## How to Use:
14 | * `rake watch` will build everything and watch for new changes.
15 | * Always link from `bin`, put your code in `src` (to compile) and `lib` (to leave alone)
16 | * Use subfolders folders in `src` to specify what you want to concatenate together. Create an optional file called `ORDERING` in the folder to explicitly specify the order of concatenation.
17 |
18 | ## Basic Structure & Instructions:
19 | * **Rakefile** - Run `rake` to just build and `rake watch` to build and watch
20 | * **css**
21 | * **bin** - All compiled css files end up here
22 | * **lib** - Not touched by Rakefile. You should include from src.
23 | * **src** - All raw css, or less, or sass files. They are compiled and copied one-to-one to the css/bin directory. Use Less or Sass `@include` directives to combine multiple files together. If using raw css, use subfolders to concatenate files.
24 | * *your_subfolder* - All css (ONLY) files are concatenated and put in css/bin as `subfolder.css`
25 | * **js**
26 | * **bin** - All compiled js files. Each file has a regular and minified version.
27 | * **lib** - Not touched by Rakefile. Meant for things like jQuery, or anything else you don't want compiled.
28 | * **src** - All raw javascript and/or coffeescript files go here. They are compiled and copied one-to-one to the js/bin directory. Use subfolders if you want concatenation.
29 | * **global** - All files put in here will be concatenated, compiled, and put in js/bin as `global.js` and `global.min.js`
30 | * ORDERING - A file called `ORDERING` that lists the order of concatenation. Simply list files (just the name including extensions), one per line, in the order you want.
31 | * *your_subfolder* - All files in 'your_subfolder' are concatenated, compiled, and put in js/bin as `your_subfolder.js` and `your_subfolder.min.js`
32 |
33 | ## Best Practices
34 | * Use the built-in @include directives of less and sass to include files from css/lib.
35 | * Think carefully about what you actually want to concatenate, and what you want to independently load.
36 | * All javascript (except modernizr itself) should be loaded with Modernizr.
37 | * If a couple pages (but not all) need the same javascript file, create a page-specific subfolder in the js/src/ directory for each page and sym-link to common javascript files stored in js/lib. If you need the order explicitly defined, don't forget to create an `ORDERING` file and list the files.
38 | * If all pages need the same javascript file, add it to the js/src/global directory so it concatenates into a single load from js/bin/global.js
39 |
40 | ## Dependencies
41 | * `gem install watchr` - To enable code watching
42 | * `npm install -g uglify-js` - To minify javascript
43 | * `npm install -g coffee-script` - To compile coffeescript if you use any
44 | * `npm install -g less` - To compile LESS if you use any
45 | * `gem install sass` - To compile SASS if you use any
46 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/README.md:
--------------------------------------------------------------------------------
1 | ## 2.0 BOOTSTRAP JS PHILOSOPHY
2 | These are the high-level design rules which guide the development of Bootstrap's plugin apis.
3 |
4 | ---
5 |
6 | ### DATA-ATTRIBUTE API
7 |
8 | We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
9 |
10 | We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
11 |
12 | $('body').off('.data-api')
13 |
14 | To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
15 |
16 | $('body').off('.alert.data-api')
17 |
18 | ---
19 |
20 | ### PROGRAMATIC API
21 |
22 | We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
23 |
24 | All public APIs should be single, chainable methods, and return the collection acted upon.
25 |
26 | $(".btn.danger").button("toggle").addClass("fat")
27 |
28 | All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
29 |
30 | $("#myModal").modal() // initialized with defaults
31 | $("#myModal").modal({ keyboard: false }) // initialized with now keyboard
32 | $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
33 |
34 | ---
35 |
36 | ### OPTIONS
37 |
38 | Options should be sparse and add universal value. We should pick the right defaults.
39 |
40 | All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`.
41 |
42 | $.fn.modal.defaults = { … }
43 |
44 | An options definition should take the following form:
45 |
46 | *noun*: *adjective* - describes or modifies a quality of an instance
47 |
48 | examples:
49 |
50 | backdrop: true
51 | keyboard: false
52 | placement: 'top'
53 |
54 | ---
55 |
56 | ### EVENTS
57 |
58 | All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
59 |
60 | show | shown
61 | hide | hidden
62 |
63 | ---
64 |
65 | ### CONSTRUCTORS
66 |
67 | Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way:
68 |
69 |
70 | $.fn.popover.Constructor
71 |
72 | ---
73 |
74 | ### DATA ACCESSOR
75 |
76 | Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
77 |
78 | $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
79 |
80 | ---
81 |
82 | ### DATA ATTRIBUTES
83 |
84 | Data attributes should take the following form:
85 |
86 | - data-{{verb}}={{plugin}} - defines main interaction
87 | - data-target || href^=# - defined on "control" element (if element controls an element other than self)
88 | - data-{{noun}} - defines class instance options
89 |
90 | examples:
91 |
92 | // control other targets
93 | data-toggle="modal" data-target="#foo"
94 | data-toggle="collapse" data-target="#foo" data-parent="#bar"
95 |
96 | // defined on element they control
97 | data-spy="scroll"
98 |
99 | data-dismiss="modal"
100 | data-dismiss="alert"
101 |
102 | data-toggle="dropdown"
103 |
104 | data-toggle="button"
105 | data-toggle="buttons-checkbox"
106 | data-toggle="buttons-radio"
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-popover")
4 |
5 | test("should be defined on jquery object", function () {
6 | var div = $('')
7 | ok(div.popover, 'popover method is defined')
8 | })
9 |
10 | test("should return element", function () {
11 | var div = $('')
12 | ok(div.popover() == div, 'document.body returned')
13 | })
14 |
15 | test("should render popover element", function () {
16 | $.support.transition = false
17 | var popover = $('@mdo')
18 | .appendTo('#qunit-fixture')
19 | .popover('show')
20 |
21 | ok($('.popover').length, 'popover was inserted')
22 | popover.popover('hide')
23 | ok(!$(".popover").length, 'popover removed')
24 | })
25 |
26 | test("should store popover instance in popover data object", function () {
27 | $.support.transition = false
28 | var popover = $('@mdo')
29 | .popover()
30 |
31 | ok(!!popover.data('popover'), 'popover instance exists')
32 | })
33 |
34 | test("should get title and content from options", function () {
35 | $.support.transition = false
36 | var popover = $('@fat')
37 | .appendTo('#qunit-fixture')
38 | .popover({
39 | title: function () {
40 | return '@fat'
41 | }
42 | , content: function () {
43 | return 'loves writing tests (╯°□°)╯︵ ┻━┻'
44 | }
45 | })
46 |
47 | popover.popover('show')
48 |
49 | ok($('.popover').length, 'popover was inserted')
50 | equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted')
51 | equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
52 |
53 | popover.popover('hide')
54 | ok(!$('.popover').length, 'popover was removed')
55 | $('#qunit-fixture').empty()
56 | })
57 |
58 | test("should get title and content from attributes", function () {
59 | $.support.transition = false
60 | var popover = $('@mdo')
61 | .appendTo('#qunit-fixture')
62 | .popover()
63 | .popover('show')
64 |
65 | ok($('.popover').length, 'popover was inserted')
66 | equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
67 | equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted')
68 |
69 | popover.popover('hide')
70 | ok(!$('.popover').length, 'popover was removed')
71 | $('#qunit-fixture').empty()
72 | })
73 |
74 | test("should respect custom classes", function() {
75 | $.support.transition = false
76 | var popover = $('@fat')
77 | .appendTo('#qunit-fixture')
78 | .popover({
79 | title: 'Test'
80 | , content: 'Test'
81 | , template: ''
82 | })
83 |
84 | popover.popover('show')
85 |
86 | ok($('.popover').length, 'popover was inserted')
87 | ok($('.popover').hasClass('foobar'), 'custom class is present')
88 |
89 | popover.popover('hide')
90 | ok(!$('.popover').length, 'popover was removed')
91 | $('#qunit-fixture').empty()
92 | })
93 | })
--------------------------------------------------------------------------------
/css/lib/dropdowns.less:
--------------------------------------------------------------------------------
1 | // DROPDOWN MENUS
2 | // --------------
3 |
4 | // Use the .menu class on any element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5 | .dropdown {
6 | position: relative;
7 | }
8 | .dropdown-toggle {
9 | // The caret makes the toggle a bit too tall in IE7
10 | *margin-bottom: -3px;
11 | }
12 | .dropdown-toggle:active,
13 | .open .dropdown-toggle {
14 | outline: 0;
15 | }
16 | // Dropdown arrow/caret
17 | .caret {
18 | display: inline-block;
19 | width: 0;
20 | height: 0;
21 | text-indent: -99999px;
22 | // IE7 won't do the border trick if there's a text indent, but it doesn't
23 | // do the content that text-indent is hiding, either, so we're ok.
24 | *text-indent: 0;
25 | vertical-align: top;
26 | border-left: 4px solid transparent;
27 | border-right: 4px solid transparent;
28 | border-top: 4px solid @black;
29 | .opacity(30);
30 | content: "\2193";
31 | }
32 | .dropdown .caret {
33 | margin-top: 8px;
34 | margin-left: 2px;
35 | }
36 | .dropdown:hover .caret,
37 | .open.dropdown .caret {
38 | .opacity(100);
39 | }
40 | // The dropdown menu (ul)
41 | .dropdown-menu {
42 | position: absolute;
43 | top: 100%;
44 | left: 0;
45 | z-index: @zindexDropdown;
46 | float: left;
47 | display: none; // none by default, but block on "open" of the menu
48 | min-width: 160px;
49 | _width: 160px;
50 | padding: 4px 0;
51 | margin: 0; // override default ul
52 | list-style: none;
53 | background-color: @white;
54 | border-color: #ccc;
55 | border-color: rgba(0,0,0,.2);
56 | border-style: solid;
57 | border-width: 1px;
58 | .border-radius(0 0 5px 5px);
59 | .box-shadow(0 5px 10px rgba(0,0,0,.2));
60 | -webkit-background-clip: padding-box;
61 | -moz-background-clip: padding;
62 | background-clip: padding-box;
63 | *border-right-width: 2px;
64 | *border-bottom-width: 2px;
65 |
66 | // Allow for dropdowns to go bottom up (aka, dropup-menu)
67 | &.bottom-up {
68 | top: auto;
69 | bottom: 100%;
70 | margin-bottom: 2px;
71 | }
72 |
73 | // Dividers (basically an hr) within the dropdown
74 | .divider {
75 | height: 1px;
76 | margin: 5px 1px;
77 | overflow: hidden;
78 | background-color: #e5e5e5;
79 | border-bottom: 1px solid @white;
80 |
81 | // IE7 needs a set width since we gave a height. Restricting just
82 | // to IE7 to keep the 1px left/right space in other browsers.
83 | // It is unclear where IE is getting the extra space that we need
84 | // to negative-margin away, but so it goes.
85 | *width: 100%;
86 | *margin: -5px 0 5px;
87 | }
88 |
89 | // Links within the dropdown menu
90 | a {
91 | display: block;
92 | padding: 3px 15px;
93 | clear: both;
94 | font-weight: normal;
95 | line-height: @baseLineHeight;
96 | color: @gray;
97 | white-space: nowrap;
98 | }
99 | }
100 |
101 | // Hover state
102 | .dropdown-menu li > a:hover,
103 | .dropdown-menu .active > a,
104 | .dropdown-menu .active > a:hover {
105 | color: @white;
106 | text-decoration: none;
107 | background-color: @linkColor;
108 | }
109 |
110 | // Open state for the dropdown
111 | .dropdown.open {
112 | // IE7's z-index only goes to the nearest positioned ancestor, which would
113 | // make the menu appear below buttons that appeared later on the page
114 | *z-index: @zindexDropdown;
115 |
116 | .dropdown-toggle {
117 | color: @white;
118 | background: #ccc;
119 | background: rgba(0,0,0,.3);
120 | }
121 | .dropdown-menu {
122 | display: block;
123 | }
124 | }
125 |
126 | // Typeahead
127 | .typeahead {
128 | margin-top: 2px; // give it some space to breathe
129 | .border-radius(4px);
130 | }
131 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function( $ ){
22 |
23 | "use strict"
24 |
25 | /* TAB CLASS DEFINITION
26 | * ==================== */
27 |
28 | var Tab = function ( element ) {
29 | this.element = $(element)
30 | }
31 |
32 | Tab.prototype = {
33 |
34 | constructor: Tab
35 |
36 | , show: function () {
37 | var $this = this.element
38 | , $ul = $this.closest('ul:not(.dropdown-menu)')
39 | , selector = $this.attr('data-target')
40 | , previous
41 | , $target
42 |
43 | if (!selector) {
44 | selector = $this.attr('href')
45 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
46 | }
47 |
48 | if ( $this.parent('li').hasClass('active') ) return
49 |
50 | previous = $ul.find('.active a').last()[0]
51 |
52 | $this.trigger({
53 | type: 'show'
54 | , relatedTarget: previous
55 | })
56 |
57 | $target = $(selector)
58 |
59 | this.activate($this.parent('li'), $ul)
60 | this.activate($target, $target.parent(), function () {
61 | $this.trigger({
62 | type: 'shown'
63 | , relatedTarget: previous
64 | })
65 | })
66 | }
67 |
68 | , activate: function ( element, container, callback) {
69 | var $active = container.find('> .active')
70 | , transition = callback
71 | && $.support.transition
72 | && $active.hasClass('fade')
73 |
74 | function next() {
75 | $active
76 | .removeClass('active')
77 | .find('> .dropdown-menu > .active')
78 | .removeClass('active')
79 |
80 | element.addClass('active')
81 |
82 | if (transition) {
83 | element[0].offsetWidth // reflow for transition
84 | element.addClass('in')
85 | } else {
86 | element.removeClass('fade')
87 | }
88 |
89 | if ( element.parent('.dropdown-menu') ) {
90 | element.closest('li.dropdown').addClass('active')
91 | }
92 |
93 | callback && callback()
94 | }
95 |
96 | transition ?
97 | $active.one($.support.transition.end, next) :
98 | next()
99 |
100 | $active.removeClass('in')
101 | }
102 | }
103 |
104 |
105 | /* TAB PLUGIN DEFINITION
106 | * ===================== */
107 |
108 | $.fn.tab = function ( option ) {
109 | return this.each(function () {
110 | var $this = $(this)
111 | , data = $this.data('tab')
112 | if (!data) $this.data('tab', (data = new Tab(this)))
113 | if (typeof option == 'string') data[option]()
114 | })
115 | }
116 |
117 | $.fn.tab.Constructor = Tab
118 |
119 |
120 | /* TAB DATA-API
121 | * ============ */
122 |
123 | $(function () {
124 | $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
125 | e.preventDefault()
126 | $(this).tab('show')
127 | })
128 | })
129 |
130 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/tables.less:
--------------------------------------------------------------------------------
1 | //
2 | // Tables.less
3 | // Tables for, you guessed it, tabular data
4 | // ----------------------------------------
5 |
6 |
7 | // BASE TABLES
8 | // -----------------
9 |
10 | table {
11 | max-width: 100%;
12 | border-collapse: collapse;
13 | border-spacing: 0;
14 | }
15 |
16 | // BASELINE STYLES
17 | // ---------------
18 |
19 | .table {
20 | width: 100%;
21 | margin-bottom: @baseLineHeight;
22 | // Cells
23 | th,
24 | td {
25 | padding: 8px;
26 | line-height: @baseLineHeight;
27 | text-align: left;
28 | vertical-align: top;
29 | border-top: 1px solid #ddd;
30 | }
31 | th {
32 | font-weight: bold;
33 | }
34 | // Bottom align for column headings
35 | thead th {
36 | vertical-align: bottom;
37 | }
38 | // Remove top border from thead by default
39 | thead:first-child tr th,
40 | thead:first-child tr td {
41 | border-top: 0;
42 | }
43 | // Account for multiple tbody instances
44 | tbody + tbody {
45 | border-top: 2px solid #ddd;
46 | }
47 | }
48 |
49 |
50 |
51 | // CONDENSED TABLE W/ HALF PADDING
52 | // -------------------------------
53 |
54 | .table-condensed {
55 | th,
56 | td {
57 | padding: 4px 5px;
58 | }
59 | }
60 |
61 |
62 | // BORDERED VERSION
63 | // ----------------
64 |
65 | .table-bordered {
66 | border: 1px solid #ddd;
67 | border-collapse: separate; // Done so we can round those corners!
68 | *border-collapse: collapsed; // IE7 can't round corners anyway
69 | .border-radius(4px);
70 | th + th,
71 | td + td,
72 | th + td,
73 | td + th {
74 | border-left: 1px solid #ddd;
75 | }
76 | // Prevent a double border
77 | thead:first-child tr:first-child th,
78 | tbody:first-child tr:first-child th,
79 | tbody:first-child tr:first-child td {
80 | border-top: 0;
81 | }
82 | // For first th or td in the first row in the first thead or tbody
83 | thead:first-child tr:first-child th:first-child,
84 | tbody:first-child tr:first-child td:first-child {
85 | .border-radius(4px 0 0 0);
86 | }
87 | thead:first-child tr:first-child th:last-child,
88 | tbody:first-child tr:first-child td:last-child {
89 | .border-radius(0 4px 0 0);
90 | }
91 | // For first th or td in the first row in the first thead or tbody
92 | thead:last-child tr:last-child th:first-child,
93 | tbody:last-child tr:last-child td:first-child {
94 | .border-radius(0 0 0 4px);
95 | }
96 | thead:last-child tr:last-child th:last-child,
97 | tbody:last-child tr:last-child td:last-child {
98 | .border-radius(0 0 4px 0);
99 | }
100 | }
101 |
102 |
103 | // ZEBRA-STRIPING
104 | // --------------
105 |
106 | // Default zebra-stripe styles (alternating gray and transparent backgrounds)
107 | .table-striped {
108 | tbody {
109 | tr:nth-child(odd) td,
110 | tr:nth-child(odd) th {
111 | background-color: #f9f9f9;
112 | }
113 | }
114 | }
115 |
116 |
117 | // HOVER EFFECT
118 | // ------------
119 | // Placed here since it has to come after the potential zebra striping
120 | .table {
121 | tbody tr:hover td,
122 | tbody tr:hover th {
123 | background-color: #f5f5f5;
124 | }
125 | }
126 |
127 |
128 | // TABLE CELL SIZING
129 | // -----------------
130 |
131 | // Change the columns
132 | .tableColumns(@columnSpan: 1) {
133 | float: none;
134 | width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16;
135 | margin-left: 0;
136 | }
137 | table {
138 | .span1 { .tableColumns(1); }
139 | .span2 { .tableColumns(2); }
140 | .span3 { .tableColumns(3); }
141 | .span4 { .tableColumns(4); }
142 | .span5 { .tableColumns(5); }
143 | .span6 { .tableColumns(6); }
144 | .span7 { .tableColumns(7); }
145 | .span8 { .tableColumns(8); }
146 | .span9 { .tableColumns(9); }
147 | .span10 { .tableColumns(10); }
148 | .span11 { .tableColumns(11); }
149 | .span12 { .tableColumns(12); }
150 | }
151 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-scrollspy.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-scrollspy.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================== */
19 |
20 | !function ( $ ) {
21 |
22 | "use strict"
23 |
24 | /* SCROLLSPY CLASS DEFINITION
25 | * ========================== */
26 |
27 | function ScrollSpy( element, options) {
28 | var process = $.proxy(this.process, this)
29 | , $element = $(element).is('body') ? $(window) : $(element)
30 | , href
31 | this.options = $.extend({}, $.fn.scrollspy.defaults, options)
32 | this.$scrollElement = $element.on('scroll.scroll.data-api', process)
33 | this.selector = (this.options.target
34 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
35 | || '') + ' .nav li > a'
36 | this.$body = $('body').on('click.scroll.data-api', this.selector, process)
37 | this.refresh()
38 | this.process()
39 | }
40 |
41 | ScrollSpy.prototype = {
42 |
43 | constructor: ScrollSpy
44 |
45 | , refresh: function () {
46 | this.targets = this.$body
47 | .find(this.selector)
48 | .map(function () {
49 | var href = $(this).attr('href')
50 | return /^#\w/.test(href) && $(href).length ? href : null
51 | })
52 |
53 | this.offsets = $.map(this.targets, function (id) {
54 | return $(id).position().top
55 | })
56 | }
57 |
58 | , process: function () {
59 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
60 | , offsets = this.offsets
61 | , targets = this.targets
62 | , activeTarget = this.activeTarget
63 | , i
64 |
65 | for (i = offsets.length; i--;) {
66 | activeTarget != targets[i]
67 | && scrollTop >= offsets[i]
68 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
69 | && this.activate( targets[i] )
70 | }
71 | }
72 |
73 | , activate: function (target) {
74 | var active
75 |
76 | this.activeTarget = target
77 |
78 | this.$body
79 | .find(this.selector).parent('.active')
80 | .removeClass('active')
81 |
82 | active = this.$body
83 | .find(this.selector + '[href="' + target + '"]')
84 | .parent('li')
85 | .addClass('active')
86 |
87 | if ( active.parent('.dropdown-menu') ) {
88 | active.closest('li.dropdown').addClass('active')
89 | }
90 | }
91 |
92 | }
93 |
94 |
95 | /* SCROLLSPY PLUGIN DEFINITION
96 | * =========================== */
97 |
98 | $.fn.scrollspy = function ( option ) {
99 | return this.each(function () {
100 | var $this = $(this)
101 | , data = $this.data('scrollspy')
102 | , options = typeof option == 'object' && option
103 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
104 | if (typeof option == 'string') data[option]()
105 | })
106 | }
107 |
108 | $.fn.scrollspy.Constructor = ScrollSpy
109 |
110 | $.fn.scrollspy.defaults = {
111 | offset: 10
112 | }
113 |
114 |
115 | /* SCROLLSPY DATA-API
116 | * ================== */
117 |
118 | $(function () {
119 | $('[data-spy="scroll"]').each(function () {
120 | var $spy = $(this)
121 | $spy.scrollspy($spy.data())
122 | })
123 | })
124 |
125 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/button-groups.less:
--------------------------------------------------------------------------------
1 | // BUTTON GROUPS
2 | // -------------
3 |
4 |
5 | // Make the div behave like a button
6 | .btn-group {
7 | position: relative;
8 | .clearfix(); // clears the floated buttons
9 | .ie7-restore-left-whitespace();
10 | }
11 |
12 | // Space out series of button groups
13 | .btn-group + .btn-group {
14 | margin-left: 5px;
15 | }
16 |
17 | // Optional: Group multiple button groups together for a toolbar
18 | .btn-toolbar {
19 | margin-top: @baseLineHeight / 2;
20 | margin-bottom: @baseLineHeight / 2;
21 | .btn-group {
22 | display: inline-block;
23 | .ie7-inline-block();
24 | }
25 | }
26 |
27 | // Float them, remove border radius, then re-add to first and last elements
28 | .btn-group .btn {
29 | position: relative;
30 | float: left;
31 | margin-left: -1px;
32 | .border-radius(0);
33 | }
34 | // 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
35 | .btn-group .btn:first-child {
36 | margin-left: 0;
37 | -webkit-border-top-left-radius: 4px;
38 | -moz-border-radius-topleft: 4px;
39 | border-top-left-radius: 4px;
40 | -webkit-border-bottom-left-radius: 4px;
41 | -moz-border-radius-bottomleft: 4px;
42 | border-bottom-left-radius: 4px;
43 | }
44 | .btn-group .btn:last-child,
45 | .btn-group .dropdown-toggle {
46 | -webkit-border-top-right-radius: 4px;
47 | -moz-border-radius-topright: 4px;
48 | border-top-right-radius: 4px;
49 | -webkit-border-bottom-right-radius: 4px;
50 | -moz-border-radius-bottomright: 4px;
51 | border-bottom-right-radius: 4px;
52 | }
53 | // Reset corners for large buttons
54 | .btn-group .btn.large:first-child {
55 | margin-left: 0;
56 | -webkit-border-top-left-radius: 6px;
57 | -moz-border-radius-topleft: 6px;
58 | border-top-left-radius: 6px;
59 | -webkit-border-bottom-left-radius: 6px;
60 | -moz-border-radius-bottomleft: 6px;
61 | border-bottom-left-radius: 6px;
62 | }
63 | .btn-group .btn.large:last-child,
64 | .btn-group .large.dropdown-toggle {
65 | -webkit-border-top-right-radius: 6px;
66 | -moz-border-radius-topright: 6px;
67 | border-top-right-radius: 6px;
68 | -webkit-border-bottom-right-radius: 6px;
69 | -moz-border-radius-bottomright: 6px;
70 | border-bottom-right-radius: 6px;
71 | }
72 |
73 | // On hover/focus/active, bring the proper btn to front
74 | .btn-group .btn:hover,
75 | .btn-group .btn:focus,
76 | .btn-group .btn:active,
77 | .btn-group .btn.active {
78 | z-index: 2;
79 | }
80 |
81 | // On active and open, don't show outline
82 | .btn-group .dropdown-toggle:active,
83 | .btn-group.open .dropdown-toggle {
84 | outline: 0;
85 | }
86 |
87 |
88 |
89 | // Split button dropdowns
90 | // ----------------------
91 |
92 | // Give the line between buttons some depth
93 | .btn-group .dropdown-toggle {
94 | padding-left: 8px;
95 | padding-right: 8px;
96 | @shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
97 | .box-shadow(@shadow);
98 | *padding-top: 5px;
99 | *padding-bottom: 5px;
100 | }
101 |
102 | .btn-group.open {
103 | // IE7's z-index only goes to the nearest positioned ancestor, which would
104 | // make the menu appear below buttons that appeared later on the page
105 | *z-index: @zindexDropdown;
106 |
107 | // Reposition menu on open and round all corners
108 | .dropdown-menu {
109 | display: block;
110 | margin-top: 1px;
111 | .border-radius(5px);
112 | }
113 |
114 | .dropdown-toggle {
115 | background-image: none;
116 | @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
117 | .box-shadow(@shadow);
118 | }
119 | }
120 |
121 | // Reposition the caret
122 | .btn .caret {
123 | margin-top: 7px;
124 | margin-left: 0;
125 | }
126 | .btn:hover .caret,
127 | .open.btn-group .caret {
128 | .opacity(100);
129 | }
130 |
131 |
132 | // Account for other colors
133 | .btn-primary,
134 | .btn-danger,
135 | .btn-info,
136 | .btn-success,
137 | .btn-inverse {
138 | .caret {
139 | border-top-color: @white;
140 | .opacity(75);
141 | }
142 | }
143 |
144 | // Small button dropdowns
145 | .btn-small .caret {
146 | margin-top: 4px;
147 | }
148 |
149 |
--------------------------------------------------------------------------------
/css/lib/type.less:
--------------------------------------------------------------------------------
1 | // Typography.less
2 | // Headings, body text, lists, code, and more for a versatile and durable typography system
3 | // ----------------------------------------------------------------------------------------
4 |
5 |
6 | // BODY TEXT
7 | // ---------
8 |
9 | p {
10 | margin: 0 0 @baseLineHeight / 2;
11 | font-family: @baseFontFamily;
12 | font-size: @baseFontSize;
13 | line-height: @baseLineHeight;
14 | small {
15 | font-size: @baseFontSize - 2;
16 | color: @grayLight;
17 | }
18 | }
19 | .lead {
20 | margin-bottom: @baseLineHeight;
21 | font-size: 20px;
22 | font-weight: 200;
23 | line-height: @baseLineHeight * 1.5;
24 | }
25 |
26 | // HEADINGS
27 | // --------
28 |
29 | h1, h2, h3, h4, h5, h6 {
30 | margin: 0;
31 | font-weight: bold;
32 | color: @grayDark;
33 | text-rendering: optimizelegibility; // Fix the character spacing for headings
34 | small {
35 | font-weight: normal;
36 | color: @grayLight;
37 | }
38 | }
39 | h1 {
40 | font-size: 30px;
41 | line-height: @baseLineHeight * 2;
42 | small {
43 | font-size: 18px;
44 | }
45 | }
46 | h2 {
47 | font-size: 24px;
48 | line-height: @baseLineHeight * 2;
49 | small {
50 | font-size: 18px;
51 | }
52 | }
53 | h3 {
54 | line-height: @baseLineHeight * 1.5;
55 | font-size: 18px;
56 | small {
57 | font-size: 14px;
58 | }
59 | }
60 | h4, h5, h6 {
61 | line-height: @baseLineHeight;
62 | }
63 | h4 {
64 | font-size: 14px;
65 | small {
66 | font-size: 12px;
67 | }
68 | }
69 | h5 {
70 | font-size: 12px;
71 | }
72 | h6 {
73 | font-size: 11px;
74 | color: @grayLight;
75 | text-transform: uppercase;
76 | }
77 |
78 | // Page header
79 | .page-header {
80 | padding-bottom: @baseLineHeight - 1;
81 | margin: @baseLineHeight 0;
82 | border-bottom: 1px solid @grayLighter;
83 | }
84 | .page-header h1 {
85 | line-height: 1;
86 | }
87 |
88 |
89 |
90 | // LISTS
91 | // -----
92 |
93 | // Unordered and Ordered lists
94 | ul, ol {
95 | padding: 0;
96 | margin: 0 0 @baseLineHeight / 2 25px;
97 | }
98 | ul ul,
99 | ul ol,
100 | ol ol,
101 | ol ul {
102 | margin-bottom: 0;
103 | }
104 | ul {
105 | list-style: disc;
106 | }
107 | ol {
108 | list-style: decimal;
109 | }
110 | li {
111 | line-height: @baseLineHeight;
112 | }
113 | ul.unstyled,
114 | ol.unstyled {
115 | margin-left: 0;
116 | list-style: none;
117 | }
118 |
119 | // Description Lists
120 | dl {
121 | margin-bottom: @baseLineHeight;
122 | }
123 | dt,
124 | dd {
125 | line-height: @baseLineHeight;
126 | }
127 | dt {
128 | font-weight: bold;
129 | }
130 | dd {
131 | margin-left: @baseLineHeight / 2;
132 | }
133 |
134 | // MISC
135 | // ----
136 |
137 | // Horizontal rules
138 | hr {
139 | margin: @baseLineHeight 0;
140 | border: 0;
141 | border-top: 1px solid @hrBorder;
142 | border-bottom: 1px solid @white;
143 | }
144 |
145 | // Emphasis
146 | strong {
147 | font-weight: bold;
148 | }
149 | em {
150 | font-style: italic;
151 | }
152 | .muted {
153 | color: @grayLight;
154 | }
155 |
156 | // Abbreviations and acronyms
157 | abbr {
158 | font-size: 90%;
159 | text-transform: uppercase;
160 | border-bottom: 1px dotted #ddd;
161 | cursor: help;
162 | }
163 |
164 | // Blockquotes
165 | blockquote {
166 | padding: 0 0 0 15px;
167 | margin: 0 0 @baseLineHeight;
168 | border-left: 5px solid @grayLighter;
169 | p {
170 | margin-bottom: 0;
171 | #font > .shorthand(16px,300,@baseLineHeight * 1.25);
172 | }
173 | small {
174 | display: block;
175 | line-height: @baseLineHeight;
176 | color: @grayLight;
177 | &:before {
178 | content: '\2014 \00A0';
179 | }
180 | }
181 |
182 | // Float right with text-align: right
183 | &.pull-right {
184 | float: right;
185 | padding-left: 0;
186 | padding-right: 15px;
187 | border-left: 0;
188 | border-right: 5px solid @grayLighter;
189 | p,
190 | small {
191 | text-align: right;
192 | }
193 | }
194 | }
195 |
196 | // Quotes
197 | q:before,
198 | q:after,
199 | blockquote:before,
200 | blockquote:after {
201 | content: "";
202 | }
203 |
204 | // Addresses
205 | address {
206 | display: block;
207 | margin-bottom: @baseLineHeight;
208 | line-height: @baseLineHeight;
209 | font-style: normal;
210 | }
211 |
212 | // Misc
213 | small {
214 | font-size: 100%;
215 | }
216 | cite {
217 | font-style: normal;
218 | }
219 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-collapse.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-collapse.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#collapse
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 | !function( $ ){
21 |
22 | "use strict"
23 |
24 | var Collapse = function ( element, options ) {
25 | this.$element = $(element)
26 | this.options = $.extend({}, $.fn.collapse.defaults, options)
27 |
28 | if (this.options["parent"]) {
29 | this.$parent = $(this.options["parent"])
30 | }
31 |
32 | this.options.toggle && this.toggle()
33 | }
34 |
35 | Collapse.prototype = {
36 |
37 | constructor: Collapse
38 |
39 | , dimension: function () {
40 | var hasWidth = this.$element.hasClass('width')
41 | return hasWidth ? 'width' : 'height'
42 | }
43 |
44 | , show: function () {
45 | var dimension = this.dimension()
46 | , scroll = $.camelCase(['scroll', dimension].join('-'))
47 | , actives = this.$parent && this.$parent.find('.in')
48 | , hasData
49 |
50 | if (actives && actives.length) {
51 | hasData = actives.data('collapse')
52 | actives.collapse('hide')
53 | hasData || actives.data('collapse', null)
54 | }
55 |
56 | this.$element[dimension](0)
57 | this.transition('addClass', 'show', 'shown')
58 | this.$element[dimension](this.$element[0][scroll])
59 |
60 | }
61 |
62 | , hide: function () {
63 | var dimension = this.dimension()
64 | this.reset(this.$element[dimension]())
65 | this.transition('removeClass', 'hide', 'hidden')
66 | this.$element[dimension](0)
67 | }
68 |
69 | , reset: function ( size ) {
70 | var dimension = this.dimension()
71 |
72 | this.$element
73 | .removeClass('collapse')
74 | [dimension](size || 'auto')
75 | [0].offsetWidth
76 |
77 | this.$element.addClass('collapse')
78 | }
79 |
80 | , transition: function ( method, startEvent, completeEvent ) {
81 | var that = this
82 | , complete = function () {
83 | if (startEvent == 'show') that.reset()
84 | that.$element.trigger(completeEvent)
85 | }
86 |
87 | this.$element
88 | .trigger(startEvent)
89 | [method]('in')
90 |
91 | $.support.transition && this.$element.hasClass('collapse') ?
92 | this.$element.one($.support.transition.end, complete) :
93 | complete()
94 | }
95 |
96 | , toggle: function () {
97 | this[this.$element.hasClass('in') ? 'hide' : 'show']()
98 | }
99 |
100 | }
101 |
102 | /* COLLAPSIBLE PLUGIN DEFINITION
103 | * ============================== */
104 |
105 | $.fn.collapse = function ( option ) {
106 | return this.each(function () {
107 | var $this = $(this)
108 | , data = $this.data('collapse')
109 | , options = typeof option == 'object' && option
110 | if (!data) $this.data('collapse', (data = new Collapse(this, options)))
111 | if (typeof option == 'string') data[option]()
112 | })
113 | }
114 |
115 | $.fn.collapse.defaults = {
116 | toggle: true
117 | }
118 |
119 | $.fn.collapse.Constructor = Collapse
120 |
121 |
122 | /* COLLAPSIBLE DATA-API
123 | * ==================== */
124 |
125 | $(function () {
126 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
127 | var $this = $(this), href
128 | , target = $this.attr('data-target')
129 | || e.preventDefault()
130 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
131 | , option = $(target).data('collapse') ? 'toggle' : $this.data()
132 | $(target).collapse(option)
133 | })
134 | })
135 |
136 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/buttons.less:
--------------------------------------------------------------------------------
1 | // BUTTON STYLES
2 | // -------------
3 |
4 |
5 | // Base styles
6 | // --------------------------------------------------
7 |
8 | // Core
9 | .btn {
10 | display: inline-block;
11 | padding: 4px 10px 4px;
12 | margin-bottom: 0; // For input.btn
13 | font-size: @baseFontSize;
14 | line-height: @baseLineHeight;
15 | color: @grayDark;
16 | text-align: center;
17 | text-shadow: 0 1px 1px rgba(255,255,255,.75);
18 | vertical-align: middle;
19 | .buttonBackground(@white, darken(@white, 10%));
20 | border: 1px solid #ccc;
21 | border-bottom-color: #bbb;
22 | .border-radius(4px);
23 | @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
24 | .box-shadow(@shadow);
25 | cursor: pointer;
26 |
27 | // Give IE7 some love
28 | .reset-filter();
29 | .ie7-restore-left-whitespace();
30 | }
31 |
32 | // Hover state
33 | .btn:hover {
34 | color: @grayDark;
35 | text-decoration: none;
36 | background-color: darken(@white, 10%);
37 | background-position: 0 -15px;
38 |
39 | // transition is only when going to hover, otherwise the background
40 | // behind the gradient (there for IE<=9 fallback) gets mismatched
41 | .transition(background-position .1s linear);
42 | }
43 |
44 | // Focus state for keyboard and accessibility
45 | .btn:focus {
46 | .tab-focus();
47 | }
48 |
49 | // Active state
50 | .btn.active,
51 | .btn:active {
52 | background-image: none;
53 | @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
54 | .box-shadow(@shadow);
55 | background-color: darken(@white, 10%);
56 | background-color: darken(@white, 15%) e("\9");
57 | outline: 0;
58 | }
59 |
60 | // Disabled state
61 | .btn.disabled,
62 | .btn[disabled] {
63 | cursor: default;
64 | background-image: none;
65 | background-color: darken(@white, 10%);
66 | .opacity(65);
67 | .box-shadow(none);
68 | }
69 |
70 |
71 | // Button Sizes
72 | // --------------------------------------------------
73 |
74 | // Large
75 | .btn-large {
76 | padding: 9px 14px;
77 | font-size: @baseFontSize + 2px;
78 | line-height: normal;
79 | .border-radius(5px);
80 | }
81 | .btn-large [class^="icon-"] {
82 | margin-top: 1px;
83 | }
84 |
85 | // Small
86 | .btn-small {
87 | padding: 5px 9px;
88 | font-size: @baseFontSize - 2px;
89 | line-height: @baseLineHeight - 2px;
90 | }
91 | .btn-small [class^="icon-"] {
92 | margin-top: -1px;
93 | }
94 |
95 | // Mini
96 | .btn-mini {
97 | padding: 2px 6px;
98 | font-size: @baseFontSize - 2px;
99 | line-height: @baseLineHeight - 4px;
100 | }
101 |
102 |
103 | // Alternate buttons
104 | // --------------------------------------------------
105 |
106 | // Set text color
107 | // -------------------------
108 | .btn-primary,
109 | .btn-primary:hover,
110 | .btn-warning,
111 | .btn-warning:hover,
112 | .btn-danger,
113 | .btn-danger:hover,
114 | .btn-success,
115 | .btn-success:hover,
116 | .btn-info,
117 | .btn-info:hover,
118 | .btn-inverse,
119 | .btn-inverse:hover {
120 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121 | color: @white;
122 | }
123 | // Provide *some* extra contrast for those who can get it
124 | .btn-primary.active,
125 | .btn-warning.active,
126 | .btn-danger.active,
127 | .btn-success.active,
128 | .btn-info.active,
129 | .btn-dark.active {
130 | color: rgba(255,255,255,.75);
131 | }
132 |
133 | // Set the backgrounds
134 | // -------------------------
135 | .btn-primary {
136 | .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
137 | }
138 | // Warning appears are orange
139 | .btn-warning {
140 | .buttonBackground(lighten(@orange, 15%), @orange);
141 | }
142 | // Danger and error appear as red
143 | .btn-danger {
144 | .buttonBackground(#ee5f5b, #bd362f);
145 | }
146 | // Success appears as green
147 | .btn-success {
148 | .buttonBackground(#62c462, #51a351);
149 | }
150 | // Info appears as a neutral blue
151 | .btn-info {
152 | .buttonBackground(#5bc0de, #2f96b4);
153 | }
154 | // Inverse appears as dark gray
155 | .btn-inverse {
156 | .buttonBackground(#454545, #262626);
157 | }
158 |
159 |
160 | // Cross-browser Jank
161 | // --------------------------------------------------
162 |
163 | button.btn,
164 | input[type="submit"].btn {
165 |
166 | // Firefox 3.6 only I believe
167 | &::-moz-focus-inner {
168 | padding: 0;
169 | border: 0;
170 | }
171 |
172 | // IE7 has some default padding on button controls
173 | *padding-top: 2px;
174 | *padding-bottom: 2px;
175 | &.large {
176 | *padding-top: 7px;
177 | *padding-bottom: 7px;
178 | }
179 | &.small {
180 | *padding-top: 3px;
181 | *padding-bottom: 3px;
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/unit/bootstrap-typeahead.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-typeahead")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).typeahead, 'alert method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).typeahead()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should listen to an input", function () {
14 | var $input = $('')
15 | $input.typeahead()
16 | ok($input.data('events').blur, 'has a blur event')
17 | ok($input.data('events').keypress, 'has a keypress event')
18 | ok($input.data('events').keyup, 'has a keyup event')
19 | if ($.browser.webkit || $.browser.msie) {
20 | ok($input.data('events').keydown, 'has a keydown event')
21 | } else {
22 | ok($input.data('events').keydown, 'does not have a keydown event')
23 | }
24 | })
25 |
26 | test("should create a menu", function () {
27 | var $input = $('')
28 | ok($input.typeahead().data('typeahead').$menu, 'has a menu')
29 | })
30 |
31 | test("should listen to the menu", function () {
32 | var $input = $('')
33 | , $menu = $input.typeahead().data('typeahead').$menu
34 |
35 | ok($menu.data('events').mouseover, 'has a mouseover(pseudo: mouseenter)')
36 | ok($menu.data('events').click, 'has a click')
37 | })
38 |
39 | test("should show menu when query entered", function () {
40 | var $input = $('').typeahead({
41 | source: ['aa', 'ab', 'ac']
42 | })
43 | , typeahead = $input.data('typeahead')
44 |
45 | $input.val('a')
46 | typeahead.lookup()
47 |
48 | ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
49 | equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
50 | equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
51 |
52 | typeahead.$menu.remove()
53 | })
54 |
55 | test("should hide menu when query entered", function () {
56 | stop()
57 | var $input = $('').typeahead({
58 | source: ['aa', 'ab', 'ac']
59 | })
60 | , typeahead = $input.data('typeahead')
61 |
62 | $input.val('a')
63 | typeahead.lookup()
64 |
65 | ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
66 | equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
67 | equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
68 |
69 | $input.blur()
70 |
71 | setTimeout(function () {
72 | ok(!typeahead.$menu.is(":visible"), "typeahead is no longer visible")
73 | start()
74 | }, 200)
75 |
76 | typeahead.$menu.remove()
77 | })
78 |
79 | test("should set next item when down arrow is pressed", function () {
80 | var $input = $('').typeahead({
81 | source: ['aa', 'ab', 'ac']
82 | })
83 | , typeahead = $input.data('typeahead')
84 |
85 | $input.val('a')
86 | typeahead.lookup()
87 |
88 | ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
89 | equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
90 | equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
91 | ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
92 |
93 | $input.trigger({
94 | type: 'keypress'
95 | , keyCode: 40
96 | })
97 |
98 | ok(typeahead.$menu.find('li').first().next().hasClass('active'), "second item is active")
99 |
100 |
101 | $input.trigger({
102 | type: 'keypress'
103 | , keyCode: 38
104 | })
105 |
106 | ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
107 |
108 | typeahead.$menu.remove()
109 | })
110 |
111 |
112 | test("should set input value to selected item", function () {
113 | var $input = $('').typeahead({
114 | source: ['aa', 'ab', 'ac']
115 | })
116 | , typeahead = $input.data('typeahead')
117 |
118 | $input.val('a')
119 | typeahead.lookup()
120 |
121 | $(typeahead.$menu.find('li')[2]).mouseover().click()
122 |
123 | equals($input.val(), 'ac', 'input value was correctly set')
124 | ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
125 |
126 | typeahead.$menu.remove()
127 | })
128 | })
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-carousel.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-carousel.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#carousel
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function( $ ){
22 |
23 | "use strict"
24 |
25 | /* CAROUSEL CLASS DEFINITION
26 | * ========================= */
27 |
28 | var Carousel = function (element, options) {
29 | this.$element = $(element)
30 | this.options = $.extend({}, $.fn.carousel.defaults, options)
31 | this.options.slide && this.slide(this.options.slide)
32 | }
33 |
34 | Carousel.prototype = {
35 |
36 | cycle: function () {
37 | this.interval = setInterval($.proxy(this.next, this), this.options.interval)
38 | return this
39 | }
40 |
41 | , to: function (pos) {
42 | var $active = this.$element.find('.active')
43 | , children = $active.parent().children()
44 | , activePos = children.index($active)
45 | , that = this
46 |
47 | if (pos > (children.length - 1) || pos < 0) return
48 |
49 | if (this.sliding) {
50 | return this.$element.one('slid', function () {
51 | that.to(pos)
52 | })
53 | }
54 |
55 | if (activePos == pos) {
56 | return this.pause().cycle()
57 | }
58 |
59 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
60 | }
61 |
62 | , pause: function () {
63 | clearInterval(this.interval)
64 | this.interval = null
65 | return this
66 | }
67 |
68 | , next: function () {
69 | if (this.sliding) return
70 | return this.slide('next')
71 | }
72 |
73 | , prev: function () {
74 | if (this.sliding) return
75 | return this.slide('prev')
76 | }
77 |
78 | , slide: function (type, next) {
79 | var $active = this.$element.find('.active')
80 | , $next = next || $active[type]()
81 | , isCycling = this.interval
82 | , direction = type == 'next' ? 'left' : 'right'
83 | , fallback = type == 'next' ? 'first' : 'last'
84 | , that = this
85 |
86 | if (!$next.length) return
87 |
88 | this.sliding = true
89 |
90 | isCycling && this.pause()
91 |
92 | $next = $next.length ? $next : this.$element.find('.item')[fallback]()
93 |
94 | if (!$.support.transition && this.$element.hasClass('slide')) {
95 | this.$element.trigger('slide')
96 | $active.removeClass('active')
97 | $next.addClass('active')
98 | this.sliding = false
99 | this.$element.trigger('slid')
100 | } else {
101 | $next.addClass(type)
102 | $next[0].offsetWidth // force reflow
103 | $active.addClass(direction)
104 | $next.addClass(direction)
105 | this.$element.trigger('slide')
106 | this.$element.one($.support.transition.end, function () {
107 | $next.removeClass([type, direction].join(' ')).addClass('active')
108 | $active.removeClass(['active', direction].join(' '))
109 | that.sliding = false
110 | setTimeout(function () { that.$element.trigger('slid') }, 0)
111 | })
112 | }
113 |
114 | isCycling && this.cycle()
115 |
116 | return this
117 | }
118 |
119 | }
120 |
121 |
122 | /* CAROUSEL PLUGIN DEFINITION
123 | * ========================== */
124 |
125 | $.fn.carousel = function ( option ) {
126 | return this.each(function () {
127 | var $this = $(this)
128 | , data = $this.data('carousel')
129 | , options = typeof option == 'object' && option
130 | if (!data) $this.data('carousel', (data = new Carousel(this, options)))
131 | if (typeof option == 'number') data.to(option)
132 | else if (typeof option == 'string' || (option = options.slide)) data[option]()
133 | else data.cycle()
134 | })
135 | }
136 |
137 | $.fn.carousel.defaults = {
138 | interval: 5000
139 | }
140 |
141 | $.fn.carousel.Constructor = Carousel
142 |
143 |
144 | /* CAROUSEL DATA-API
145 | * ================= */
146 |
147 | $(function () {
148 | $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
149 | var $this = $(this), href
150 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
151 | , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
152 | $target.carousel(options)
153 | e.preventDefault()
154 | })
155 | })
156 |
157 | }( window.jQuery );
--------------------------------------------------------------------------------
/js/lib/bootstrap/tests/vendor/qunit.css:
--------------------------------------------------------------------------------
1 | /**
2 | * QUnit - A JavaScript Unit Testing Framework
3 | *
4 | * http://docs.jquery.com/QUnit
5 | *
6 | * Copyright (c) 2012 John Resig, Jörn Zaefferer
7 | * Dual licensed under the MIT (MIT-LICENSE.txt)
8 | * or GPL (GPL-LICENSE.txt) licenses.
9 | */
10 |
11 | /** Font Family and Sizes */
12 |
13 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
14 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
15 | }
16 |
17 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
18 | #qunit-tests { font-size: smaller; }
19 |
20 |
21 | /** Resets */
22 |
23 | #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
24 | margin: 0;
25 | padding: 0;
26 | }
27 |
28 |
29 | /** Header */
30 |
31 | #qunit-header {
32 | padding: 0.5em 0 0.5em 1em;
33 |
34 | color: #8699a4;
35 | background-color: #0d3349;
36 |
37 | font-size: 1.5em;
38 | line-height: 1em;
39 | font-weight: normal;
40 |
41 | border-radius: 15px 15px 0 0;
42 | -moz-border-radius: 15px 15px 0 0;
43 | -webkit-border-top-right-radius: 15px;
44 | -webkit-border-top-left-radius: 15px;
45 | }
46 |
47 | #qunit-header a {
48 | text-decoration: none;
49 | color: #c2ccd1;
50 | }
51 |
52 | #qunit-header a:hover,
53 | #qunit-header a:focus {
54 | color: #fff;
55 | }
56 |
57 | #qunit-banner {
58 | height: 5px;
59 | }
60 |
61 | #qunit-testrunner-toolbar {
62 | padding: 0.5em 0 0.5em 2em;
63 | color: #5E740B;
64 | background-color: #eee;
65 | }
66 |
67 | #qunit-userAgent {
68 | padding: 0.5em 0 0.5em 2.5em;
69 | background-color: #2b81af;
70 | color: #fff;
71 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
72 | }
73 |
74 |
75 | /** Tests: Pass/Fail */
76 |
77 | #qunit-tests {
78 | list-style-position: inside;
79 | }
80 |
81 | #qunit-tests li {
82 | padding: 0.4em 0.5em 0.4em 2.5em;
83 | border-bottom: 1px solid #fff;
84 | list-style-position: inside;
85 | }
86 |
87 | #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
88 | display: none;
89 | }
90 |
91 | #qunit-tests li strong {
92 | cursor: pointer;
93 | }
94 |
95 | #qunit-tests li a {
96 | padding: 0.5em;
97 | color: #c2ccd1;
98 | text-decoration: none;
99 | }
100 | #qunit-tests li a:hover,
101 | #qunit-tests li a:focus {
102 | color: #000;
103 | }
104 |
105 | #qunit-tests ol {
106 | margin-top: 0.5em;
107 | padding: 0.5em;
108 |
109 | background-color: #fff;
110 |
111 | border-radius: 15px;
112 | -moz-border-radius: 15px;
113 | -webkit-border-radius: 15px;
114 |
115 | box-shadow: inset 0px 2px 13px #999;
116 | -moz-box-shadow: inset 0px 2px 13px #999;
117 | -webkit-box-shadow: inset 0px 2px 13px #999;
118 | }
119 |
120 | #qunit-tests table {
121 | border-collapse: collapse;
122 | margin-top: .2em;
123 | }
124 |
125 | #qunit-tests th {
126 | text-align: right;
127 | vertical-align: top;
128 | padding: 0 .5em 0 0;
129 | }
130 |
131 | #qunit-tests td {
132 | vertical-align: top;
133 | }
134 |
135 | #qunit-tests pre {
136 | margin: 0;
137 | white-space: pre-wrap;
138 | word-wrap: break-word;
139 | }
140 |
141 | #qunit-tests del {
142 | background-color: #e0f2be;
143 | color: #374e0c;
144 | text-decoration: none;
145 | }
146 |
147 | #qunit-tests ins {
148 | background-color: #ffcaca;
149 | color: #500;
150 | text-decoration: none;
151 | }
152 |
153 | /*** Test Counts */
154 |
155 | #qunit-tests b.counts { color: black; }
156 | #qunit-tests b.passed { color: #5E740B; }
157 | #qunit-tests b.failed { color: #710909; }
158 |
159 | #qunit-tests li li {
160 | margin: 0.5em;
161 | padding: 0.4em 0.5em 0.4em 0.5em;
162 | background-color: #fff;
163 | border-bottom: none;
164 | list-style-position: inside;
165 | }
166 |
167 | /*** Passing Styles */
168 |
169 | #qunit-tests li li.pass {
170 | color: #5E740B;
171 | background-color: #fff;
172 | border-left: 26px solid #C6E746;
173 | }
174 |
175 | #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
176 | #qunit-tests .pass .test-name { color: #366097; }
177 |
178 | #qunit-tests .pass .test-actual,
179 | #qunit-tests .pass .test-expected { color: #999999; }
180 |
181 | #qunit-banner.qunit-pass { background-color: #C6E746; }
182 |
183 | /*** Failing Styles */
184 |
185 | #qunit-tests li li.fail {
186 | color: #710909;
187 | background-color: #fff;
188 | border-left: 26px solid #EE5757;
189 | white-space: pre;
190 | }
191 |
192 | #qunit-tests > li:last-child {
193 | border-radius: 0 0 15px 15px;
194 | -moz-border-radius: 0 0 15px 15px;
195 | -webkit-border-bottom-right-radius: 15px;
196 | -webkit-border-bottom-left-radius: 15px;
197 | }
198 |
199 | #qunit-tests .fail { color: #000000; background-color: #EE5757; }
200 | #qunit-tests .fail .test-name,
201 | #qunit-tests .fail .module-name { color: #000000; }
202 |
203 | #qunit-tests .fail .test-actual { color: #EE5757; }
204 | #qunit-tests .fail .test-expected { color: green; }
205 |
206 | #qunit-banner.qunit-fail { background-color: #EE5757; }
207 |
208 |
209 | /** Result */
210 |
211 | #qunit-testresult {
212 | padding: 0.5em 0.5em 0.5em 2.5em;
213 |
214 | color: #2b81af;
215 | background-color: #D2E0E6;
216 |
217 | border-bottom: 1px solid white;
218 | }
219 |
220 | /** Fixture */
221 |
222 | #qunit-fixture {
223 | position: absolute;
224 | top: -10000px;
225 | left: -10000px;
226 | }
227 |
228 | /** Runoff */
229 |
230 | #qunit-fixture {
231 | display:none;
232 | }
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-modal.js:
--------------------------------------------------------------------------------
1 | /* =========================================================
2 | * bootstrap-modal.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#modals
4 | * =========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================= */
19 |
20 |
21 | !function( $ ){
22 |
23 | "use strict"
24 |
25 | /* MODAL CLASS DEFINITION
26 | * ====================== */
27 |
28 | var Modal = function ( content, options ) {
29 | this.options = options
30 | this.$element = $(content)
31 | .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
32 | }
33 |
34 | Modal.prototype = {
35 |
36 | constructor: Modal
37 |
38 | , toggle: function () {
39 | return this[!this.isShown ? 'show' : 'hide']()
40 | }
41 |
42 | , show: function () {
43 | var that = this
44 |
45 | if (this.isShown) return
46 |
47 | $('body').addClass('modal-open')
48 |
49 | this.isShown = true
50 | this.$element.trigger('show')
51 |
52 | escape.call(this)
53 | backdrop.call(this, function () {
54 | var transition = $.support.transition && that.$element.hasClass('fade')
55 |
56 | !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position
57 |
58 | that.$element
59 | .show()
60 |
61 | if (transition) {
62 | that.$element[0].offsetWidth // force reflow
63 | }
64 |
65 | that.$element.addClass('in')
66 |
67 | transition ?
68 | that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
69 | that.$element.trigger('shown')
70 |
71 | })
72 | }
73 |
74 | , hide: function ( e ) {
75 | e && e.preventDefault()
76 |
77 | if (!this.isShown) return
78 |
79 | var that = this
80 | this.isShown = false
81 |
82 | $('body').removeClass('modal-open')
83 |
84 | escape.call(this)
85 |
86 | this.$element
87 | .trigger('hide')
88 | .removeClass('in')
89 |
90 | $.support.transition && this.$element.hasClass('fade') ?
91 | hideWithTransition.call(this) :
92 | hideModal.call(this)
93 | }
94 |
95 | }
96 |
97 |
98 | /* MODAL PRIVATE METHODS
99 | * ===================== */
100 |
101 | function hideWithTransition() {
102 | var that = this
103 | , timeout = setTimeout(function () {
104 | that.$element.off($.support.transition.end)
105 | hideModal.call(that)
106 | }, 500)
107 |
108 | this.$element.one($.support.transition.end, function () {
109 | clearTimeout(timeout)
110 | hideModal.call(that)
111 | })
112 | }
113 |
114 | function hideModal( that ) {
115 | this.$element
116 | .hide()
117 | .trigger('hidden')
118 |
119 | backdrop.call(this)
120 | }
121 |
122 | function backdrop( callback ) {
123 | var that = this
124 | , animate = this.$element.hasClass('fade') ? 'fade' : ''
125 |
126 | if (this.isShown && this.options.backdrop) {
127 | var doAnimate = $.support.transition && animate
128 |
129 | this.$backdrop = $('')
130 | .appendTo(document.body)
131 |
132 | if (this.options.backdrop != 'static') {
133 | this.$backdrop.click($.proxy(this.hide, this))
134 | }
135 |
136 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
137 |
138 | this.$backdrop.addClass('in')
139 |
140 | doAnimate ?
141 | this.$backdrop.one($.support.transition.end, callback) :
142 | callback()
143 |
144 | } else if (!this.isShown && this.$backdrop) {
145 | this.$backdrop.removeClass('in')
146 |
147 | $.support.transition && this.$element.hasClass('fade')?
148 | this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
149 | removeBackdrop.call(this)
150 |
151 | } else if (callback) {
152 | callback()
153 | }
154 | }
155 |
156 | function removeBackdrop() {
157 | this.$backdrop.remove()
158 | this.$backdrop = null
159 | }
160 |
161 | function escape() {
162 | var that = this
163 | if (this.isShown && this.options.keyboard) {
164 | $(document).on('keyup.dismiss.modal', function ( e ) {
165 | e.which == 27 && that.hide()
166 | })
167 | } else if (!this.isShown) {
168 | $(document).off('keyup.dismiss.modal')
169 | }
170 | }
171 |
172 |
173 | /* MODAL PLUGIN DEFINITION
174 | * ======================= */
175 |
176 | $.fn.modal = function ( option ) {
177 | return this.each(function () {
178 | var $this = $(this)
179 | , data = $this.data('modal')
180 | , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
181 | if (!data) $this.data('modal', (data = new Modal(this, options)))
182 | if (typeof option == 'string') data[option]()
183 | else if (options.show) data.show()
184 | })
185 | }
186 |
187 | $.fn.modal.defaults = {
188 | backdrop: true
189 | , keyboard: true
190 | , show: true
191 | }
192 |
193 | $.fn.modal.Constructor = Modal
194 |
195 |
196 | /* MODAL DATA-API
197 | * ============== */
198 |
199 | $(function () {
200 | $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
201 | var $this = $(this), href
202 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
203 | , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
204 |
205 | e.preventDefault()
206 | $target.modal(option)
207 | })
208 | })
209 |
210 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/navbar.less:
--------------------------------------------------------------------------------
1 | // NAVBAR (FIXED AND STATIC)
2 | // -------------------------
3 |
4 |
5 | // COMMON STYLES
6 | // -------------
7 |
8 | .navbar {
9 | overflow: visible;
10 | margin-bottom: @baseLineHeight;
11 | }
12 |
13 | // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
14 | .navbar-inner {
15 | padding-left: 20px;
16 | padding-right: 20px;
17 | #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
18 | .border-radius(4px);
19 | @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
20 | .box-shadow(@shadow);
21 | }
22 |
23 | // Navbar button for toggling navbar items in responsive layouts
24 | .btn-navbar {
25 | display: none;
26 | float: right;
27 | padding: 7px 10px;
28 | margin-left: 5px;
29 | margin-right: 5px;
30 | .buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
31 | @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
32 | .box-shadow(@shadow);
33 | }
34 | .btn-navbar .icon-bar {
35 | display: block;
36 | width: 18px;
37 | height: 2px;
38 | background-color: #f5f5f5;
39 | .border-radius(1px);
40 | .box-shadow(0 1px 0 rgba(0,0,0,.25));
41 | }
42 | .btn-navbar .icon-bar + .icon-bar {
43 | margin-top: 3px;
44 | }
45 | // Override the default collapsed state
46 | .nav-collapse.collapse {
47 | height: auto;
48 | }
49 |
50 |
51 | // Brand, links, text, and buttons
52 | .navbar {
53 | // Hover and active states
54 | .brand:hover {
55 | text-decoration: none;
56 | }
57 | // Website or project name
58 | .brand {
59 | float: left;
60 | display: block;
61 | padding: 8px 20px 12px;
62 | margin-left: -20px; // negative indent to left-align the text down the page
63 | font-size: 20px;
64 | font-weight: 200;
65 | line-height: 1;
66 | color: @white;
67 | }
68 | // Plain text in topbar
69 | .navbar-text {
70 | margin-bottom: 0;
71 | line-height: 40px;
72 | color: @navbarText;
73 | a:hover {
74 | color: @white;
75 | background-color: transparent;
76 | }
77 | }
78 | // Buttons in navbar
79 | .btn,
80 | .btn-group {
81 | margin-top: 5px; // make buttons vertically centered in navbar
82 | }
83 | .btn-group .btn {
84 | margin-top: 0; // then undo the margin here so we don't accidentally double it
85 | }
86 | }
87 |
88 | // Navbar forms
89 | .navbar-form {
90 | margin-bottom: 0; // remove default bottom margin
91 | .clearfix();
92 | input,
93 | select {
94 | display: inline-block;
95 | margin-top: 5px;
96 | margin-bottom: 0;
97 | }
98 | .radio,
99 | .checkbox {
100 | margin-top: 5px;
101 | }
102 | input[type="image"],
103 | input[type="checkbox"],
104 | input[type="radio"] {
105 | margin-top: 3px;
106 | }
107 | .input-append,
108 | .input-prepend {
109 | margin-top: 6px;
110 | white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
111 | input {
112 | margin-top: 0; // remove the margin on top since it's on the parent
113 | }
114 | }
115 | }
116 |
117 | // Navbar search
118 | .navbar-search {
119 | position: relative;
120 | float: left;
121 | margin-top: 6px;
122 | margin-bottom: 0;
123 | .search-query {
124 | padding: 4px 9px;
125 | #font > .sans-serif(13px, normal, 1);
126 | color: @white;
127 | color: rgba(255,255,255,.75);
128 | background: #666;
129 | background: rgba(255,255,255,.3);
130 | border: 1px solid #111;
131 | @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
132 | .box-shadow(@shadow);
133 | .transition(none);
134 |
135 | // Placeholder text gets special styles; can't be bundled together though for some reason
136 | .placeholder(@grayLighter);
137 |
138 | // Hover states
139 | &:hover {
140 | color: @white;
141 | background-color: @grayLight;
142 | background-color: rgba(255,255,255,.5);
143 | }
144 | // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
145 | &:focus,
146 | &.focused {
147 | padding: 5px 10px;
148 | color: @grayDark;
149 | text-shadow: 0 1px 0 @white;
150 | background-color: @white;
151 | border: 0;
152 | .box-shadow(0 0 3px rgba(0,0,0,.15));
153 | outline: 0;
154 | }
155 | }
156 | }
157 |
158 |
159 | // FIXED NAVBAR
160 | // ------------
161 |
162 | .navbar-fixed-top {
163 | position: fixed;
164 | top: 0;
165 | right: 0;
166 | left: 0;
167 | z-index: @zindexFixedNavbar;
168 | }
169 | .navbar-fixed-top .navbar-inner {
170 | padding-left: 0;
171 | padding-right: 0;
172 | .border-radius(0);
173 | }
174 |
175 |
176 | // NAVIGATION
177 | // ----------
178 |
179 | .navbar .nav {
180 | position: relative;
181 | left: 0;
182 | display: block;
183 | float: left;
184 | margin: 0 10px 0 0;
185 | }
186 | .navbar .nav.pull-right {
187 | float: right; // redeclare due to specificity
188 | }
189 | .navbar .nav > li {
190 | display: block;
191 | float: left;
192 | }
193 |
194 | // Links
195 | .navbar .nav > li > a {
196 | float: none;
197 | padding: 10px 10px 11px;
198 | line-height: 19px;
199 | color: @navbarLinkColor;
200 | text-decoration: none;
201 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
202 | }
203 | // Hover
204 | .navbar .nav > li > a:hover {
205 | background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
206 | color: @navbarLinkColorHover;
207 | text-decoration: none;
208 | }
209 |
210 | // Active nav items
211 | .navbar .nav .active > a,
212 | .navbar .nav .active > a:hover {
213 | color: @navbarLinkColorHover;
214 | text-decoration: none;
215 | background-color: @navbarBackground;
216 | }
217 |
218 | // Dividers (basically a vertical hr)
219 | .navbar .divider-vertical {
220 | height: @navbarHeight;
221 | width: 1px;
222 | margin: 0 9px;
223 | overflow: hidden;
224 | background-color: @navbarBackground;
225 | border-right: 1px solid @navbarBackgroundHighlight;
226 | }
227 |
228 | // Secondary (floated right) nav in topbar
229 | .navbar .nav.pull-right {
230 | margin-left: 10px;
231 | margin-right: 0;
232 | }
233 |
234 |
235 |
236 | // Dropdown menus
237 | // --------------
238 |
239 | // Menu position and menu carets
240 | .navbar .dropdown-menu {
241 | margin-top: 1px;
242 | .border-radius(4px);
243 | &:before {
244 | content: '';
245 | display: inline-block;
246 | border-left: 7px solid transparent;
247 | border-right: 7px solid transparent;
248 | border-bottom: 7px solid #ccc;
249 | border-bottom-color: rgba(0,0,0,.2);
250 | position: absolute;
251 | top: -7px;
252 | left: 9px;
253 | }
254 | &:after {
255 | content: '';
256 | display: inline-block;
257 | border-left: 6px solid transparent;
258 | border-right: 6px solid transparent;
259 | border-bottom: 6px solid @white;
260 | position: absolute;
261 | top: -6px;
262 | left: 10px;
263 | }
264 | }
265 |
266 | // Dropdown toggle caret
267 | .navbar .nav .dropdown-toggle .caret,
268 | .navbar .nav .open.dropdown .caret {
269 | border-top-color: @white;
270 | }
271 | .navbar .nav .active .caret {
272 | .opacity(100);
273 | }
274 |
275 | // Remove background color from open dropdown
276 | .navbar .nav .open > .dropdown-toggle,
277 | .navbar .nav .active > .dropdown-toggle,
278 | .navbar .nav .open.active > .dropdown-toggle {
279 | background-color: transparent;
280 | }
281 |
282 | // Dropdown link on hover
283 | .navbar .nav .active > .dropdown-toggle:hover {
284 | color: @white;
285 | }
286 |
287 | // Right aligned menus need alt position
288 | .navbar .nav.pull-right .dropdown-menu {
289 | left: auto;
290 | right: 0;
291 | &:before {
292 | left: auto;
293 | right: 12px;
294 | }
295 | &:after {
296 | left: auto;
297 | right: 13px;
298 | }
299 | }
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-typeahead.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-typeahead.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#typeahead
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 | !function( $ ){
21 |
22 | "use strict"
23 |
24 | var Typeahead = function ( element, options ) {
25 | this.$element = $(element)
26 | this.options = $.extend({}, $.fn.typeahead.defaults, options)
27 | this.matcher = this.options.matcher || this.matcher
28 | this.sorter = this.options.sorter || this.sorter
29 | this.highlighter = this.options.highlighter || this.highlighter
30 | this.$menu = $(this.options.menu).appendTo('body')
31 | this.source = this.options.source
32 | this.shown = false
33 | this.listen()
34 | }
35 |
36 | Typeahead.prototype = {
37 |
38 | constructor: Typeahead
39 |
40 | , select: function () {
41 | var val = this.$menu.find('.active').attr('data-value')
42 | this.$element.val(val)
43 | return this.hide()
44 | }
45 |
46 | , show: function () {
47 | var pos = $.extend({}, this.$element.offset(), {
48 | height: this.$element[0].offsetHeight
49 | })
50 |
51 | this.$menu.css({
52 | top: pos.top + pos.height
53 | , left: pos.left
54 | })
55 |
56 | this.$menu.show()
57 | this.shown = true
58 | return this
59 | }
60 |
61 | , hide: function () {
62 | this.$menu.hide()
63 | this.shown = false
64 | return this
65 | }
66 |
67 | , lookup: function (event) {
68 | var that = this
69 | , items
70 | , q
71 |
72 | this.query = this.$element.val()
73 |
74 | if (!this.query) {
75 | return this.shown ? this.hide() : this
76 | }
77 |
78 | items = $.grep(this.source, function (item) {
79 | if (that.matcher(item)) return item
80 | })
81 |
82 | items = this.sorter(items)
83 |
84 | if (!items.length) {
85 | return this.shown ? this.hide() : this
86 | }
87 |
88 | return this.render(items.slice(0, this.options.items)).show()
89 | }
90 |
91 | , matcher: function (item) {
92 | return ~item.toLowerCase().indexOf(this.query.toLowerCase())
93 | }
94 |
95 | , sorter: function (items) {
96 | var beginswith = []
97 | , caseSensitive = []
98 | , caseInsensitive = []
99 | , item
100 |
101 | while (item = items.shift()) {
102 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
103 | else if (~item.indexOf(this.query)) caseSensitive.push(item)
104 | else caseInsensitive.push(item)
105 | }
106 |
107 | return beginswith.concat(caseSensitive, caseInsensitive)
108 | }
109 |
110 | , highlighter: function (item) {
111 | return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
112 | return '' + match + ''
113 | })
114 | }
115 |
116 | , render: function (items) {
117 | var that = this
118 |
119 | items = $(items).map(function (i, item) {
120 | i = $(that.options.item).attr('data-value', item)
121 | i.find('a').html(that.highlighter(item))
122 | return i[0]
123 | })
124 |
125 | items.first().addClass('active')
126 | this.$menu.html(items)
127 | return this
128 | }
129 |
130 | , next: function (event) {
131 | var active = this.$menu.find('.active').removeClass('active')
132 | , next = active.next()
133 |
134 | if (!next.length) {
135 | next = $(this.$menu.find('li')[0])
136 | }
137 |
138 | next.addClass('active')
139 | }
140 |
141 | , prev: function (event) {
142 | var active = this.$menu.find('.active').removeClass('active')
143 | , prev = active.prev()
144 |
145 | if (!prev.length) {
146 | prev = this.$menu.find('li').last()
147 | }
148 |
149 | prev.addClass('active')
150 | }
151 |
152 | , listen: function () {
153 | this.$element
154 | .on('blur', $.proxy(this.blur, this))
155 | .on('keypress', $.proxy(this.keypress, this))
156 | .on('keyup', $.proxy(this.keyup, this))
157 |
158 | if ($.browser.webkit || $.browser.msie) {
159 | this.$element.on('keydown', $.proxy(this.keypress, this))
160 | }
161 |
162 | this.$menu
163 | .on('click', $.proxy(this.click, this))
164 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
165 | }
166 |
167 | , keyup: function (e) {
168 | e.stopPropagation()
169 | e.preventDefault()
170 |
171 | switch(e.keyCode) {
172 | case 40: // down arrow
173 | case 38: // up arrow
174 | break
175 |
176 | case 9: // tab
177 | case 13: // enter
178 | if (!this.shown) return
179 | this.select()
180 | break
181 |
182 | case 27: // escape
183 | this.hide()
184 | break
185 |
186 | default:
187 | this.lookup()
188 | }
189 |
190 | }
191 |
192 | , keypress: function (e) {
193 | e.stopPropagation()
194 | if (!this.shown) return
195 |
196 | switch(e.keyCode) {
197 | case 9: // tab
198 | case 13: // enter
199 | case 27: // escape
200 | e.preventDefault()
201 | break
202 |
203 | case 38: // up arrow
204 | e.preventDefault()
205 | this.prev()
206 | break
207 |
208 | case 40: // down arrow
209 | e.preventDefault()
210 | this.next()
211 | break
212 | }
213 | }
214 |
215 | , blur: function (e) {
216 | var that = this
217 | e.stopPropagation()
218 | e.preventDefault()
219 | setTimeout(function () { that.hide() }, 150)
220 | }
221 |
222 | , click: function (e) {
223 | e.stopPropagation()
224 | e.preventDefault()
225 | this.select()
226 | }
227 |
228 | , mouseenter: function (e) {
229 | this.$menu.find('.active').removeClass('active')
230 | $(e.currentTarget).addClass('active')
231 | }
232 |
233 | }
234 |
235 |
236 | /* TYPEAHEAD PLUGIN DEFINITION
237 | * =========================== */
238 |
239 | $.fn.typeahead = function ( option ) {
240 | return this.each(function () {
241 | var $this = $(this)
242 | , data = $this.data('typeahead')
243 | , options = typeof option == 'object' && option
244 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
245 | if (typeof option == 'string') data[option]()
246 | })
247 | }
248 |
249 | $.fn.typeahead.defaults = {
250 | source: []
251 | , items: 8
252 | , menu: ''
253 | , item: ' '
254 | }
255 |
256 | $.fn.typeahead.Constructor = Typeahead
257 |
258 |
259 | /* TYPEAHEAD DATA-API
260 | * ================== */
261 |
262 | $(function () {
263 | $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
264 | var $this = $(this)
265 | if ($this.data('typeahead')) return
266 | e.preventDefault()
267 | $this.typeahead($this.data())
268 | })
269 | })
270 |
271 | }( window.jQuery );
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | JS_SRC = "js/src"
2 | JS_LIB = "js/lib"
3 | JS_BIN = "js/bin"
4 |
5 | CSS_SRC = "css/src"
6 | CSS_LIB = "css/lib"
7 | CSS_BIN = "css/bin"
8 |
9 | # Compiles scripts
10 | def installed?(program)
11 | cmd = "which #{program}"
12 | File.executable?(`#{cmd}`.strip)
13 | end
14 |
15 | desc 'Runs all javascript and css related jobs'
16 | task :default do
17 | Rake::Task['js'].invoke
18 | # Rake::Task['minify'].invoke
19 | Rake::Task['css'].invoke
20 | puts "==== DONE ===="
21 | end
22 |
23 | task :watch do
24 | Rake::Task['js'].invoke
25 | Rake::Task['minify'].invoke
26 | Rake::Task['css'].invoke
27 | begin
28 | require 'watchr'
29 | script = Watchr::Script.new
30 | script.watch('(js|css)/(src|lib)/.*') { system 'rake' }
31 | contrl = Watchr::Controller.new(script, Watchr.handler.new)
32 | contrl.run
33 | rescue LoadError
34 | fail "You need watchr! Install it by running `gem install watchr`"
35 | end
36 | end
37 |
38 |
39 | def compileSubFolder()
40 | Dir["#{JS_SRC}/*/"].each do |d|
41 | dname = d.strip.split("/")[-1]
42 | # We need to clear the file before building it again
43 | File.delete "#{JS_BIN}/#{dname}.js" if File.exists? "#{JS_BIN}/#{dname}.js"
44 | line_num = 0
45 | num_files = FileList["#{d}*.coffee"].size + FileList["#{d}*.js"].size
46 |
47 | # Concatenate in the order of the 'ORDERING' file
48 | if File.exist? "#{d}ORDERING"
49 | js_files = []
50 | coffee_files = []
51 | file = File.new("#{d}ORDERING", 'r')
52 | file.each_line("\n") do |l|
53 | l = l.strip
54 | if l == "" then next end
55 |
56 | extension = l.split('.')[-1].downcase
57 | if extension == "coffee"
58 | coffee_files << l
59 | elsif extension == "js"
60 | js_files << l
61 | else
62 | $stderr.puts "XXX> WARNING! #{l} must have a valid *.coffee or *.js ending"
63 | end
64 | line_num += 1
65 | end
66 |
67 | if num_files != line_num
68 | $stderr.puts "XXX> WARNING! The number of files in #{dname} does not match the number in 'ORDERING'. You may be forgetting to concatenate some."
69 | end
70 |
71 | if not js_files.empty?
72 | puts "---> Using ORDERING file to concatenate JAVASCRIPT files inside of #{dname} to #{dname}.js"
73 | end
74 |
75 | for js_file in js_files
76 | puts " #{dname}.js <--- #{dname}/#{js_file}"
77 | if File.exists? "#{JS_BIN}/#{dname}.js"
78 | `cat #{d}#{js_file} >> #{JS_BIN}/#{dname}.js`
79 | else
80 | `cat #{d}#{js_file} > #{JS_BIN}/#{dname}.js`
81 | end
82 | end
83 |
84 | if not coffee_files.empty?
85 | puts "---> Using ORDERING file to concatenate COFFEESCRIPT files inside of #{dname} to #{dname}.js"
86 | end
87 |
88 | `rm -rf #{d}tmp/` if File.directory? "#{d}tmp/"
89 | for coffee_file in coffee_files
90 | puts " #{dname}.js <--- #{dname}/#{coffee_file}"
91 | `coffee --compile --output #{d}tmp/ #{d}#{coffee_file}`
92 | fname_arr = coffee_file.split(".")
93 | fname_arr.slice!(-1)
94 | fname = fname_arr.join(".")
95 |
96 | if File.exists? "#{JS_BIN}/#{dname}.js"
97 | `cat #{d}tmp/#{fname}.js >> #{JS_BIN}/#{dname}.js`
98 | else
99 | `cat #{d}tmp/#{fname}.js > #{JS_BIN}/#{dname}.js`
100 | end
101 | end
102 | `rm -rf #{d}tmp/`
103 |
104 | # Otherwise simply concatenate in the order of directory listing
105 | else
106 | js_files = FileList["#{d}*.js"]
107 | if js_files.any?
108 | puts "---> Concatenating all javascript files inside of #{dname} to #{dname}.js"
109 | for js_file in js_files
110 | puts " #{dname}.js <--- #{dname}/#{js_file.split("/")[-1]}"
111 | end
112 | `cat #{d}*.js > #{JS_BIN}/#{dname}.js`
113 | end
114 | coffee_files = FileList["#{d}*.coffee"]
115 | if coffee_files.any?
116 | if installed? "coffee"
117 | puts "---> Concatenating all coffeescript files inside of #{dname} then compiling to #{dname}.js"
118 | for coffee_file in coffee_files
119 | puts " #{dname}.js <--- #{dname}/#{coffee_file.split("/")[-1]}"
120 | end
121 | `coffee --join #{JS_BIN}/#{dname}.js --compile #{d}*.coffee`
122 | else
123 | fail "You need coffeescript! Install it by running: `npm install -g coffee-script`"
124 | end
125 | end
126 | end
127 | end
128 | end
129 |
130 | desc 'Compiles, and concatenates javascript and coffeescript'
131 | task :js do
132 | puts "\n=== COMPILE JAVASCRIPT ==="
133 | ### COMPILE INDIVIDUAL FILES
134 | js_files = FileList["#{JS_SRC}/*.js"]
135 | if js_files.any?
136 | puts "---> Copying over raw javascript files"
137 | `cp #{JS_SRC}/*.js #{JS_BIN}/`
138 | for js_file in js_files
139 | js_file = js_file.split("/")[-1]
140 | puts " #{js_file}.js <--- #{js_file}.js"
141 | end
142 | end
143 |
144 | coffee_files = FileList["#{JS_SRC}/*.coffee"]
145 | if coffee_files.any?
146 | if installed? "coffee"
147 | puts "---> Compiling individual coffeescript files"
148 | `coffee -c -o #{JS_BIN}/ #{JS_SRC}/*.coffee`
149 | for coffee_file in coffee_files
150 | coffee_file = coffee_file.split("/")[-1]
151 | puts " #{coffee_file}.js <--- #{coffee_file}.coffee"
152 | end
153 | else
154 | fail "You need coffeescript! Install it by running: `npm install -g coffee-script`"
155 | end
156 | end
157 |
158 | ### COMPILE SUB FOLDERS
159 | compileSubFolder()
160 |
161 | end
162 |
163 | desc 'Minify all javascript files'
164 | task :minify do
165 | puts "\n=== MINIFY JAVASCRIPT ==="
166 | puts "---> Minifying all javascript files"
167 | FileList["#{JS_BIN}/*.js"].each do |f|
168 | fname = f.strip.split("/")[-1]
169 | # Don't minify things that are already minified!
170 | if fname.split(".")[-2] != "min"
171 | if installed? "uglifyjs"
172 | min_name = fname.insert(fname.rindex(".js"), ".min")
173 | puts " Minifying #{f.strip.split("/")[-1]} to #{min_name}"
174 | `uglifyjs -o #{JS_BIN}/#{min_name} #{f}`
175 | else
176 | fail "You need uglifyjs! Install it by running: `npm install -g uglify-js`"
177 | end
178 | end
179 | end
180 | end
181 |
182 | desc 'Compiles, concatenates, and minifies css, less, and sass'
183 | task :css do
184 | puts "\n=== COMPILE CSS ==="
185 | if FileList["#{CSS_SRC}/*.css"].any?
186 | puts "---> Copying over raw css files"
187 | `cp #{CSS_SRC}/*.css #{CSS_BIN}/`
188 | end
189 |
190 | Dir["#{CSS_SRC}/*/"].each do |d|
191 | if FileList["#{d}*.css"].any?
192 | dname = d.strip.split("/")[-1]
193 | puts "---> Concatenating all css files inside of #{dname} to #{dname}.css"
194 | `cat #{d}*.css > #{CSS_BIN}/#{dname}.css`
195 | end
196 | if FileList["#{d}*.less"].any?
197 | fail "You should not concatenate less files. Use the @import directive instead and put extra less files in the 'lib' directory"
198 | end
199 | if FileList["#{d}*.scss"].any?
200 | fail "You should not concatenate scss files. Use the @import directive instead and put extra scss files in the 'lib' directory"
201 | end
202 | end
203 |
204 | if FileList["#{CSS_SRC}/*.less"].any?
205 | FileList["#{CSS_SRC}/*.less"].each do |f|
206 | fname = f.strip.split("/")[-1]
207 | if installed? "lessc"
208 | css_name = fname.sub(/\.less/, ".css")
209 | puts "---> Compiling #{fname} to #{css_name}"
210 | `lessc #{f} > #{CSS_BIN}/#{css_name}`
211 | else
212 | fail "You need less! Install it by running: `npm install -g less`"
213 | end
214 | end
215 | end
216 |
217 | if FileList["#{CSS_SRC}/*.scss"].any?
218 | FileList["#{CSS_SRC}/*.scss"].each do |f|
219 | fname = f.strip.split("/")[-1]
220 | if installed? "sass"
221 | css_name = fname.sub(/\.scss/, ".css")
222 | puts "---> Compiling #{fname} to #{css_name}"
223 | `sass #{f} > #{CSS_BIN}/#{css_name}`
224 | else
225 | fail "You need sass! Install it by running: `gem install sass`"
226 | end
227 | end
228 | end
229 | end
230 |
--------------------------------------------------------------------------------
/css/lib/navs.less:
--------------------------------------------------------------------------------
1 | // NAVIGATIONS
2 | // -----------
3 |
4 |
5 |
6 | // BASE CLASS
7 | // ----------
8 |
9 | .nav {
10 | margin-left: 0;
11 | margin-bottom: @baseLineHeight;
12 | list-style: none;
13 | }
14 |
15 | // Make links block level
16 | .nav > li > a {
17 | display: block;
18 | }
19 | .nav > li > a:hover {
20 | text-decoration: none;
21 | background-color: @grayLighter;
22 | }
23 |
24 | // Nav headers (for dropdowns and lists)
25 | .nav .nav-header {
26 | display: block;
27 | padding: 3px 15px;
28 | font-size: 11px;
29 | font-weight: bold;
30 | line-height: @baseLineHeight;
31 | color: @grayLight;
32 | text-shadow: 0 1px 0 rgba(255,255,255,.5);
33 | text-transform: uppercase;
34 | }
35 | // Space them out when they follow another list item (link)
36 | .nav li + .nav-header {
37 | margin-top: 9px;
38 | }
39 |
40 |
41 | // NAV LIST
42 | // --------
43 |
44 | .nav-list {
45 | padding-left: 14px;
46 | padding-right: 14px;
47 | margin-bottom: 0;
48 | }
49 | .nav-list > li > a,
50 | .nav-list .nav-header {
51 | margin-left: -15px;
52 | margin-right: -15px;
53 | text-shadow: 0 1px 0 rgba(255,255,255,.5);
54 | }
55 | .nav-list > li > a {
56 | padding: 3px 15px;
57 | }
58 | .nav-list .active > a,
59 | .nav-list .active > a:hover {
60 | color: @white;
61 | text-shadow: 0 -1px 0 rgba(0,0,0,.2);
62 | background-color: @linkColor;
63 | }
64 | .nav-list [class^="icon-"] {
65 | margin-right: 2px;
66 | }
67 |
68 |
69 |
70 | // TABS AND PILLS
71 | // -------------
72 |
73 | // Common styles
74 | .nav-tabs,
75 | .nav-pills {
76 | .clearfix();
77 | }
78 | .nav-tabs > li,
79 | .nav-pills > li {
80 | float: left;
81 | }
82 | .nav-tabs > li > a,
83 | .nav-pills > li > a {
84 | padding-right: 12px;
85 | padding-left: 12px;
86 | margin-right: 2px;
87 | line-height: 14px; // keeps the overall height an even number
88 | }
89 |
90 | // TABS
91 | // ----
92 |
93 | // Give the tabs something to sit on
94 | .nav-tabs {
95 | border-bottom: 1px solid #ddd;
96 | }
97 |
98 | // Make the list-items overlay the bottom border
99 | .nav-tabs > li {
100 | margin-bottom: -1px;
101 | }
102 |
103 | // Actual tabs (as links)
104 | .nav-tabs > li > a {
105 | padding-top: 9px;
106 | padding-bottom: 9px;
107 | border: 1px solid transparent;
108 | .border-radius(4px 4px 0 0);
109 | &:hover {
110 | border-color: @grayLighter @grayLighter #ddd;
111 | }
112 | }
113 | // Active state, and it's :hover to override normal :hover
114 | .nav-tabs > .active > a,
115 | .nav-tabs > .active > a:hover {
116 | color: @gray;
117 | background-color: @white;
118 | border: 1px solid #ddd;
119 | border-bottom-color: transparent;
120 | cursor: default;
121 | }
122 |
123 | // PILLS
124 | // -----
125 |
126 | // Links rendered as pills
127 | .nav-pills > li > a {
128 | padding-top: 8px;
129 | padding-bottom: 8px;
130 | margin-top: 2px;
131 | margin-bottom: 2px;
132 | .border-radius(5px);
133 | }
134 |
135 | // Active state
136 | .nav-pills .active > a,
137 | .nav-pills .active > a:hover {
138 | color: @white;
139 | background-color: @linkColor;
140 | }
141 |
142 |
143 |
144 | // STACKED NAV
145 | // -----------
146 |
147 | // Stacked tabs and pills
148 | .nav-stacked > li {
149 | float: none;
150 | }
151 | .nav-stacked > li > a {
152 | margin-right: 0; // no need for the gap between nav items
153 | }
154 |
155 | // Tabs
156 | .nav-tabs.nav-stacked {
157 | border-bottom: 0;
158 | }
159 | .nav-tabs.nav-stacked > li > a {
160 | border: 1px solid #ddd;
161 | .border-radius(0);
162 | }
163 | .nav-tabs.nav-stacked > li:first-child > a {
164 | .border-radius(4px 4px 0 0);
165 | }
166 | .nav-tabs.nav-stacked > li:last-child > a {
167 | .border-radius(0 0 4px 4px);
168 | }
169 | .nav-tabs.nav-stacked > li > a:hover {
170 | border-color: #ddd;
171 | z-index: 2;
172 | }
173 |
174 | // Pills
175 | .nav-pills.nav-stacked > li > a {
176 | margin-bottom: 3px;
177 | }
178 | .nav-pills.nav-stacked > li:last-child > a {
179 | margin-bottom: 1px; // decrease margin to match sizing of stacked tabs
180 | }
181 |
182 |
183 |
184 | // DROPDOWNS
185 | // ---------
186 |
187 | // Position the menu
188 | .nav-tabs .dropdown-menu,
189 | .nav-pills .dropdown-menu {
190 | margin-top: 1px;
191 | border-width: 1px;
192 | }
193 | .nav-pills .dropdown-menu {
194 | .border-radius(4px);
195 | }
196 |
197 | // Default dropdown links
198 | // -------------------------
199 | // Make carets use linkColor to start
200 | .nav-tabs .dropdown-toggle .caret,
201 | .nav-pills .dropdown-toggle .caret {
202 | border-top-color: @linkColor;
203 | margin-top: 6px;
204 | }
205 | .nav-tabs .dropdown-toggle:hover .caret,
206 | .nav-pills .dropdown-toggle:hover .caret {
207 | border-top-color: @linkColorHover;
208 | }
209 |
210 | // Active dropdown links
211 | // -------------------------
212 | .nav-tabs .active .dropdown-toggle .caret,
213 | .nav-pills .active .dropdown-toggle .caret {
214 | border-top-color: @grayDark;
215 | }
216 |
217 | // Active:hover dropdown links
218 | // -------------------------
219 | .nav > .dropdown.active > a:hover {
220 | color: @black;
221 | cursor: pointer;
222 | }
223 |
224 | // Open dropdowns
225 | // -------------------------
226 | .nav-tabs .open .dropdown-toggle,
227 | .nav-pills .open .dropdown-toggle,
228 | .nav > .open.active > a:hover {
229 | color: @white;
230 | background-color: @grayLight;
231 | border-color: @grayLight;
232 | }
233 | .nav .open .caret,
234 | .nav .open.active .caret,
235 | .nav .open a:hover .caret {
236 | border-top-color: @white;
237 | .opacity(100);
238 | }
239 |
240 | // Dropdowns in stacked tabs
241 | .tabs-stacked .open > a:hover {
242 | border-color: @grayLight;
243 | }
244 |
245 |
246 |
247 | // TABBABLE
248 | // --------
249 |
250 |
251 | // COMMON STYLES
252 | // -------------
253 |
254 | // Clear any floats
255 | .tabbable {
256 | .clearfix();
257 | }
258 | .tab-content {
259 | overflow: hidden; // prevent content from running below tabs
260 | }
261 |
262 | // Remove border on bottom, left, right
263 | .tabs-below .nav-tabs,
264 | .tabs-right .nav-tabs,
265 | .tabs-left .nav-tabs {
266 | border-bottom: 0;
267 | }
268 |
269 | // Show/hide tabbable areas
270 | .tab-content > .tab-pane,
271 | .pill-content > .pill-pane {
272 | display: none;
273 | }
274 | .tab-content > .active,
275 | .pill-content > .active {
276 | display: block;
277 | }
278 |
279 |
280 | // BOTTOM
281 | // ------
282 |
283 | .tabs-below .nav-tabs {
284 | border-top: 1px solid #ddd;
285 | }
286 | .tabs-below .nav-tabs > li {
287 | margin-top: -1px;
288 | margin-bottom: 0;
289 | }
290 | .tabs-below .nav-tabs > li > a {
291 | .border-radius(0 0 4px 4px);
292 | &:hover {
293 | border-bottom-color: transparent;
294 | border-top-color: #ddd;
295 | }
296 | }
297 | .tabs-below .nav-tabs .active > a,
298 | .tabs-below .nav-tabs .active > a:hover {
299 | border-color: transparent #ddd #ddd #ddd;
300 | }
301 |
302 | // LEFT & RIGHT
303 | // ------------
304 |
305 | // Common styles
306 | .tabs-left .nav-tabs > li,
307 | .tabs-right .nav-tabs > li {
308 | float: none;
309 | }
310 | .tabs-left .nav-tabs > li > a,
311 | .tabs-right .nav-tabs > li > a {
312 | min-width: 74px;
313 | margin-right: 0;
314 | margin-bottom: 3px;
315 | }
316 |
317 | // Tabs on the left
318 | .tabs-left .nav-tabs {
319 | float: left;
320 | margin-right: 19px;
321 | border-right: 1px solid #ddd;
322 | }
323 | .tabs-left .nav-tabs > li > a {
324 | margin-right: -1px;
325 | .border-radius(4px 0 0 4px);
326 | }
327 | .tabs-left .nav-tabs > li > a:hover {
328 | border-color: @grayLighter #ddd @grayLighter @grayLighter;
329 | }
330 | .tabs-left .nav-tabs .active > a,
331 | .tabs-left .nav-tabs .active > a:hover {
332 | border-color: #ddd transparent #ddd #ddd;
333 | *border-right-color: @white;
334 | }
335 |
336 | // Tabs on the right
337 | .tabs-right .nav-tabs {
338 | float: right;
339 | margin-left: 19px;
340 | border-left: 1px solid #ddd;
341 | }
342 | .tabs-right .nav-tabs > li > a {
343 | margin-left: -1px;
344 | .border-radius(0 4px 4px 0);
345 | }
346 | .tabs-right .nav-tabs > li > a:hover {
347 | border-color: @grayLighter @grayLighter @grayLighter #ddd;
348 | }
349 | .tabs-right .nav-tabs .active > a,
350 | .tabs-right .nav-tabs .active > a:hover {
351 | border-color: #ddd #ddd #ddd transparent;
352 | *border-left-color: @white;
353 | }
354 |
--------------------------------------------------------------------------------
/css/lib/responsive.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Responsive v2.0.1
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */
10 |
11 | // Responsive.less
12 | // For phone and tablet devices
13 | // -------------------------------------------------------------
14 |
15 |
16 | // REPEAT VARIABLES & MIXINS
17 | // -------------------------
18 | // Required since we compile the responsive stuff separately
19 |
20 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc
21 | @import "mixins.less";
22 |
23 |
24 | // RESPONSIVE CLASSES
25 | // ------------------
26 |
27 | // Hide from screenreaders and browsers
28 | // Credit: HTML5 Boilerplate
29 | .hidden {
30 | display: none;
31 | visibility: hidden;
32 | }
33 |
34 |
35 |
36 | // UP TO LANDSCAPE PHONE
37 | // ---------------------
38 |
39 | @media (max-width: 480px) {
40 |
41 | // Smooth out the collapsing/expanding nav
42 | .nav-collapse {
43 | -webkit-transform: translate3d(0, 0, 0); // activate the GPU
44 | }
45 |
46 | // Block level the page header small tag for readability
47 | .page-header h1 small {
48 | display: block;
49 | line-height: @baseLineHeight;
50 | }
51 |
52 | // Make span* classes full width
53 | input[class*="span"],
54 | select[class*="span"],
55 | textarea[class*="span"],
56 | .uneditable-input {
57 | display: block;
58 | width: 100%;
59 | min-height: 28px; /* Make inputs at least the height of their button counterpart */
60 | /* Makes inputs behave like true block-level elements */
61 | -webkit-box-sizing: border-box; /* Older Webkit */
62 | -moz-box-sizing: border-box; /* Older FF */
63 | -ms-box-sizing: border-box; /* IE8 */
64 | box-sizing: border-box; /* CSS3 spec*/
65 | }
66 | // But don't let it screw up prepend/append inputs
67 | .input-prepend input[class*="span"],
68 | .input-append input[class*="span"] {
69 | width: auto;
70 | }
71 |
72 | // Update checkboxes for iOS
73 | input[type="checkbox"],
74 | input[type="radio"] {
75 | border: 1px solid #ccc;
76 | }
77 |
78 | // Remove the horizontal form styles
79 | .form-horizontal .control-group > label {
80 | float: none;
81 | width: auto;
82 | padding-top: 0;
83 | text-align: left;
84 | }
85 | // Move over all input controls and content
86 | .form-horizontal .controls {
87 | margin-left: 0;
88 | }
89 | // Move the options list down to align with labels
90 | .form-horizontal .control-list {
91 | padding-top: 0; // has to be padding because margin collaspes
92 | }
93 | // Move over buttons in .form-actions to align with .controls
94 | .form-horizontal .form-actions {
95 | padding-left: 10px;
96 | padding-right: 10px;
97 | }
98 |
99 | // Modals
100 | .modal {
101 | position: absolute;
102 | top: 10px;
103 | left: 10px;
104 | right: 10px;
105 | width: auto;
106 | margin: 0;
107 | &.fade.in { top: auto; }
108 | }
109 | .modal-header .close {
110 | padding: 10px;
111 | margin: -10px;
112 | }
113 |
114 | // Carousel
115 | .carousel-caption {
116 | position: static;
117 | }
118 |
119 | }
120 |
121 |
122 |
123 | // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
124 | // --------------------------------------------------
125 |
126 | @media (max-width: 767px) {
127 | // GRID & CONTAINERS
128 | // -----------------
129 | // Remove width from containers
130 | .container {
131 | width: auto;
132 | padding: 0 20px;
133 | }
134 | // Fluid rows
135 | .row-fluid {
136 | width: 100%;
137 | }
138 | // Undo negative margin on rows
139 | .row {
140 | margin-left: 0;
141 | }
142 | // Make all columns even
143 | .row > [class*="span"],
144 | .row-fluid > [class*="span"] {
145 | float: none;
146 | display: block;
147 | width: auto;
148 | margin: 0;
149 | }
150 | }
151 |
152 |
153 |
154 | // PORTRAIT TABLET TO DEFAULT DESKTOP
155 | // ----------------------------------
156 |
157 | @media (min-width: 768px) and (max-width: 979px) {
158 |
159 | // Fixed grid
160 | #gridSystem > .generate(12, 42px, 20px);
161 |
162 | // Fluid grid
163 | #fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
164 |
165 | // Input grid
166 | #inputGridSystem > .generate(12, 42px, 20px);
167 |
168 | }
169 |
170 |
171 |
172 | // TABLETS AND BELOW
173 | // -----------------
174 | @media (max-width: 979px) {
175 |
176 | // UNFIX THE TOPBAR
177 | // ----------------
178 | // Remove any padding from the body
179 | body {
180 | padding-top: 0;
181 | }
182 | // Unfix the navbar
183 | .navbar-fixed-top {
184 | position: static;
185 | margin-bottom: @baseLineHeight;
186 | }
187 | .navbar-fixed-top .navbar-inner {
188 | padding: 5px;
189 | }
190 | .navbar .container {
191 | width: auto;
192 | padding: 0;
193 | }
194 | // Account for brand name
195 | .navbar .brand {
196 | padding-left: 10px;
197 | padding-right: 10px;
198 | margin: 0 0 0 -5px;
199 | }
200 | // Nav collapse clears brand
201 | .navbar .nav-collapse {
202 | clear: left;
203 | }
204 | // Block-level the nav
205 | .navbar .nav {
206 | float: none;
207 | margin: 0 0 (@baseLineHeight / 2);
208 | }
209 | .navbar .nav > li {
210 | float: none;
211 | }
212 | .navbar .nav > li > a {
213 | margin-bottom: 2px;
214 | }
215 | .navbar .nav > .divider-vertical {
216 | display: none;
217 | }
218 | .navbar .nav .nav-header {
219 | color: @navbarText;
220 | text-shadow: none;
221 | }
222 | // Nav and dropdown links in navbar
223 | .navbar .nav > li > a,
224 | .navbar .dropdown-menu a {
225 | padding: 6px 15px;
226 | font-weight: bold;
227 | color: @navbarLinkColor;
228 | .border-radius(3px);
229 | }
230 | .navbar .dropdown-menu li + li a {
231 | margin-bottom: 2px;
232 | }
233 | .navbar .nav > li > a:hover,
234 | .navbar .dropdown-menu a:hover {
235 | background-color: @navbarBackground;
236 | }
237 | // Dropdowns in the navbar
238 | .navbar .dropdown-menu {
239 | position: static;
240 | top: auto;
241 | left: auto;
242 | float: none;
243 | display: block;
244 | max-width: none;
245 | margin: 0 15px;
246 | padding: 0;
247 | background-color: transparent;
248 | border: none;
249 | .border-radius(0);
250 | .box-shadow(none);
251 | }
252 | .navbar .dropdown-menu:before,
253 | .navbar .dropdown-menu:after {
254 | display: none;
255 | }
256 | .navbar .dropdown-menu .divider {
257 | display: none;
258 | }
259 | // Forms in navbar
260 | .navbar-form,
261 | .navbar-search {
262 | float: none;
263 | padding: (@baseLineHeight / 2) 15px;
264 | margin: (@baseLineHeight / 2) 0;
265 | border-top: 1px solid @navbarBackground;
266 | border-bottom: 1px solid @navbarBackground;
267 | @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
268 | .box-shadow(@shadow);
269 | }
270 | // Pull right (secondary) nav content
271 | .navbar .nav.pull-right {
272 | float: none;
273 | margin-left: 0;
274 | }
275 | // Static navbar
276 | .navbar-static .navbar-inner {
277 | padding-left: 10px;
278 | padding-right: 10px;
279 | }
280 | // Navbar button
281 | .btn-navbar {
282 | display: block;
283 | }
284 |
285 | // Hide everything in the navbar save .brand and toggle button */
286 | .nav-collapse {
287 | overflow: hidden;
288 | height: 0;
289 | }
290 | }
291 |
292 |
293 |
294 | // DEFAULT DESKTOP
295 | // ---------------
296 |
297 | @media (min-width: 980px) {
298 | .nav-collapse.collapse {
299 | height: auto !important;
300 | }
301 | }
302 |
303 |
304 |
305 | // LARGE DESKTOP & UP
306 | // ------------------
307 |
308 | @media (min-width: 1200px) {
309 |
310 | // Fixed grid
311 | #gridSystem > .generate(12, 70px, 30px);
312 |
313 | // Fluid grid
314 | #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
315 |
316 | // Input grid
317 | #inputGridSystem > .generate(12, 70px, 30px);
318 |
319 | // Thumbnails
320 | .thumbnails {
321 | margin-left: -30px;
322 | }
323 | .thumbnails > li {
324 | margin-left: 30px;
325 | }
326 |
327 | }
328 |
--------------------------------------------------------------------------------
/js/lib/bootstrap/bootstrap-tooltip.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-tooltip.js v2.0.1
3 | * http://twitter.github.com/bootstrap/javascript.html#tooltips
4 | * Inspired by the original jQuery.tipsy by Jason Frame
5 | * ===========================================================
6 | * Copyright 2012 Twitter, Inc.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================== */
20 |
21 | !function( $ ) {
22 |
23 | "use strict"
24 |
25 | /* TOOLTIP PUBLIC CLASS DEFINITION
26 | * =============================== */
27 |
28 | var Tooltip = function ( element, options ) {
29 | this.init('tooltip', element, options)
30 | }
31 |
32 | Tooltip.prototype = {
33 |
34 | constructor: Tooltip
35 |
36 | , init: function ( type, element, options ) {
37 | var eventIn
38 | , eventOut
39 |
40 | this.type = type
41 | this.$element = $(element)
42 | this.options = this.getOptions(options)
43 | this.enabled = true
44 |
45 | if (this.options.trigger != 'manual') {
46 | eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
47 | eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
48 | this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
49 | this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
50 | }
51 |
52 | this.options.selector ?
53 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
54 | this.fixTitle()
55 | }
56 |
57 | , getOptions: function ( options ) {
58 | options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
59 |
60 | if (options.delay && typeof options.delay == 'number') {
61 | options.delay = {
62 | show: options.delay
63 | , hide: options.delay
64 | }
65 | }
66 |
67 | return options
68 | }
69 |
70 | , enter: function ( e ) {
71 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
72 |
73 | if (!self.options.delay || !self.options.delay.show) {
74 | self.show()
75 | } else {
76 | self.hoverState = 'in'
77 | setTimeout(function() {
78 | if (self.hoverState == 'in') {
79 | self.show()
80 | }
81 | }, self.options.delay.show)
82 | }
83 | }
84 |
85 | , leave: function ( e ) {
86 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
87 |
88 | if (!self.options.delay || !self.options.delay.hide) {
89 | self.hide()
90 | } else {
91 | self.hoverState = 'out'
92 | setTimeout(function() {
93 | if (self.hoverState == 'out') {
94 | self.hide()
95 | }
96 | }, self.options.delay.hide)
97 | }
98 | }
99 |
100 | , show: function () {
101 | var $tip
102 | , inside
103 | , pos
104 | , actualWidth
105 | , actualHeight
106 | , placement
107 | , tp
108 |
109 | if (this.hasContent() && this.enabled) {
110 | $tip = this.tip()
111 | this.setContent()
112 |
113 | if (this.options.animation) {
114 | $tip.addClass('fade')
115 | }
116 |
117 | placement = typeof this.options.placement == 'function' ?
118 | this.options.placement.call(this, $tip[0], this.$element[0]) :
119 | this.options.placement
120 |
121 | inside = /in/.test(placement)
122 |
123 | $tip
124 | .remove()
125 | .css({ top: 0, left: 0, display: 'block' })
126 | .appendTo(inside ? this.$element : document.body)
127 |
128 | pos = this.getPosition(inside)
129 |
130 | actualWidth = $tip[0].offsetWidth
131 | actualHeight = $tip[0].offsetHeight
132 |
133 | switch (inside ? placement.split(' ')[1] : placement) {
134 | case 'bottom':
135 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
136 | break
137 | case 'top':
138 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
139 | break
140 | case 'left':
141 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
142 | break
143 | case 'right':
144 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
145 | break
146 | }
147 |
148 | $tip
149 | .css(tp)
150 | .addClass(placement)
151 | .addClass('in')
152 | }
153 | }
154 |
155 | , setContent: function () {
156 | var $tip = this.tip()
157 | $tip.find('.tooltip-inner').html(this.getTitle())
158 | $tip.removeClass('fade in top bottom left right')
159 | }
160 |
161 | , hide: function () {
162 | var that = this
163 | , $tip = this.tip()
164 |
165 | $tip.removeClass('in')
166 |
167 | function removeWithAnimation() {
168 | var timeout = setTimeout(function () {
169 | $tip.off($.support.transition.end).remove()
170 | }, 500)
171 |
172 | $tip.one($.support.transition.end, function () {
173 | clearTimeout(timeout)
174 | $tip.remove()
175 | })
176 | }
177 |
178 | $.support.transition && this.$tip.hasClass('fade') ?
179 | removeWithAnimation() :
180 | $tip.remove()
181 | }
182 |
183 | , fixTitle: function () {
184 | var $e = this.$element
185 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
186 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
187 | }
188 | }
189 |
190 | , hasContent: function () {
191 | return this.getTitle()
192 | }
193 |
194 | , getPosition: function (inside) {
195 | return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
196 | width: this.$element[0].offsetWidth
197 | , height: this.$element[0].offsetHeight
198 | })
199 | }
200 |
201 | , getTitle: function () {
202 | var title
203 | , $e = this.$element
204 | , o = this.options
205 |
206 | title = $e.attr('data-original-title')
207 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
208 |
209 | title = title.toString().replace(/(^\s*|\s*$)/, "")
210 |
211 | return title
212 | }
213 |
214 | , tip: function () {
215 | return this.$tip = this.$tip || $(this.options.template)
216 | }
217 |
218 | , validate: function () {
219 | if (!this.$element[0].parentNode) {
220 | this.hide()
221 | this.$element = null
222 | this.options = null
223 | }
224 | }
225 |
226 | , enable: function () {
227 | this.enabled = true
228 | }
229 |
230 | , disable: function () {
231 | this.enabled = false
232 | }
233 |
234 | , toggleEnabled: function () {
235 | this.enabled = !this.enabled
236 | }
237 |
238 | , toggle: function () {
239 | this[this.tip().hasClass('in') ? 'hide' : 'show']()
240 | }
241 |
242 | }
243 |
244 |
245 | /* TOOLTIP PLUGIN DEFINITION
246 | * ========================= */
247 |
248 | $.fn.tooltip = function ( option ) {
249 | return this.each(function () {
250 | var $this = $(this)
251 | , data = $this.data('tooltip')
252 | , options = typeof option == 'object' && option
253 | if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
254 | if (typeof option == 'string') data[option]()
255 | })
256 | }
257 |
258 | $.fn.tooltip.Constructor = Tooltip
259 |
260 | $.fn.tooltip.defaults = {
261 | animation: true
262 | , delay: 0
263 | , selector: false
264 | , placement: 'top'
265 | , trigger: 'hover'
266 | , title: ''
267 | , template: ''
268 | }
269 |
270 | }( window.jQuery );
--------------------------------------------------------------------------------
/css/lib/sprites.less:
--------------------------------------------------------------------------------
1 | // SPRITES
2 | // Glyphs and icons for buttons, nav, and more
3 | // -------------------------------------------
4 |
5 |
6 | // ICONS
7 | // -----
8 |
9 | // All icons receive the styles of the tag with a base class
10 | // of .i and are then given a unique class to add width, height,
11 | // and background-position. Your resulting HTML will look like
12 | // .
13 |
14 | // For the white version of the icons, just add the .icon-white class:
15 | //
16 |
17 | [class^="icon-"],
18 | [class*=" icon-"] {
19 | display: inline-block;
20 | width: 14px;
21 | height: 14px;
22 | line-height: 14px;
23 | vertical-align: text-top;
24 | background-image: url(@iconSpritePath);
25 | background-position: 14px 14px;
26 | background-repeat: no-repeat;
27 |
28 | .ie7-restore-right-whitespace();
29 | }
30 | .icon-white {
31 | background-image: url(@iconWhiteSpritePath);
32 | }
33 |
34 | .icon-glass { background-position: 0 0; }
35 | .icon-music { background-position: -24px 0; }
36 | .icon-search { background-position: -48px 0; }
37 | .icon-envelope { background-position: -72px 0; }
38 | .icon-heart { background-position: -96px 0; }
39 | .icon-star { background-position: -120px 0; }
40 | .icon-star-empty { background-position: -144px 0; }
41 | .icon-user { background-position: -168px 0; }
42 | .icon-film { background-position: -192px 0; }
43 | .icon-th-large { background-position: -216px 0; }
44 | .icon-th { background-position: -240px 0; }
45 | .icon-th-list { background-position: -264px 0; }
46 | .icon-ok { background-position: -288px 0; }
47 | .icon-remove { background-position: -312px 0; }
48 | .icon-zoom-in { background-position: -336px 0; }
49 | .icon-zoom-out { background-position: -360px 0; }
50 | .icon-off { background-position: -384px 0; }
51 | .icon-signal { background-position: -408px 0; }
52 | .icon-cog { background-position: -432px 0; }
53 | .icon-trash { background-position: -456px 0; }
54 |
55 | .icon-home { background-position: 0 -24px; }
56 | .icon-file { background-position: -24px -24px; }
57 | .icon-time { background-position: -48px -24px; }
58 | .icon-road { background-position: -72px -24px; }
59 | .icon-download-alt { background-position: -96px -24px; }
60 | .icon-download { background-position: -120px -24px; }
61 | .icon-upload { background-position: -144px -24px; }
62 | .icon-inbox { background-position: -168px -24px; }
63 | .icon-play-circle { background-position: -192px -24px; }
64 | .icon-repeat { background-position: -216px -24px; }
65 | .icon-refresh { background-position: -240px -24px; }
66 | .icon-list-alt { background-position: -264px -24px; }
67 | .icon-lock { background-position: -287px -24px; } // 1px off
68 | .icon-flag { background-position: -312px -24px; }
69 | .icon-headphones { background-position: -336px -24px; }
70 | .icon-volume-off { background-position: -360px -24px; }
71 | .icon-volume-down { background-position: -384px -24px; }
72 | .icon-volume-up { background-position: -408px -24px; }
73 | .icon-qrcode { background-position: -432px -24px; }
74 | .icon-barcode { background-position: -456px -24px; }
75 |
76 | .icon-tag { background-position: 0 -48px; }
77 | .icon-tags { background-position: -25px -48px; } // 1px off
78 | .icon-book { background-position: -48px -48px; }
79 | .icon-bookmark { background-position: -72px -48px; }
80 | .icon-print { background-position: -96px -48px; }
81 | .icon-camera { background-position: -120px -48px; }
82 | .icon-font { background-position: -144px -48px; }
83 | .icon-bold { background-position: -167px -48px; } // 1px off
84 | .icon-italic { background-position: -192px -48px; }
85 | .icon-text-height { background-position: -216px -48px; }
86 | .icon-text-width { background-position: -240px -48px; }
87 | .icon-align-left { background-position: -264px -48px; }
88 | .icon-align-center { background-position: -288px -48px; }
89 | .icon-align-right { background-position: -312px -48px; }
90 | .icon-align-justify { background-position: -336px -48px; }
91 | .icon-list { background-position: -360px -48px; }
92 | .icon-indent-left { background-position: -384px -48px; }
93 | .icon-indent-right { background-position: -408px -48px; }
94 | .icon-facetime-video { background-position: -432px -48px; }
95 | .icon-picture { background-position: -456px -48px; }
96 |
97 | .icon-pencil { background-position: 0 -72px; }
98 | .icon-map-marker { background-position: -24px -72px; }
99 | .icon-adjust { background-position: -48px -72px; }
100 | .icon-tint { background-position: -72px -72px; }
101 | .icon-edit { background-position: -96px -72px; }
102 | .icon-share { background-position: -120px -72px; }
103 | .icon-check { background-position: -144px -72px; }
104 | .icon-move { background-position: -168px -72px; }
105 | .icon-step-backward { background-position: -192px -72px; }
106 | .icon-fast-backward { background-position: -216px -72px; }
107 | .icon-backward { background-position: -240px -72px; }
108 | .icon-play { background-position: -264px -72px; }
109 | .icon-pause { background-position: -288px -72px; }
110 | .icon-stop { background-position: -312px -72px; }
111 | .icon-forward { background-position: -336px -72px; }
112 | .icon-fast-forward { background-position: -360px -72px; }
113 | .icon-step-forward { background-position: -384px -72px; }
114 | .icon-eject { background-position: -408px -72px; }
115 | .icon-chevron-left { background-position: -432px -72px; }
116 | .icon-chevron-right { background-position: -456px -72px; }
117 |
118 | .icon-plus-sign { background-position: 0 -96px; }
119 | .icon-minus-sign { background-position: -24px -96px; }
120 | .icon-remove-sign { background-position: -48px -96px; }
121 | .icon-ok-sign { background-position: -72px -96px; }
122 | .icon-question-sign { background-position: -96px -96px; }
123 | .icon-info-sign { background-position: -120px -96px; }
124 | .icon-screenshot { background-position: -144px -96px; }
125 | .icon-remove-circle { background-position: -168px -96px; }
126 | .icon-ok-circle { background-position: -192px -96px; }
127 | .icon-ban-circle { background-position: -216px -96px; }
128 | .icon-arrow-left { background-position: -240px -96px; }
129 | .icon-arrow-right { background-position: -264px -96px; }
130 | .icon-arrow-up { background-position: -289px -96px; } // 1px off
131 | .icon-arrow-down { background-position: -312px -96px; }
132 | .icon-share-alt { background-position: -336px -96px; }
133 | .icon-resize-full { background-position: -360px -96px; }
134 | .icon-resize-small { background-position: -384px -96px; }
135 | .icon-plus { background-position: -408px -96px; }
136 | .icon-minus { background-position: -433px -96px; }
137 | .icon-asterisk { background-position: -456px -96px; }
138 |
139 | .icon-exclamation-sign { background-position: 0 -120px; }
140 | .icon-gift { background-position: -24px -120px; }
141 | .icon-leaf { background-position: -48px -120px; }
142 | .icon-fire { background-position: -72px -120px; }
143 | .icon-eye-open { background-position: -96px -120px; }
144 | .icon-eye-close { background-position: -120px -120px; }
145 | .icon-warning-sign { background-position: -144px -120px; }
146 | .icon-plane { background-position: -168px -120px; }
147 | .icon-calendar { background-position: -192px -120px; }
148 | .icon-random { background-position: -216px -120px; }
149 | .icon-comment { background-position: -240px -120px; }
150 | .icon-magnet { background-position: -264px -120px; }
151 | .icon-chevron-up { background-position: -288px -120px; }
152 | .icon-chevron-down { background-position: -313px -119px; } // 1px off
153 | .icon-retweet { background-position: -336px -120px; }
154 | .icon-shopping-cart { background-position: -360px -120px; }
155 | .icon-folder-close { background-position: -384px -120px; }
156 | .icon-folder-open { background-position: -408px -120px; }
157 | .icon-resize-vertical { background-position: -432px -119px; }
158 | .icon-resize-horizontal { background-position: -456px -118px; }
159 |
--------------------------------------------------------------------------------
/js/bin/json2.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | http://www.JSON.org/json2.js
3 | 2011-10-19
4 |
5 | Public Domain.
6 |
7 | NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8 |
9 | See http://www.JSON.org/js.html
10 |
11 |
12 | This code should be minified before deployment.
13 | See http://javascript.crockford.com/jsmin.html
14 |
15 | USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
16 | NOT CONTROL.
17 |
18 |
19 | This file creates a global JSON object containing two methods: stringify
20 | and parse.
21 |
22 | JSON.stringify(value, replacer, space)
23 | value any JavaScript value, usually an object or array.
24 |
25 | replacer an optional parameter that determines how object
26 | values are stringified for objects. It can be a
27 | function or an array of strings.
28 |
29 | space an optional parameter that specifies the indentation
30 | of nested structures. If it is omitted, the text will
31 | be packed without extra whitespace. If it is a number,
32 | it will specify the number of spaces to indent at each
33 | level. If it is a string (such as '\t' or ' '),
34 | it contains the characters used to indent at each level.
35 |
36 | This method produces a JSON text from a JavaScript value.
37 |
38 | When an object value is found, if the object contains a toJSON
39 | method, its toJSON method will be called and the result will be
40 | stringified. A toJSON method does not serialize: it returns the
41 | value represented by the name/value pair that should be serialized,
42 | or undefined if nothing should be serialized. The toJSON method
43 | will be passed the key associated with the value, and this will be
44 | bound to the value
45 |
46 | For example, this would serialize Dates as ISO strings.
47 |
48 | Date.prototype.toJSON = function (key) {
49 | function f(n) {
50 | // Format integers to have at least two digits.
51 | return n < 10 ? '0' + n : n;
52 | }
53 |
54 | return this.getUTCFullYear() + '-' +
55 | f(this.getUTCMonth() + 1) + '-' +
56 | f(this.getUTCDate()) + 'T' +
57 | f(this.getUTCHours()) + ':' +
58 | f(this.getUTCMinutes()) + ':' +
59 | f(this.getUTCSeconds()) + 'Z';
60 | };
61 |
62 | You can provide an optional replacer method. It will be passed the
63 | key and value of each member, with this bound to the containing
64 | object. The value that is returned from your method will be
65 | serialized. If your method returns undefined, then the member will
66 | be excluded from the serialization.
67 |
68 | If the replacer parameter is an array of strings, then it will be
69 | used to select the members to be serialized. It filters the results
70 | such that only members with keys listed in the replacer array are
71 | stringified.
72 |
73 | Values that do not have JSON representations, such as undefined or
74 | functions, will not be serialized. Such values in objects will be
75 | dropped; in arrays they will be replaced with null. You can use
76 | a replacer function to replace those with JSON values.
77 | JSON.stringify(undefined) returns undefined.
78 |
79 | The optional space parameter produces a stringification of the
80 | value that is filled with line breaks and indentation to make it
81 | easier to read.
82 |
83 | If the space parameter is a non-empty string, then that string will
84 | be used for indentation. If the space parameter is a number, then
85 | the indentation will be that many spaces.
86 |
87 | Example:
88 |
89 | text = JSON.stringify(['e', {pluribus: 'unum'}]);
90 | // text is '["e",{"pluribus":"unum"}]'
91 |
92 |
93 | text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
94 | // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
95 |
96 | text = JSON.stringify([new Date()], function (key, value) {
97 | return this[key] instanceof Date ?
98 | 'Date(' + this[key] + ')' : value;
99 | });
100 | // text is '["Date(---current time---)"]'
101 |
102 |
103 | JSON.parse(text, reviver)
104 | This method parses a JSON text to produce an object or array.
105 | It can throw a SyntaxError exception.
106 |
107 | The optional reviver parameter is a function that can filter and
108 | transform the results. It receives each of the keys and values,
109 | and its return value is used instead of the original value.
110 | If it returns what it received, then the structure is not modified.
111 | If it returns undefined then the member is deleted.
112 |
113 | Example:
114 |
115 | // Parse the text. Values that look like ISO date strings will
116 | // be converted to Date objects.
117 |
118 | myData = JSON.parse(text, function (key, value) {
119 | var a;
120 | if (typeof value === 'string') {
121 | a =
122 | /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
123 | if (a) {
124 | return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
125 | +a[5], +a[6]));
126 | }
127 | }
128 | return value;
129 | });
130 |
131 | myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
132 | var d;
133 | if (typeof value === 'string' &&
134 | value.slice(0, 5) === 'Date(' &&
135 | value.slice(-1) === ')') {
136 | d = new Date(value.slice(5, -1));
137 | if (d) {
138 | return d;
139 | }
140 | }
141 | return value;
142 | });
143 |
144 |
145 | This is a reference implementation. You are free to copy, modify, or
146 | redistribute.
147 | *//*jslint evil: true, regexp: true *//*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
148 | call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
149 | getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
150 | lastIndex, length, parse, prototype, push, replace, slice, stringify,
151 | test, toJSON, toString, valueOf
152 | */// Create a JSON object only if one does not already exist. We create the
153 | // methods in a closure to avoid creating global variables.
154 | var JSON;JSON||(JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
46 | }
47 | input,
48 | button,
49 | select,
50 | textarea {
51 | #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 | // Inputs, Textareas, Selects
62 | input,
63 | textarea,
64 | select,
65 | .uneditable-input {
66 | display: inline-block;
67 | width: 210px;
68 | height: @baseLineHeight;
69 | padding: 4px;
70 | margin-bottom: 9px;
71 | font-size: @baseFontSize;
72 | line-height: @baseLineHeight;
73 | color: @gray;
74 | border: 1px solid #ccc;
75 | .border-radius(3px);
76 | }
77 | .uneditable-textarea {
78 | width: auto;
79 | height: auto;
80 | }
81 |
82 | // Inputs within a label
83 | label input,
84 | label textarea,
85 | label select {
86 | display: block;
87 | }
88 |
89 | // Mini reset for unique input types
90 | input[type="image"],
91 | input[type="checkbox"],
92 | input[type="radio"] {
93 | width: auto;
94 | height: auto;
95 | padding: 0;
96 | margin: 3px 0;
97 | *margin-top: 0; /* IE7 */
98 | line-height: normal;
99 | cursor: pointer;
100 | .border-radius(0);
101 | border: 0 \9; /* IE9 and down */
102 | }
103 | input[type="image"] {
104 | border: 0;
105 | }
106 |
107 | // Reset the file input to browser defaults
108 | input[type="file"] {
109 | width: auto;
110 | padding: initial;
111 | line-height: initial;
112 | border: initial;
113 | background-color: @white;
114 | background-color: initial;
115 | .box-shadow(none);
116 | }
117 |
118 | // Help out input buttons
119 | input[type="button"],
120 | input[type="reset"],
121 | input[type="submit"] {
122 | width: auto;
123 | height: auto;
124 | }
125 |
126 | // Set the height of select and file controls to match text inputs
127 | select,
128 | input[type="file"] {
129 | height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
130 | *margin-top: 4px; /* For IE7, add top margin to align select with labels */
131 | line-height: 28px;
132 | }
133 |
134 | // Reset line-height for IE
135 | input[type="file"] {
136 | line-height: 18px \9;
137 | }
138 |
139 | // Chrome on Linux and Mobile Safari need background-color
140 | select {
141 | width: 220px; // default input width + 10px of padding that doesn't get applied
142 | background-color: @white;
143 | }
144 |
145 | // Make multiple select elements height not fixed
146 | select[multiple],
147 | select[size] {
148 | height: auto;
149 | }
150 |
151 | // Remove shadow from image inputs
152 | input[type="image"] {
153 | .box-shadow(none);
154 | }
155 |
156 | // Make textarea height behave
157 | textarea {
158 | height: auto;
159 | }
160 |
161 | // Hidden inputs
162 | input[type="hidden"] {
163 | display: none;
164 | }
165 |
166 |
167 |
168 | // CHECKBOXES & RADIOS
169 | // -------------------
170 |
171 | // Indent the labels to position radios/checkboxes as hanging
172 | .radio,
173 | .checkbox {
174 | padding-left: 18px;
175 | }
176 | .radio input[type="radio"],
177 | .checkbox input[type="checkbox"] {
178 | float: left;
179 | margin-left: -18px;
180 | }
181 |
182 | // Move the options list down to align with labels
183 | .controls > .radio:first-child,
184 | .controls > .checkbox:first-child {
185 | padding-top: 5px; // has to be padding because margin collaspes
186 | }
187 |
188 | // Radios and checkboxes on same line
189 | // TODO v3: Convert .inline to .control-inline
190 | .radio.inline,
191 | .checkbox.inline {
192 | display: inline-block;
193 | padding-top: 5px;
194 | margin-bottom: 0;
195 | vertical-align: middle;
196 | }
197 | .radio.inline + .radio.inline,
198 | .checkbox.inline + .checkbox.inline {
199 | margin-left: 10px; // space out consecutive inline controls
200 | }
201 |
202 |
203 |
204 | // FOCUS STATE
205 | // -----------
206 |
207 | input,
208 | textarea {
209 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
210 | @transition: border linear .2s, box-shadow linear .2s;
211 | .transition(@transition);
212 | }
213 | input:focus,
214 | textarea:focus {
215 | border-color: rgba(82,168,236,.8);
216 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
217 | .box-shadow(@shadow);
218 | outline: 0;
219 | outline: thin dotted \9; /* IE6-9 */
220 | }
221 | input[type="file"]:focus,
222 | input[type="radio"]:focus,
223 | input[type="checkbox"]:focus,
224 | select:focus {
225 | .box-shadow(none); // override for file inputs
226 | .tab-focus();
227 | }
228 |
229 |
230 |
231 | // INPUT SIZES
232 | // -----------
233 |
234 | // General classes for quick sizes
235 | .input-mini { width: 60px; }
236 | .input-small { width: 90px; }
237 | .input-medium { width: 150px; }
238 | .input-large { width: 210px; }
239 | .input-xlarge { width: 270px; }
240 | .input-xxlarge { width: 530px; }
241 |
242 | // Grid style input sizes
243 | input[class*="span"],
244 | select[class*="span"],
245 | textarea[class*="span"],
246 | .uneditable-input {
247 | float: none;
248 | margin-left: 0;
249 | }
250 |
251 |
252 |
253 | // GRID SIZING FOR INPUTS
254 | // ----------------------
255 |
256 | #inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
257 |
258 |
259 |
260 |
261 | // DISABLED STATE
262 | // --------------
263 |
264 | // Disabled and read-only inputs
265 | input[disabled],
266 | select[disabled],
267 | textarea[disabled],
268 | input[readonly],
269 | select[readonly],
270 | textarea[readonly] {
271 | background-color: #f5f5f5;
272 | border-color: #ddd;
273 | cursor: not-allowed;
274 | }
275 |
276 |
277 |
278 |
279 | // FORM FIELD FEEDBACK STATES
280 | // --------------------------
281 |
282 | // Warning
283 | .control-group.warning {
284 | .formFieldState(@warningText, @warningText, @warningBackground);
285 | }
286 | // Error
287 | .control-group.error {
288 | .formFieldState(@errorText, @errorText, @errorBackground);
289 | }
290 | // Success
291 | .control-group.success {
292 | .formFieldState(@successText, @successText, @successBackground);
293 | }
294 |
295 | // HTML5 invalid states
296 | // Shares styles with the .control-group.error above
297 | input:focus:required:invalid,
298 | textarea:focus:required:invalid,
299 | select:focus:required:invalid {
300 | color: #b94a48;
301 | border-color: #ee5f5b;
302 | &:focus {
303 | border-color: darken(#ee5f5b, 10%);
304 | .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
305 | }
306 | }
307 |
308 |
309 |
310 | // FORM ACTIONS
311 | // ------------
312 |
313 | .form-actions {
314 | padding: (@baseLineHeight - 1) 20px @baseLineHeight;
315 | margin-top: @baseLineHeight;
316 | margin-bottom: @baseLineHeight;
317 | background-color: #f5f5f5;
318 | border-top: 1px solid #ddd;
319 | }
320 |
321 | // For text that needs to appear as an input but should not be an input
322 | .uneditable-input {
323 | display: block;
324 | background-color: @white;
325 | border-color: #eee;
326 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
327 | cursor: not-allowed;
328 | }
329 |
330 | // Placeholder text gets special styles; can't be bundled together though for some reason
331 | .placeholder(@grayLight);
332 |
333 |
334 |
335 | // HELP TEXT
336 | // ---------
337 |
338 | .help-block {
339 | display: block; // account for any element using help-block
340 | margin-top: 5px;
341 | margin-bottom: 0;
342 | color: @grayLight;
343 | }
344 |
345 | .help-inline {
346 | display: inline-block;
347 | .ie7-inline-block();
348 | margin-bottom: 9px;
349 | vertical-align: middle;
350 | padding-left: 5px;
351 | }
352 |
353 |
354 |
355 | // INPUT GROUPS
356 | // ------------
357 |
358 | // Allow us to put symbols and text within the input field for a cleaner look
359 | .input-prepend,
360 | .input-append {
361 | margin-bottom: 5px;
362 | .clearfix(); // Clear the float to prevent wrapping
363 | input,
364 | .uneditable-input {
365 | .border-radius(0 3px 3px 0);
366 | &:focus {
367 | position: relative;
368 | z-index: 2;
369 | }
370 | }
371 | .uneditable-input {
372 | border-left-color: #ccc;
373 | }
374 | .add-on {
375 | float: left;
376 | display: block;
377 | width: auto;
378 | min-width: 16px;
379 | height: @baseLineHeight;
380 | margin-right: -1px;
381 | padding: 4px 5px;
382 | font-weight: normal;
383 | line-height: @baseLineHeight;
384 | color: @grayLight;
385 | text-align: center;
386 | text-shadow: 0 1px 0 @white;
387 | background-color: #f5f5f5;
388 | border: 1px solid #ccc;
389 | .border-radius(3px 0 0 3px);
390 | }
391 | .active {
392 | background-color: lighten(@green, 30);
393 | border-color: @green;
394 | }
395 | }
396 | .input-prepend {
397 | .add-on {
398 | *margin-top: 1px; /* IE6-7 */
399 | }
400 | }
401 | .input-append {
402 | input,
403 | .uneditable-input {
404 | float: left;
405 | .border-radius(3px 0 0 3px);
406 | }
407 | .uneditable-input {
408 | border-left-color: #eee;
409 | border-right-color: #ccc;
410 | }
411 | .add-on {
412 | margin-right: 0;
413 | margin-left: -1px;
414 | .border-radius(0 3px 3px 0);
415 | }
416 | input:first-child {
417 | // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
418 | // inherit the sum of its ancestors' margins.
419 | *margin-left: -160px;
420 |
421 | &+.add-on {
422 | *margin-left: -21px;
423 | }
424 | }
425 | }
426 |
427 |
428 |
429 | // SEARCH FORM
430 | // -----------
431 |
432 | .search-query {
433 | padding-left: 14px;
434 | padding-right: 14px;
435 | margin-bottom: 0; // remove the default margin on all inputs
436 | .border-radius(14px);
437 | }
438 |
439 |
440 |
441 | // HORIZONTAL & VERTICAL FORMS
442 | // ---------------------------
443 |
444 | // Common properties
445 | // -----------------
446 |
447 | .form-search,
448 | .form-inline,
449 | .form-horizontal {
450 | input,
451 | textarea,
452 | select,
453 | .help-inline,
454 | .uneditable-input {
455 | display: inline-block;
456 | margin-bottom: 0;
457 | }
458 | // Re-hide hidden elements due to specifity
459 | .hide {
460 | display: none;
461 | }
462 | }
463 | .form-search label,
464 | .form-inline label,
465 | .form-search .input-append,
466 | .form-inline .input-append,
467 | .form-search .input-prepend,
468 | .form-inline .input-prepend {
469 | display: inline-block;
470 | }
471 | // Make the prepend and append add-on vertical-align: middle;
472 | .form-search .input-append .add-on,
473 | .form-inline .input-prepend .add-on,
474 | .form-search .input-append .add-on,
475 | .form-inline .input-prepend .add-on {
476 | vertical-align: middle;
477 | }
478 | // Inline checkbox/radio labels
479 | .form-search .radio,
480 | .form-inline .radio,
481 | .form-search .checkbox,
482 | .form-inline .checkbox {
483 | margin-bottom: 0;
484 | vertical-align: middle;
485 | }
486 |
487 | // Margin to space out fieldsets
488 | .control-group {
489 | margin-bottom: @baseLineHeight / 2;
490 | }
491 |
492 | // Legend collapses margin, so next element is responsible for spacing
493 | legend + .control-group {
494 | margin-top: @baseLineHeight;
495 | -webkit-margin-top-collapse: separate;
496 | }
497 |
498 | // Horizontal-specific styles
499 | // --------------------------
500 |
501 | .form-horizontal {
502 | // Increase spacing between groups
503 | .control-group {
504 | margin-bottom: @baseLineHeight;
505 | .clearfix();
506 | }
507 | // Float the labels left
508 | .control-label {
509 | float: left;
510 | width: 140px;
511 | padding-top: 5px;
512 | text-align: right;
513 | }
514 | // Move over all input controls and content
515 | .controls {
516 | margin-left: 160px;
517 | }
518 | // Move over buttons in .form-actions to align with .controls
519 | .form-actions {
520 | padding-left: 160px;
521 | }
522 | }
523 |
--------------------------------------------------------------------------------