├── .travis.yml ├── docs ├── build │ ├── languages │ │ └── template.json │ ├── node_modules │ │ ├── hogan.js │ │ │ ├── .git_ignore │ │ │ ├── .gitmodules │ │ │ ├── test │ │ │ │ ├── html │ │ │ │ │ └── list.html │ │ │ │ ├── templates │ │ │ │ │ └── list.mustache │ │ │ │ ├── index.html │ │ │ │ ├── spec │ │ │ │ │ ├── Rakefile │ │ │ │ │ ├── Changes │ │ │ │ │ ├── TESTING.md │ │ │ │ │ ├── specs │ │ │ │ │ │ ├── comments.json │ │ │ │ │ │ ├── partials.json │ │ │ │ │ │ ├── comments.yml │ │ │ │ │ │ ├── delimiters.json │ │ │ │ │ │ └── partials.yml │ │ │ │ │ └── README.md │ │ │ │ ├── spec.js │ │ │ │ └── mustache.js │ │ │ ├── web │ │ │ │ ├── favicon.ico │ │ │ │ ├── images │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── noise.png │ │ │ │ │ ├── stripes.png │ │ │ │ │ └── small-hogan-icon.png │ │ │ │ └── builds │ │ │ │ │ └── 1.0.5 │ │ │ │ │ └── template-1.0.5.min.js │ │ │ ├── package.json │ │ │ ├── wrappers │ │ │ │ ├── js.mustache │ │ │ │ ├── amd.js.mustache │ │ │ │ ├── common.js.mustache │ │ │ │ └── mustache.js.mustache │ │ │ ├── lib │ │ │ │ └── hogan.js │ │ │ ├── tools │ │ │ │ ├── web_templates.js │ │ │ │ └── release.js │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ └── bin │ │ │ │ └── hulk │ │ ├── cjson │ │ │ ├── index.js │ │ │ ├── test │ │ │ │ ├── fixtures │ │ │ │ │ ├── conf8.json │ │ │ │ │ ├── conf1.json │ │ │ │ │ ├── conf7.json │ │ │ │ │ ├── conf5.json │ │ │ │ │ ├── conf6.json │ │ │ │ │ ├── conf2.json │ │ │ │ │ ├── conf3.json │ │ │ │ │ └── conf4.json │ │ │ │ └── test.js │ │ │ ├── Makefile │ │ │ ├── package.json │ │ │ └── readme.md │ │ └── .bin │ │ │ └── hulk │ ├── package.json │ ├── index.js │ └── translation.js ├── assets │ ├── ico │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── apple-touch-icon-114-precomposed.png │ │ ├── apple-touch-icon-144-precomposed.png │ │ ├── apple-touch-icon-57-precomposed.png │ │ └── apple-touch-icon-72-precomposed.png │ ├── img │ │ ├── ui-icons32.png │ │ ├── examples │ │ │ ├── slide-01.jpg │ │ │ ├── slide-02.jpg │ │ │ ├── slide-03.jpg │ │ │ ├── browser-icon-chrome.png │ │ │ ├── browser-icon-firefox.png │ │ │ ├── browser-icon-safari.png │ │ │ ├── bootstrap-example-fluid.jpg │ │ │ ├── bootstrap-example-hero.jpg │ │ │ ├── bootstrap-example-signin.png │ │ │ ├── bootstrap-example-starter.jpg │ │ │ ├── bootstrap-example-carousel.png │ │ │ ├── bootstrap-example-sticky-footer.png │ │ │ └── bootstrap-example-marketing-narrow.png │ │ ├── less-logo-large.png │ │ ├── sprite-cms-icons.png │ │ ├── example-sites │ │ │ ├── kippt.png │ │ │ ├── fleetio.png │ │ │ ├── jshint.png │ │ │ ├── 8020select.png │ │ │ ├── soundready.png │ │ │ ├── adoptahydrant.png │ │ │ ├── breakingnews.png │ │ │ ├── gathercontent.png │ │ │ ├── globotv-cma.png │ │ │ └── cadastro-globocom.png │ │ ├── grid-baseline-20px.png │ │ ├── bs-docs-twitter-github.png │ │ ├── glyphicons-halflings.png │ │ ├── bootstrap-mdo-sfmoma-01.jpg │ │ ├── bootstrap-mdo-sfmoma-02.jpg │ │ ├── bootstrap-mdo-sfmoma-03.jpg │ │ ├── bs-docs-masthead-pattern.png │ │ ├── icon-custom-select-arrow.png │ │ ├── responsive-illustrations.png │ │ ├── bs-docs-bootstrap-features.png │ │ ├── glyphicons-halflings-white.png │ │ └── bs-docs-responsive-illustrations.png │ └── js │ │ ├── google-code-prettify │ │ └── prettify.css │ │ ├── bootstrap-transition.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-balloon.js │ │ ├── bootstrap-popover.js │ │ ├── README.md │ │ ├── bootstrap-affix.js │ │ └── bootstrap-tab.js ├── templates │ └── pages │ │ └── whatsnew.mustache └── examples │ ├── starter-template.html │ └── signin.html ├── img ├── glyphicons-halflings.png └── glyphicons-halflings-white.png ├── component.json ├── js ├── .jshintrc ├── tests │ ├── server.js │ ├── unit │ │ ├── bootstrap-transition.js │ │ ├── bootstrap-affix.js │ │ ├── bootstrap-phantom.js │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-tab.js │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-modal.js │ │ └── bootstrap-carousel.js │ ├── index.html │ └── phantom.js ├── bootstrap-transition.js ├── bootstrap-alert.js ├── bootstrap-button.js ├── bootstrap-balloon.js ├── bootstrap-popover.js ├── bootstrap-affix.js └── bootstrap-tab.js ├── less ├── layouts.less ├── component-animations.less ├── utilities.less ├── grid.less ├── breadcrumbs.less ├── responsive-768px-979px.less ├── hero-unit.less ├── wells.less ├── responsive-1200px-min.less ├── close.less ├── accordion.less ├── pager.less ├── media.less ├── scaffolding.less ├── responsive.less ├── responsive-utilities.less ├── alerts.less ├── code.less ├── bootstrap.less ├── thumbnails.less ├── tooltip.less ├── labels-badges.less ├── modals.less ├── tests │ └── forms-responsive.html ├── carousel.less ├── pagination.less ├── progress-bars.less ├── balloon.less └── popovers.less ├── .gitignore ├── package.json └── CONTRIBUTING.md /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 -------------------------------------------------------------------------------- /docs/build/languages/template.json: -------------------------------------------------------------------------------- 1 | {"Pages":{"":""}} -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/.git_ignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/cjson.js'); 2 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf8.json: -------------------------------------------------------------------------------- 1 | { 2 | // "foo": 1 3 | } 4 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf1.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf7.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "{{root}}/src" 3 | } 4 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf5.json: -------------------------------------------------------------------------------- 1 | { 2 | "'key/*test*/'": "'value//test'" 3 | } -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf6.json: -------------------------------------------------------------------------------- 1 | { 2 | "key\"/*test*/": "value\"//test" 3 | } -------------------------------------------------------------------------------- /docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /docs/assets/ico/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/favicon.png -------------------------------------------------------------------------------- /img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/assets/img/ui-icons32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/ui-icons32.png -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf2.json: -------------------------------------------------------------------------------- 1 | { 2 | // single line comment 3 | "key": "value" 4 | } 5 | -------------------------------------------------------------------------------- /img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/assets/img/examples/slide-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/slide-01.jpg -------------------------------------------------------------------------------- /docs/assets/img/examples/slide-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/slide-02.jpg -------------------------------------------------------------------------------- /docs/assets/img/examples/slide-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/slide-03.jpg -------------------------------------------------------------------------------- /docs/assets/img/less-logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/less-logo-large.png -------------------------------------------------------------------------------- /docs/assets/img/sprite-cms-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/sprite-cms-icons.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/kippt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/kippt.png -------------------------------------------------------------------------------- /docs/assets/img/grid-baseline-20px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/grid-baseline-20px.png -------------------------------------------------------------------------------- /docs/assets/img/bs-docs-twitter-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bs-docs-twitter-github.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/fleetio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/fleetio.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/jshint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/jshint.png -------------------------------------------------------------------------------- /docs/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/assets/img/bootstrap-mdo-sfmoma-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg -------------------------------------------------------------------------------- /docs/assets/img/bootstrap-mdo-sfmoma-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg -------------------------------------------------------------------------------- /docs/assets/img/bootstrap-mdo-sfmoma-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg -------------------------------------------------------------------------------- /docs/assets/img/bs-docs-masthead-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bs-docs-masthead-pattern.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/8020select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/8020select.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/soundready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/soundready.png -------------------------------------------------------------------------------- /docs/assets/img/icon-custom-select-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/icon-custom-select-arrow.png -------------------------------------------------------------------------------- /docs/assets/img/responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/responsive-illustrations.png -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test/spec"] 2 | path = test/spec 3 | url = https://github.com/mustache/spec.git 4 | -------------------------------------------------------------------------------- /docs/assets/img/bs-docs-bootstrap-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bs-docs-bootstrap-features.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/adoptahydrant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/adoptahydrant.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/breakingnews.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/breakingnews.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/gathercontent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/gathercontent.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/globotv-cma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/globotv-cma.png -------------------------------------------------------------------------------- /docs/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/assets/img/examples/browser-icon-chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/browser-icon-chrome.png -------------------------------------------------------------------------------- /docs/assets/img/examples/browser-icon-firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/browser-icon-firefox.png -------------------------------------------------------------------------------- /docs/assets/img/examples/browser-icon-safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/browser-icon-safari.png -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | node ./test/test.js 3 | 4 | lint: 5 | linter -f ./lib/cjson.js 6 | 7 | 8 | .PHONY: test lint -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/html/list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/build/node_modules/hogan.js/web/favicon.ico -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/apple-touch-icon-114-precomposed.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/apple-touch-icon-57-precomposed.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/ico/apple-touch-icon-72-precomposed.png -------------------------------------------------------------------------------- /docs/assets/img/bs-docs-responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/bs-docs-responsive-illustrations.png -------------------------------------------------------------------------------- /docs/assets/img/example-sites/cadastro-globocom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/example-sites/cadastro-globocom.png -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-fluid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-fluid.jpg -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-hero.jpg -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/build/node_modules/hogan.js/web/images/logo.png -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-signin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-signin.png -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-starter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-starter.jpg -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/templates/list.mustache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/images/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/build/node_modules/hogan.js/web/images/noise.png -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-carousel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-carousel.png -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/images/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/build/node_modules/hogan.js/web/images/stripes.png -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf3.json: -------------------------------------------------------------------------------- 1 | { 2 | /* multiline comment */ 3 | "key": "value" 4 | /* 5 | multiline comment 6 | */ 7 | } 8 | -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/fixtures/conf4.json: -------------------------------------------------------------------------------- 1 | { 2 | "//key" : "value", 3 | "key": "//value", 4 | "/*key": "value", 5 | "key": "/*value*/" 6 | } 7 | -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-sticky-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-sticky-footer.png -------------------------------------------------------------------------------- /docs/assets/img/examples/bootstrap-example-marketing-narrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/assets/img/examples/bootstrap-example-marketing-narrow.png -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globocom/bootstrap/HEAD/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png -------------------------------------------------------------------------------- /docs/build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-doc-builder" 3 | , "version": "0.0.1" 4 | , "description": "build bootstrap docs" 5 | , "dependencies": { "hogan.js": "1.0.5-dev" } 6 | } 7 | -------------------------------------------------------------------------------- /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "version": "2.2.2", 4 | "main": ["./docs/assets/js/bootstrap.js", "./docs/assets/css/bootstrap.css"], 5 | "dependencies": { 6 | "jquery": "~1.8.0" 7 | } 8 | } -------------------------------------------------------------------------------- /js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "validthis": true, 3 | "laxcomma" : true, 4 | "laxbreak" : true, 5 | "browser" : true, 6 | "eqnull" : true, 7 | "debug" : true, 8 | "devel" : true, 9 | "boss" : true, 10 | "expr" : true, 11 | "asi" : true 12 | } -------------------------------------------------------------------------------- /js/tests/server.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Simple connect server for phantom.js 3 | * Adapted from Modernizr 4 | */ 5 | 6 | var connect = require('connect') 7 | , http = require('http') 8 | , fs = require('fs') 9 | , app = connect() 10 | .use(connect.static(__dirname + '/../../')); 11 | 12 | http.createServer(app).listen(3000); 13 | 14 | fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8') -------------------------------------------------------------------------------- /less/layouts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container (centered, fixed-width layouts) 7 | .container { 8 | .container-fixed(); 9 | } 10 | 11 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 12 | .container-fluid { 13 | padding-right: @gridGutterWidth; 14 | padding-left: @gridGutterWidth; 15 | .clearfix(); 16 | } -------------------------------------------------------------------------------- /less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | 6 | .fade { 7 | opacity: 0; 8 | .transition(opacity .15s linear); 9 | &.in { 10 | opacity: 1; 11 | } 12 | } 13 | 14 | .collapse { 15 | position: relative; 16 | height: 0; 17 | overflow: hidden; 18 | .transition(height .35s ease); 19 | &.in { 20 | height: auto; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | test 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /js/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 | }) -------------------------------------------------------------------------------- /less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Quick floats 7 | .pull-right { 8 | float: right; 9 | } 10 | .pull-left { 11 | float: left; 12 | } 13 | 14 | // Toggling content 15 | .hide { 16 | display: none; 17 | } 18 | .show { 19 | display: block; 20 | } 21 | 22 | // Visibility 23 | .invisible { 24 | visibility: hidden; 25 | } 26 | 27 | // For Affix plugin 28 | .affix { 29 | position: fixed; 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.zip 10 | *.vi 11 | *~ 12 | *.sass-cache 13 | .rvmrc 14 | # OS or Editor folders 15 | .DS_Store 16 | ._* 17 | Thumbs.db 18 | .cache 19 | .project 20 | .settings 21 | .tmproj 22 | *.esproj 23 | nbproject 24 | *.sublime-project 25 | *.sublime-workspace 26 | 27 | # Komodo 28 | *.komodoproject 29 | .komodotools 30 | 31 | # Folders to ignore 32 | .hg 33 | .svn 34 | .CVS 35 | .idea 36 | node_modules 37 | dist 38 | -------------------------------------------------------------------------------- /less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Fixed (940px) 7 | #grid > .core(@gridColumnWidth, @gridGutterWidth); 8 | 9 | // Fluid (940px) 10 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); 11 | 12 | // Reset utility classes due to specificity 13 | [class*="span"].hide, 14 | .row-fluid [class*="span"].hide { 15 | display: none; 16 | } 17 | 18 | [class*="span"].pull-right, 19 | .row-fluid [class*="span"].pull-right { 20 | float: right; 21 | } 22 | -------------------------------------------------------------------------------- /less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin: 0 0 @baseLineHeight; 9 | list-style: none; 10 | background-color: #f5f5f5; 11 | .border-radius(@baseBorderRadius); 12 | li { 13 | display: inline-block; 14 | .ie7-inline-block(); 15 | text-shadow: 0 1px 0 @white; 16 | } 17 | .divider { 18 | padding: 0 5px; 19 | color: #ccc; 20 | } 21 | .active { 22 | color: @grayLight; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /less/responsive-768px-979px.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Tablet to desktop 3 | // -------------------------------------------------- 4 | 5 | 6 | @media (min-width: 768px) and (max-width: 979px) { 7 | 8 | // Fixed grid 9 | #grid > .core(@gridColumnWidth768, @gridGutterWidth768); 10 | 11 | // Fluid grid 12 | #grid > .fluid(@fluidGridColumnWidth768, @fluidGridGutterWidth768); 13 | 14 | // Input grid 15 | #grid > .input(@gridColumnWidth768, @gridGutterWidth768); 16 | 17 | // No need to reset .thumbnails here since it's the same @gridGutterWidth 18 | 19 | } 20 | -------------------------------------------------------------------------------- /less/hero-unit.less: -------------------------------------------------------------------------------- 1 | // 2 | // Hero unit 3 | // -------------------------------------------------- 4 | 5 | 6 | .hero-unit { 7 | padding: 60px; 8 | margin-bottom: 30px; 9 | font-size: 18px; 10 | font-weight: 200; 11 | line-height: @baseLineHeight * 1.5; 12 | color: @heroUnitLeadColor; 13 | background-color: @heroUnitBackground; 14 | .border-radius(6px); 15 | h1 { 16 | margin-bottom: 0; 17 | font-size: 60px; 18 | line-height: 1; 19 | color: @heroUnitHeadingColor; 20 | letter-spacing: -1px; 21 | } 22 | li { 23 | line-height: @baseLineHeight * 1.5; // Reset since we specify in type.less 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hogan.js" 3 | , "description": "A mustache compiler." 4 | , "version": "1.0.5-dev" 5 | , "keywords": ["mustache", "template"] 6 | , "main": "./lib/hogan.js" 7 | , "homepage": "http://twitter.github.com/hogan.js/" 8 | , "author": "Twitter Inc." 9 | , "repository": { 10 | "type": "git" 11 | , "url": "https://github.com/twitter/hogan.js.git" 12 | } 13 | , "licenses": [ 14 | { "type": "Apache-2.0" 15 | , "url": "http://www.apache.org/licenses/LICENSE-2.0" 16 | } 17 | ] 18 | , "devDependencies": { "uglify-js": "*" } 19 | , "bin" : { "hulk" : "./bin/hulk" } 20 | } 21 | -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-affix.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-affix") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).affix, 'affix method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).affix()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should exit early if element is not visible", function () { 14 | var $affix = $('
').affix() 15 | $affix.data('affix').checkPosition() 16 | ok(!$affix.hasClass('affix'), 'affix class was not added') 17 | }) 18 | 19 | }) -------------------------------------------------------------------------------- /less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @wellBackground; 12 | border: 1px solid darken(@wellBackground, 7%); 13 | .border-radius(@baseBorderRadius); 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-large { 23 | padding: 24px; 24 | .border-radius(@borderRadiusLarge); 25 | } 26 | .well-small { 27 | padding: 9px; 28 | .border-radius(@borderRadiusSmall); 29 | } 30 | -------------------------------------------------------------------------------- /less/responsive-1200px-min.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Large desktop and up 3 | // -------------------------------------------------- 4 | 5 | 6 | @media (min-width: 1200px) { 7 | 8 | // Fixed grid 9 | #grid > .core(@gridColumnWidth1200, @gridGutterWidth1200); 10 | 11 | // Fluid grid 12 | #grid > .fluid(@fluidGridColumnWidth1200, @fluidGridGutterWidth1200); 13 | 14 | // Input grid 15 | #grid > .input(@gridColumnWidth1200, @gridGutterWidth1200); 16 | 17 | // Thumbnails 18 | .thumbnails { 19 | margin-left: -@gridGutterWidth1200; 20 | } 21 | .thumbnails > li { 22 | margin-left: @gridGutterWidth1200; 23 | } 24 | .row-fluid .thumbnails { 25 | margin-left: 0; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/wrappers/js.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | {{{template}}} 17 | {{{compiler}}} 18 | -------------------------------------------------------------------------------- /less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: 20px; 9 | font-weight: bold; 10 | line-height: @baseLineHeight; 11 | color: @black; 12 | text-shadow: 0 1px 0 rgba(255,255,255,1); 13 | .opacity(20); 14 | &:hover { 15 | color: @black; 16 | text-decoration: none; 17 | cursor: pointer; 18 | .opacity(40); 19 | } 20 | } 21 | 22 | // Additional properties for button version 23 | // iOS requires the button element instead of an anchor tag. 24 | // If you want the anchor version, it requires `href="#"`. 25 | button.close { 26 | padding: 0; 27 | cursor: pointer; 28 | background: transparent; 29 | border: 0; 30 | -webkit-appearance: none; 31 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap" 3 | , "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development." 4 | , "version": "2.2.2" 5 | , "keywords": ["bootstrap", "css"] 6 | , "homepage": "http://twitter.github.com/bootstrap/" 7 | , "author": "Twitter Inc." 8 | , "scripts": { "test": "make test" } 9 | , "repository": { 10 | "type": "git" 11 | , "url": "https://github.com/twitter/bootstrap.git" 12 | } 13 | , "licenses": [ 14 | { 15 | "type": "Apache-2.0" 16 | , "url": "http://www.apache.org/licenses/LICENSE-2.0" 17 | } 18 | ] 19 | , "devDependencies": { 20 | "uglify-js": "1.2.6" 21 | , "jshint": "0.6.1" 22 | , "recess": "1.0.3" 23 | , "connect": "2.1.3" 24 | } 25 | } -------------------------------------------------------------------------------- /less/accordion.less: -------------------------------------------------------------------------------- 1 | // 2 | // Accordion 3 | // -------------------------------------------------- 4 | 5 | 6 | // Parent container 7 | .accordion { 8 | margin-bottom: @baseLineHeight; 9 | } 10 | 11 | // Group == heading + body 12 | .accordion-group { 13 | margin-bottom: 2px; 14 | border: 1px solid #e5e5e5; 15 | .border-radius(@baseBorderRadius); 16 | } 17 | .accordion-heading { 18 | border-bottom: 0; 19 | } 20 | .accordion-heading .accordion-toggle { 21 | display: block; 22 | padding: 8px 15px; 23 | } 24 | 25 | // General toggle styles 26 | .accordion-toggle { 27 | cursor: pointer; 28 | } 29 | 30 | // Inner needs the styles because you can't animate properly with any styles on the element 31 | .accordion-inner { 32 | padding: 9px 15px; 33 | border-top: 1px solid #e5e5e5; 34 | } 35 | -------------------------------------------------------------------------------- /docs/templates/pages/whatsnew.mustache: -------------------------------------------------------------------------------- 1 | 3 |
4 |
5 |

{{_i}}Whats new in Globo Bootstrap?{{/i}}

6 |

{{_i}}Check what is new in the Bootstrap.{{/i}} 7 |

8 |
9 | 10 |
11 |
12 | 16 | 17 |
{{! /.container }} 18 | -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-phantom.js: -------------------------------------------------------------------------------- 1 | // Logging setup for phantom integration 2 | // adapted from Modernizr 3 | 4 | QUnit.begin = function () { 5 | console.log("Starting test suite") 6 | console.log("================================================\n") 7 | } 8 | 9 | QUnit.moduleDone = function (opts) { 10 | if (opts.failed === 0) { 11 | console.log("\u2714 All tests passed in '" + opts.name + "' module") 12 | } else { 13 | console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module") 14 | } 15 | } 16 | 17 | QUnit.done = function (opts) { 18 | console.log("\n================================================") 19 | console.log("Tests completed in " + opts.runtime + " milliseconds") 20 | console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.") 21 | } -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/wrappers/amd.js.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | {{{template}}} 17 | {{{compiler}}} 18 | 19 | if (typeof define === 'function' && define.amd) { 20 | define(Hogan); 21 | } 22 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/wrappers/common.js.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | {{{template}}} 17 | {{{compiler}}} 18 | 19 | if (typeof module !== 'undefined' && module.exports) { 20 | module.exports = Hogan; 21 | } 22 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/lib/hogan.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | // This file is for use with Node.js. See dist/ for browser files. 17 | 18 | var Hogan = require('./compiler'); 19 | Hogan.Template = require('./template').Template; 20 | module.exports = Hogan; -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/Rakefile: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'yaml' 3 | 4 | # Our custom YAML tags must retain their magic. 5 | %w[ code ].each do |tag| 6 | YAML::add_builtin_type(tag) { |_,val| val.merge(:__tag__ => tag) } 7 | end 8 | 9 | desc 'Build all alternate versions of the specs.' 10 | multitask :build => [ 'build:json' ] 11 | 12 | namespace :build do 13 | note = 'Do not edit this file; changes belong in the appropriate YAML file.' 14 | 15 | desc 'Build JSON versions of the specs.' 16 | task :json do 17 | rm(Dir['specs/*.json'], :verbose => false) 18 | Dir.glob('specs/*.yml').each do |filename| 19 | json_file = filename.gsub('.yml', '.json') 20 | 21 | File.open(json_file, 'w') do |file| 22 | doc = YAML.load_file(filename) 23 | file << doc.merge(:__ATTN__ => note).to_json() 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | margin: @baseLineHeight 0; 8 | list-style: none; 9 | text-align: center; 10 | .clearfix(); 11 | } 12 | .pager li { 13 | display: inline; 14 | } 15 | .pager li > a, 16 | .pager li > span { 17 | display: inline-block; 18 | padding: 5px 14px; 19 | background-color: #fff; 20 | border: 1px solid #ddd; 21 | .border-radius(15px); 22 | } 23 | .pager li > a:hover { 24 | text-decoration: none; 25 | background-color: #f5f5f5; 26 | } 27 | .pager .next > a, 28 | .pager .next > span { 29 | float: right; 30 | } 31 | .pager .previous > a, 32 | .pager .previous > span { 33 | float: left; 34 | } 35 | .pager .disabled > a, 36 | .pager .disabled > a:hover, 37 | .pager .disabled > span { 38 | color: @grayLight; 39 | background-color: #fff; 40 | cursor: default; 41 | } -------------------------------------------------------------------------------- /docs/assets/js/google-code-prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .prettyprint .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 20px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /less/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | *overflow: visible; 14 | zoom: 1; 15 | } 16 | 17 | // Proper spacing between instances of .media 18 | .media, 19 | .media .media { 20 | margin-top: 15px; 21 | } 22 | .media:first-child { 23 | margin-top: 0; 24 | } 25 | 26 | // For images and videos, set to block 27 | .media-object { 28 | display: block; 29 | } 30 | 31 | // Reset margins on headings for tighter default spacing 32 | .media-heading { 33 | margin: 0 0 5px; 34 | } 35 | 36 | 37 | // Media image alignment 38 | // ------------------------- 39 | 40 | .media .pull-left { 41 | margin-right: 10px; 42 | } 43 | .media .pull-right { 44 | margin-left: 10px; 45 | } 46 | 47 | 48 | // Media list variation 49 | // ------------------------- 50 | 51 | // Undo default ul/ol styles 52 | .media-list { 53 | margin-left: 0; 54 | list-style: none; 55 | } 56 | -------------------------------------------------------------------------------- /less/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Body reset 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: @bodyBackground; 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 | 31 | 32 | // Images 33 | // ------------------------- 34 | 35 | // Rounded corners 36 | .img-rounded { 37 | .border-radius(6px); 38 | } 39 | 40 | // Add polaroid-esque trim 41 | .img-polaroid { 42 | padding: 4px; 43 | background-color: #fff; 44 | border: 1px solid #ccc; 45 | border: 1px solid rgba(0,0,0,.2); 46 | .box-shadow(0 1px 3px rgba(0,0,0,.1)); 47 | } 48 | 49 | // Perfect circle 50 | .img-circle { 51 | .border-radius(500px); // crank the border-radius so it works with most reasonably sized images 52 | } 53 | -------------------------------------------------------------------------------- /js/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 ='
' 17 | + '
' 18 | + '
' 19 | + '

Bootstrap

' 20 | + '' 23 | + '
' 24 | + '
' 25 | + '
' 26 | , $topbar = $(topbarHTML).scrollspy() 27 | 28 | ok($topbar.find('.active', true)) 29 | }) 30 | 31 | }) -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cjson", 3 | "description": "cjson - Commented Javascript Object Notation. It is a json loader, which parses only valide json files, but with comments enabled. Usefull for loading configs.", 4 | "version": "0.0.6", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/kof/node-cjson.git" 8 | }, 9 | "keywords": [ 10 | "json", 11 | "parser", 12 | "comments", 13 | "config", 14 | "loader" 15 | ], 16 | "author": { 17 | "name": "Oleg Slobodskoi", 18 | "email": "oleg008@gmail.com" 19 | }, 20 | "engines": { 21 | "node": ">= 0.3.0" 22 | }, 23 | "licenses": [ 24 | { 25 | "type": "MIT", 26 | "url": "http://www.opensource.org/licenses/mit-license.php" 27 | } 28 | ], 29 | "_id": "cjson@0.0.6", 30 | "dependencies": {}, 31 | "devDependencies": {}, 32 | "optionalDependencies": {}, 33 | "_engineSupported": true, 34 | "_npmVersion": "1.1.4", 35 | "_nodeVersion": "v0.6.6", 36 | "_defaultsLoaded": true, 37 | "dist": { 38 | "shasum": "e848d39c23429679f03acdf179465f545c409f8a" 39 | }, 40 | "_from": "cjson" 41 | } 42 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/Changes: -------------------------------------------------------------------------------- 1 | 2011-03-20: v1.1.2 2 | Added tests for standalone tags at string boundaries. 3 | Added tests for rendering lambda returns after delimiter changes. 4 | 5 | 2011-03-20: v1.0.3 6 | Added tests for standalone tags at string boundaries. 7 | Added tests for rendering lambda returns after delimiter changes. 8 | 9 | 2011-03-05: v1.1.1 10 | Added tests for indented inline sections. 11 | Added tests for Windows-style newlines. 12 | 13 | 2011-03-05: v1.0.2 14 | Added tests for indented inline sections. 15 | Added tests for Windows-style newlines. 16 | 17 | 2011-03-04: v1.1.0 18 | Implicit iterators. 19 | A single period (`.`) may now be used as a name in Interpolation tags, 20 | which represents the top of stack (cast as a String). 21 | Dotted names. 22 | Names containing one or more periods should be resolved as chained 23 | properties; naïvely, this is like nesting section tags, but with some 24 | built-in scoping protections. 25 | 26 | 2011-03-02: v1.0.1 27 | Clarifying a point in the README about version compliance. 28 | Adding high-level documentation to each spec file. 29 | 30 | 2011-02-28: v1.0.0 31 | Initial Release 32 | -------------------------------------------------------------------------------- /less/responsive.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.2.2 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 | 12 | // Responsive.less 13 | // For phone and tablet devices 14 | // ------------------------------------------------------------- 15 | 16 | 17 | // REPEAT VARIABLES & MIXINS 18 | // ------------------------- 19 | // Required since we compile the responsive stuff separately 20 | 21 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 22 | @import "mixins.less"; 23 | 24 | 25 | // RESPONSIVE CLASSES 26 | // ------------------ 27 | 28 | @import "responsive-utilities.less"; 29 | 30 | 31 | // MEDIA QUERIES 32 | // ------------------ 33 | 34 | // Large desktops 35 | @import "responsive-1200px-min.less"; 36 | 37 | // Tablets to regular desktops 38 | @import "responsive-768px-979px.less"; 39 | 40 | // Phones to portrait tablets and narrow desktops 41 | @import "responsive-767px-max.less"; 42 | 43 | 44 | // RESPONSIVE NAVBAR 45 | // ------------------ 46 | 47 | // From 979px and below, show a button to toggle navbar contents 48 | @import "responsive-navbar.less"; 49 | -------------------------------------------------------------------------------- /docs/build/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var hogan = require('hogan.js') 3 | , fs = require('fs') 4 | , prod = process.argv[2] == 'production' 5 | , title = 'Bootstrap' 6 | 7 | var layout, pages 8 | 9 | // compile layout template 10 | layout = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8') 11 | layout = hogan.compile(layout, { sectionTags: [{o:'_i', c:'i'}] }) 12 | 13 | // retrieve pages 14 | pages = fs.readdirSync(__dirname + '/../templates/pages') 15 | 16 | // iterate over pages 17 | pages.forEach(function (name) { 18 | 19 | if (!name.match(/\.mustache$/)) return 20 | 21 | var page = fs.readFileSync(__dirname + '/../templates/pages/' + name, 'utf-8') 22 | , context = {} 23 | 24 | context[name.replace(/\.mustache$/, '')] = 'active' 25 | context._i = true 26 | context.production = prod 27 | context.title = name 28 | .replace(/\.mustache/, '') 29 | .replace(/\-.*/, '') 30 | .replace(/(.)/, function ($1) { return $1.toUpperCase() }) 31 | 32 | if (context.title == 'Index') { 33 | context.title = title 34 | } else { 35 | context.title += ' · ' + title 36 | } 37 | 38 | page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] }) 39 | page = layout.render(context, { 40 | body: page 41 | }) 42 | 43 | fs.writeFileSync(__dirname + '/../' + name.replace(/mustache$/, 'html'), page, 'utf-8') 44 | }) -------------------------------------------------------------------------------- /less/responsive-utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Hide from screenreaders and browsers 7 | // Credit: HTML5 Boilerplate 8 | .hidden { 9 | display: none; 10 | visibility: hidden; 11 | } 12 | 13 | // Visibility utilities 14 | 15 | // For desktops 16 | .visible-phone { display: none !important; } 17 | .visible-tablet { display: none !important; } 18 | .hidden-phone { } 19 | .hidden-tablet { } 20 | .hidden-desktop { display: none !important; } 21 | .visible-desktop { display: inherit !important; } 22 | 23 | // Tablets & small desktops only 24 | @media (min-width: 768px) and (max-width: 979px) { 25 | // Hide everything else 26 | .hidden-desktop { display: inherit !important; } 27 | .visible-desktop { display: none !important ; } 28 | // Show 29 | .visible-tablet { display: inherit !important; } 30 | // Hide 31 | .hidden-tablet { display: none !important; } 32 | } 33 | 34 | // Phones only 35 | @media (max-width: 767px) { 36 | // Hide everything else 37 | .hidden-desktop { display: inherit !important; } 38 | .visible-desktop { display: none !important; } 39 | // Show 40 | .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior 41 | // Hide 42 | .hidden-phone { display: none !important; } 43 | } 44 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/tools/web_templates.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | var Hogan = require(__dirname + '/../lib/hogan.js'); 17 | var fs = require('fs'); 18 | var path = require('path'); 19 | 20 | // Substitute variables in the homepage with values from package.json 21 | var homeTemplatePath = __dirname + '/../build/gh-pages/index.html.mustache'; 22 | var contextPath = __dirname + '/../dist/nodejs/package.json'; 23 | 24 | var homepage = fs.readFileSync(homeTemplatePath).toString(); 25 | var context = JSON.parse(fs.readFileSync(contextPath).toString()); 26 | 27 | var template = Hogan.compile(homepage); 28 | 29 | fs.writeFileSync(path.dirname(homeTemplatePath) + '/index.html', 30 | template.render(context)); 31 | 32 | fs.unlinkSync(homeTemplatePath); -------------------------------------------------------------------------------- /less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: 8px 35px 8px 14px; 11 | margin-bottom: @baseLineHeight; 12 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 13 | background-color: @warningBackground; 14 | border: 1px solid @warningBorder; 15 | .border-radius(@baseBorderRadius); 16 | color: @warningText; 17 | } 18 | .alert h4 { 19 | margin: 0; 20 | } 21 | 22 | // Adjust close link position 23 | .alert .close { 24 | position: relative; 25 | top: -2px; 26 | right: -21px; 27 | line-height: @baseLineHeight; 28 | } 29 | 30 | 31 | // Alternate styles 32 | // ------------------------- 33 | 34 | .alert-success { 35 | background-color: @successBackground; 36 | border-color: @successBorder; 37 | color: @successText; 38 | } 39 | .alert-danger, 40 | .alert-error { 41 | background-color: @errorBackground; 42 | border-color: @errorBorder; 43 | color: @errorText; 44 | } 45 | .alert-info { 46 | background-color: @infoBackground; 47 | border-color: @infoBorder; 48 | color: @infoText; 49 | } 50 | 51 | 52 | // Block alerts 53 | // ------------------------- 54 | 55 | .alert-block { 56 | padding-top: 14px; 57 | padding-bottom: 14px; 58 | } 59 | .alert-block > p, 60 | .alert-block > ul { 61 | margin-bottom: 0; 62 | } 63 | .alert-block p + p { 64 | margin-top: 5px; 65 | } 66 | -------------------------------------------------------------------------------- /less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and blocK) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | pre { 9 | padding: 0 3px 2px; 10 | #font > #family > .monospace; 11 | font-size: @baseFontSize - 2; 12 | color: @grayDark; 13 | .border-radius(3px); 14 | } 15 | 16 | // Inline code 17 | code { 18 | padding: 2px 4px; 19 | color: #d14; 20 | background-color: #f7f7f9; 21 | border: 1px solid #e1e1e8; 22 | white-space: nowrap; 23 | } 24 | 25 | // Blocks of code 26 | pre { 27 | display: block; 28 | padding: (@baseLineHeight - 1) / 2; 29 | margin: 0 0 @baseLineHeight / 2; 30 | font-size: @baseFontSize - 1; // 14px to 13px 31 | line-height: @baseLineHeight; 32 | word-break: break-all; 33 | word-wrap: break-word; 34 | white-space: pre; 35 | white-space: pre-wrap; 36 | background-color: #f5f5f5; 37 | border: 1px solid #ccc; // fallback for IE7-8 38 | border: 1px solid rgba(0,0,0,.15); 39 | .border-radius(@baseBorderRadius); 40 | 41 | // Make prettyprint styles more spaced out for readability 42 | &.prettyprint { 43 | margin-bottom: @baseLineHeight; 44 | } 45 | 46 | // Account for some code outputs that place code tags in pre tags 47 | code { 48 | padding: 0; 49 | color: inherit; 50 | background-color: transparent; 51 | border: 0; 52 | } 53 | } 54 | 55 | // Enable scrollable blocks of code 56 | .pre-scrollable { 57 | max-height: 340px; 58 | overflow-y: scroll; 59 | } -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/Makefile: -------------------------------------------------------------------------------- 1 | REPO = git@github.com:twitter/hogan.js.git 2 | BUILD := build 3 | VERSION = ${shell node -e 'var s = JSON.parse(require("fs").readFileSync("package.json").toString()).version; console.log(s.substring(0, s.indexOf("-")));'} 4 | 5 | # 6 | # Run command line tests 7 | # 8 | test: 9 | @ node test/index.js 10 | 11 | # 12 | # Run Mustache spec tests 13 | # 14 | spec: 15 | @ node test/spec.js 16 | 17 | # 18 | # Run benchmark 19 | # 20 | benchmark: 21 | @ node benchmark/console/index.js 22 | 23 | clean: 24 | @ rm -rf dist/* 25 | # 26 | # Make a new version of Hogan from the current dev version. 27 | # 28 | release: clean 29 | @ echo "Creating a new version of Hogan." 30 | @ mkdir -p dist/nodejs 31 | @ cp -R lib dist/nodejs/lib 32 | @ node tools/release.js 33 | @ mkdir -p web/builds/$(VERSION) 34 | @ cp dist/*.* web/builds/$(VERSION)/. 35 | # 36 | # Make the gh-pages website 37 | # 38 | # This target builds the hogan.js github website using hogan.js. 39 | # 40 | # cd into build/gh-pages to check in the new site. 41 | # 42 | GH_PAGES = $(BUILD)/gh-pages 43 | web: | pages 44 | @cp -R web/* $(GH_PAGES) 45 | @@ node tools/web_templates.js 46 | @echo 47 | @echo "Website built in $(GH_PAGES)." 48 | 49 | # 50 | # Checkout the gh-pages branch. 51 | # 52 | pages: | $(BUILD) 53 | @if [ ! -d "$(GH_PAGES)" ]; then \ 54 | git clone -b gh-pages $(REPO) $(GH_PAGES); \ 55 | rm -rf $(GH_PAGES)/*; \ 56 | fi; 57 | @mkdir -p $(GH_PAGES)/images 58 | 59 | $(BUILD): 60 | mkdir -p $(BUILD) 61 | 62 | .PHONY: test spec benchmark web release 63 | -------------------------------------------------------------------------------- /less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v2.2.2 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 "reset.less"; 13 | 14 | // Core variables and mixins 15 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 16 | @import "mixins.less"; 17 | 18 | // Grid system and page structure 19 | @import "scaffolding.less"; 20 | @import "grid.less"; 21 | @import "layouts.less"; 22 | 23 | // Base CSS 24 | @import "type.less"; 25 | @import "code.less"; 26 | @import "forms.less"; 27 | @import "tables.less"; 28 | 29 | // Components: common 30 | @import "sprites.less"; 31 | @import "dropdowns.less"; 32 | @import "wells.less"; 33 | @import "component-animations.less"; 34 | @import "close.less"; 35 | 36 | // Components: Buttons & Alerts 37 | @import "buttons.less"; 38 | @import "button-groups.less"; 39 | @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less 40 | 41 | // Components: Nav 42 | @import "navs.less"; 43 | @import "navbar.less"; 44 | @import "breadcrumbs.less"; 45 | @import "pagination.less"; 46 | @import "pager.less"; 47 | 48 | // Components: Popovers 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "balloon.less"; 53 | 54 | // Components: Misc 55 | @import "thumbnails.less"; 56 | @import "media.less"; 57 | @import "labels-badges.less"; 58 | @import "progress-bars.less"; 59 | @import "accordion.less"; 60 | @import "carousel.less"; 61 | @import "hero-unit.less"; 62 | 63 | // Utility classes 64 | @import "utilities.less"; // Has to be last to override when necessary 65 | -------------------------------------------------------------------------------- /less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files 7 | 8 | // Make wrapper ul behave like the grid 9 | .thumbnails { 10 | margin-left: -@gridGutterWidth; 11 | list-style: none; 12 | .clearfix(); 13 | } 14 | // Fluid rows have no left margin 15 | .row-fluid .thumbnails { 16 | margin-left: 0; 17 | } 18 | 19 | // Float li to make thumbnails appear in a row 20 | .thumbnails > li { 21 | float: left; // Explicity set the float since we don't require .span* classes 22 | margin-bottom: @baseLineHeight; 23 | margin-left: @gridGutterWidth; 24 | } 25 | 26 | // The actual thumbnail (can be `a` or `div`) 27 | .thumbnail { 28 | display: block; 29 | padding: 4px; 30 | line-height: @baseLineHeight; 31 | border: 1px solid #ddd; 32 | .border-radius(@baseBorderRadius); 33 | .box-shadow(0 1px 3px rgba(0,0,0,.055)); 34 | .transition(all .2s ease-in-out); 35 | } 36 | 37 | // Add a hover state for linked versions only 38 | a.thumbnail:hover { 39 | border-color: @linkColor; 40 | .box-shadow(0 1px 4px rgba(0,105,214,.25)); 41 | } 42 | 43 | // Images and captions 44 | .thumbnail > img { 45 | display: block; 46 | max-width: 100%; 47 | margin-left: auto; 48 | margin-right: auto; 49 | } 50 | .thumbnail .caption { 51 | padding: 9px; 52 | color: @gray; 53 | } 54 | 55 | // thumbnail hover effects 56 | a.inner-border, a.inner-border img { 57 | .border-radius(3px); 58 | } 59 | 60 | a.inner-border { 61 | border: none; 62 | padding: 0; 63 | } 64 | 65 | a.inner-border span { 66 | opacity: 0; 67 | } 68 | 69 | a.inner-border:hover { 70 | position: relative; 71 | } 72 | 73 | a.inner-border:hover span { 74 | border: 3px solid; 75 | position: absolute; 76 | width: 98%; 77 | height: 96%; 78 | top: 0; 79 | left: 0; 80 | opacity: 1; 81 | .border-radius(3px); 82 | } 83 | -------------------------------------------------------------------------------- /less/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindexTooltip; 10 | display: block; 11 | visibility: visible; 12 | padding: 5px; 13 | font-size: 11px; 14 | .opacity(0); 15 | &.in { .opacity(80); } 16 | &.top { margin-top: -3px; } 17 | &.right { margin-left: 3px; } 18 | &.bottom { margin-top: 3px; } 19 | &.left { margin-left: -3px; } 20 | } 21 | 22 | // Wrapper for the tooltip content 23 | .tooltip-inner { 24 | max-width: 200px; 25 | padding: 3px 8px; 26 | color: @tooltipColor; 27 | text-align: center; 28 | text-decoration: none; 29 | background-color: @tooltipBackground; 30 | .border-radius(@baseBorderRadius); 31 | } 32 | 33 | // Arrows 34 | .tooltip-arrow { 35 | position: absolute; 36 | width: 0; 37 | height: 0; 38 | border-color: transparent; 39 | border-style: solid; 40 | } 41 | .tooltip { 42 | &.top .tooltip-arrow { 43 | bottom: 0; 44 | left: 50%; 45 | margin-left: -@tooltipArrowWidth; 46 | border-width: @tooltipArrowWidth @tooltipArrowWidth 0; 47 | border-top-color: @tooltipArrowColor; 48 | } 49 | &.right .tooltip-arrow { 50 | top: 50%; 51 | left: 0; 52 | margin-top: -@tooltipArrowWidth; 53 | border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0; 54 | border-right-color: @tooltipArrowColor; 55 | } 56 | &.left .tooltip-arrow { 57 | top: 50%; 58 | right: 0; 59 | margin-top: -@tooltipArrowWidth; 60 | border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth; 61 | border-left-color: @tooltipArrowColor; 62 | } 63 | &.bottom .tooltip-arrow { 64 | top: 0; 65 | left: 50%; 66 | margin-left: -@tooltipArrowWidth; 67 | border-width: 0 @tooltipArrowWidth @tooltipArrowWidth; 68 | border-bottom-color: @tooltipArrowColor; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/TESTING.md: -------------------------------------------------------------------------------- 1 | Testing your Mustache implementation against this specification should be 2 | relatively simple. If you have a readily available testing framework on your 3 | platform, your task may be even simpler. 4 | 5 | In general, the process for each `.yml` file is as follows: 6 | 7 | 1. Use a YAML parser to load the file. 8 | 9 | 2. For each test in the 'tests' array: 10 | 11 | 1. Ensure that each element of the 'partials' hash (if it exists) is 12 | stored in a place where the interpreter will look for it. 13 | 14 | 2. If your implementation will not support lambdas, feel free to skip over 15 | the optional '~lambdas.yml' file. 16 | 17 | 2.1. If your implementation will support lambdas, ensure that each member of 18 | 'data' tagged with '!code' is properly processed into a language- 19 | specific lambda reference. 20 | 21 | * e.g. Given this YAML data hash: 22 | 23 | `{ x: !code { ruby: 'proc { "x" }', perl: 'sub { "x" }' } }` 24 | 25 | a Ruby-based Mustache implementation would process it such that it 26 | was equivalent to this Ruby hash: 27 | 28 | `{ 'x' => proc { "x" } }` 29 | 30 | * If your implementation language does not currently have lambda 31 | examples in the spec, feel free to implement them and send a pull 32 | request. 33 | 34 | * The JSON version of the spec represents these tagged values as a hash 35 | with a '`__tag__`' key of 'code'. 36 | 37 | 3. Render the template (stored in the 'template' key) with the given 'data' 38 | hash. 39 | 40 | 4. Compare the results of your rendering against the 'expected' value; any 41 | differences should be reported, along with any useful debugging 42 | information. 43 | 44 | * Of note, the 'desc' key contains a rough one-line description of the 45 | behavior being tested -- this is most useful in conjunction with the 46 | file name and test 'name'. 47 | -------------------------------------------------------------------------------- /js/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | /* =================================================== 2 | * bootstrap-transition.js v2.2.2 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 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) 27 | * ======================================================= */ 28 | 29 | $(function () { 30 | 31 | $.support.transition = (function () { 32 | 33 | var transitionEnd = (function () { 34 | 35 | var el = document.createElement('bootstrap') 36 | , transEndEventNames = { 37 | 'WebkitTransition' : 'webkitTransitionEnd' 38 | , 'MozTransition' : 'transitionend' 39 | , 'OTransition' : 'oTransitionEnd otransitionend' 40 | , 'transition' : 'transitionend' 41 | } 42 | , name 43 | 44 | for (name in transEndEventNames){ 45 | if (el.style[name] !== undefined) { 46 | return transEndEventNames[name] 47 | } 48 | } 49 | 50 | }()) 51 | 52 | return transitionEnd && { 53 | end: transitionEnd 54 | } 55 | 56 | })() 57 | 58 | }) 59 | 60 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | /* =================================================== 2 | * bootstrap-transition.js v2.2.2 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 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) 27 | * ======================================================= */ 28 | 29 | $(function () { 30 | 31 | $.support.transition = (function () { 32 | 33 | var transitionEnd = (function () { 34 | 35 | var el = document.createElement('bootstrap') 36 | , transEndEventNames = { 37 | 'WebkitTransition' : 'webkitTransitionEnd' 38 | , 'MozTransition' : 'transitionend' 39 | , 'OTransition' : 'oTransitionEnd otransitionend' 40 | , 'transition' : 'transitionend' 41 | } 42 | , name 43 | 44 | for (name in transEndEventNames){ 45 | if (el.style[name] !== undefined) { 46 | return transEndEventNames[name] 47 | } 48 | } 49 | 50 | }()) 51 | 52 | return transitionEnd && { 53 | end: transitionEnd 54 | } 55 | 56 | })() 57 | 58 | }) 59 | 60 | }(window.jQuery); -------------------------------------------------------------------------------- /js/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 = '
' 15 | + '×' 16 | + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' 17 | + '
' 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 = '
' 29 | + '×' 30 | + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' 31 | + '
' 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 | test("should not fire closed when close is prevented", function () { 42 | $.support.transition = false 43 | stop(); 44 | $('
') 45 | .bind('close', function (e) { 46 | e.preventDefault(); 47 | ok(true); 48 | start(); 49 | }) 50 | .bind('closed', function () { 51 | ok(false); 52 | }) 53 | .alert('close') 54 | }) 55 | 56 | }) -------------------------------------------------------------------------------- /less/labels-badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels and badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .label, 8 | .badge { 9 | display: inline-block; 10 | padding: 2px 4px; 11 | font-size: @baseFontSize * .846; 12 | font-weight: bold; 13 | line-height: 14px; // ensure proper line-height if floated 14 | color: @white; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 18 | background-color: @grayLight; 19 | } 20 | // Set unique padding and border-radii 21 | .label { 22 | .border-radius(3px); 23 | } 24 | .badge { 25 | padding-left: 9px; 26 | padding-right: 9px; 27 | .border-radius(9px); 28 | } 29 | 30 | // Empty labels/badges collapse 31 | .label, 32 | .badge { 33 | &:empty { 34 | display: none; 35 | } 36 | } 37 | 38 | // Hover state, but only for links 39 | a { 40 | &.label:hover, 41 | &.badge:hover { 42 | color: @white; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Colors 49 | // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute) 50 | .label, 51 | .badge { 52 | // Important (red) 53 | &-important { background-color: @errorText; } 54 | &-important[href] { background-color: darken(@errorText, 10%); } 55 | // Warnings (orange) 56 | &-warning { background-color: @orange; } 57 | &-warning[href] { background-color: darken(@orange, 10%); } 58 | // Success (green) 59 | &-success { background-color: @successText; } 60 | &-success[href] { background-color: darken(@successText, 10%); } 61 | // Info (turquoise) 62 | &-info { background-color: @infoText; } 63 | &-info[href] { background-color: darken(@infoText, 10%); } 64 | // Inverse (black) 65 | &-inverse { background-color: @grayDark; } 66 | &-inverse[href] { background-color: darken(@grayDark, 10%); } 67 | } 68 | 69 | // Quick fix for labels/badges in buttons 70 | .btn { 71 | .label, 72 | .badge { 73 | position: relative; 74 | top: -1px; 75 | } 76 | } 77 | .btn-mini { 78 | .label, 79 | .badge { 80 | top: 0; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright 2012 Twitter, Inc. 3 | * @license http://www.apache.org/licenses/LICENSE-2.0.txt 4 | */ 5 | var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&").replace(c,"<").replace(d,">").replace(e,"'").replace(f,"""):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=//g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan) -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/test/test.js: -------------------------------------------------------------------------------- 1 | var a = require('assert'); 2 | var cjson = require('../lib/cjson'); 3 | var fixtures = __dirname + '/fixtures'; 4 | 5 | var data = { 6 | conf1: {key: 'value'}, 7 | conf2: {key: 'value'}, 8 | conf3: {key: 'value'}, 9 | conf4: { 10 | "//key" : "value", 11 | "key": "//value", 12 | "/*key": "value", 13 | "key": "/*value*/" 14 | }, 15 | conf5: {"'key/*test*/'": "'value//test'"}, 16 | conf6: {"key\"/*test*/": "value\"//test"}, 17 | conf7: {"key": "{{root}}/src"}, 18 | conf8: {} 19 | }; 20 | 21 | a.doesNotThrow(function() { 22 | cjson.load(fixtures + '/conf1.json'); 23 | }, 'valid config loaded'); 24 | 25 | a.deepEqual(cjson.load(fixtures + '/conf1.json'), data.conf1, 'data is correct'); 26 | 27 | a.deepEqual(cjson.load(fixtures + '/conf2.json'), data.conf2, 'singleline comment'); 28 | 29 | a.deepEqual(cjson.load(fixtures + '/conf3.json'), data.conf3, 'multiline comment'); 30 | 31 | a.deepEqual(cjson.load(fixtures + '/conf4.json'), data.conf4, 'comments inside of a string'); 32 | 33 | a.deepEqual(cjson.load(fixtures + '/conf5.json'), data.conf5, 'single and double quotes mix'); 34 | 35 | a.deepEqual(cjson.load(fixtures + '/conf6.json'), data.conf6, 'escaped double quote inside of a string'); 36 | 37 | a.deepEqual(cjson.load(fixtures + '/conf7.json', {replace: {root: '/usr'}}), {"key": "/usr/src"}, 'tmpl replacement'); 38 | 39 | a.deepEqual(cjson.load(fixtures + '/conf8.json'), data.conf8, 'string-like comment'); 40 | 41 | var data1 = { 42 | conf1: {key: 'value'}, 43 | conf6: data.conf6 44 | }; 45 | 46 | a.deepEqual(cjson.load([fixtures + '/conf1.json', fixtures + '/conf6.json']), data1, 'load array of jsons'); 47 | 48 | 49 | var data2 = { 50 | key: 'value', 51 | "key\"/*test*/": "value\"//test" 52 | }; 53 | 54 | a.deepEqual(cjson.load([fixtures + '/conf1.json', fixtures + '/conf6.json'], true), data2, 'load array of jsons and merge them'); 55 | 56 | a.deepEqual(cjson.load(fixtures), data, 'load all and merge them'); 57 | 58 | var str = require('fs').readFileSync(fixtures + '/conf2.json').toString(); 59 | 60 | a.deepEqual(cjson.parse(str), data.conf2, '.parse method with comments'); 61 | 62 | console.log('All tests passed.'); 63 | 64 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | // A wrapper for compatibility with Mustache.js, quirks and all 17 | 18 | {{{template}}} 19 | {{{compiler}}} 20 | 21 | var Mustache = (function (Hogan) { 22 | 23 | // Mustache.js has non-spec partial context behavior 24 | function mustachePartial(name, context, partials, indent) { 25 | var partialScope = this.f(name, context, partials, 0); 26 | var cx = context; 27 | if (partialScope) { 28 | cx = cx.concat(partialScope); 29 | } 30 | 31 | return Hogan.Template.prototype.rp.call(this, name, cx, partials, indent); 32 | } 33 | 34 | var HoganTemplateWrapper = function(renderFunc, text, compiler){ 35 | this.rp = mustachePartial; 36 | Hogan.Template.call(this, renderFunc, text, compiler); 37 | }; 38 | HoganTemplateWrapper.prototype = Hogan.Template.prototype; 39 | 40 | // Add a wrapper for Hogan's generate method. Mustache and Hogan keep 41 | // separate caches, and Mustache returns wrapped templates. 42 | var wrapper; 43 | var HoganWrapper = function(){ 44 | this.cache = {}; 45 | this.generate = function(code, text, options) { 46 | return new HoganTemplateWrapper(new Function('c', 'p', 'i', code), text, wrapper); 47 | } 48 | }; 49 | HoganWrapper.prototype = Hogan; 50 | wrapper = new HoganWrapper(); 51 | 52 | return { 53 | to_html: function(text, data, partials, sendFun) { 54 | var template = wrapper.compile(text); 55 | var result = template.render(data, partials); 56 | if (!sendFun) { 57 | return result; 58 | } 59 | 60 | sendFun(result); 61 | } 62 | } 63 | 64 | })(Hogan); 65 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/specs/comments.json: -------------------------------------------------------------------------------- 1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Comment tags represent content that should never appear in the resulting\noutput.\n\nThe tag's content may contain any substring (including newlines) EXCEPT the\nclosing delimiter.\n\nComment tags SHOULD be treated as standalone when appropriate.\n","tests":[{"name":"Inline","data":{},"expected":"1234567890","template":"12345{{! Comment Block! }}67890","desc":"Comment blocks should be removed from the template."},{"name":"Multiline","data":{},"expected":"1234567890\n","template":"12345{{!\n This is a\n multi-line comment...\n}}67890\n","desc":"Multiline comments should be permitted."},{"name":"Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{! Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{! Indented Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n|","template":"|\r\n{{! Standalone Comment }}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags."},{"name":"Standalone Without Previous Line","data":{},"expected":"!","template":" {{! I'm Still Standalone }}\n!","desc":"Standalone tags should not require a newline to precede them."},{"name":"Standalone Without Newline","data":{},"expected":"!\n","template":"!\n {{! I'm Still Standalone }}","desc":"Standalone tags should not require a newline to follow them."},{"name":"Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{!\nSomething's going on here...\n}}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{!\n Something's going on here...\n }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Inline","data":{},"expected":" 12 \n","template":" 12 {{! 34 }}\n","desc":"Inline comments should not strip whitespace"},{"name":"Surrounding Whitespace","data":{},"expected":"12345 67890","template":"12345 {{! Comment Block! }} 67890","desc":"Comment removal should preserve surrounding whitespace."}]} -------------------------------------------------------------------------------- /js/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 | 43 | 44 | 45 | 46 | 47 | 48 |
49 |

Bootstrap Plugin Test Suite

50 |

51 |

52 |
    53 |
    54 |
    55 | 56 | 57 | -------------------------------------------------------------------------------- /less/modals.less: -------------------------------------------------------------------------------- 1 | // 2 | // Modals 3 | // -------------------------------------------------- 4 | 5 | // Background 6 | .modal-backdrop { 7 | position: fixed; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | z-index: @zindexModalBackdrop; 13 | background-color: @black; 14 | // Fade for backdrop 15 | &.fade { opacity: 0; } 16 | } 17 | 18 | .modal-backdrop, 19 | .modal-backdrop.fade.in { 20 | .opacity(80); 21 | } 22 | 23 | // Base modal 24 | .modal { 25 | position: fixed; 26 | top: 10%; 27 | left: 50%; 28 | z-index: @zindexModal; 29 | width: 560px; 30 | margin-left: -280px; 31 | background-color: @white; 32 | border: 1px solid #999; 33 | border: 1px solid rgba(0,0,0,.3); 34 | *border: 1px solid #999; /* IE6-7 */ 35 | .border-radius(6px); 36 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 37 | .background-clip(padding-box); 38 | // Remove focus outline from opened modal 39 | outline: none; 40 | 41 | &.fade { 42 | .transition(e('opacity .3s linear, top .3s ease-out')); 43 | top: -25%; 44 | } 45 | &.fade.in { top: 10%; } 46 | } 47 | .modal-header { 48 | padding: 9px 15px; 49 | border-bottom: 1px solid #eee; 50 | // Close icon 51 | .close { margin-top: 2px; } 52 | // Heading 53 | h3 { 54 | margin: 0; 55 | line-height: 30px; 56 | } 57 | } 58 | 59 | // Body (where all modal content resides) 60 | .modal-body { 61 | overflow-y: auto; 62 | max-height: 400px; 63 | padding: 15px; 64 | } 65 | // Remove bottom margin if need be 66 | .modal-form { 67 | margin-bottom: 0; 68 | } 69 | 70 | // Footer (for actions) 71 | .modal-footer { 72 | padding: 14px 15px 15px; 73 | margin-bottom: 0; 74 | text-align: right; // right align buttons 75 | background-color: #f5f5f5; 76 | border-top: 1px solid #ddd; 77 | .border-radius(0 0 6px 6px); 78 | .box-shadow(inset 0 1px 0 @white); 79 | .clearfix(); // clear it in case folks use .pull-* classes on buttons 80 | 81 | // Properly space out buttons 82 | .btn + .btn { 83 | margin-left: 5px; 84 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 85 | } 86 | // but override that for button groups 87 | .btn-group .btn + .btn { 88 | margin-left: -1px; 89 | } 90 | // and override it for block buttons as well 91 | .btn-block + .btn-block { 92 | margin-left: 0; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /js/tests/phantom.js: -------------------------------------------------------------------------------- 1 | // Simple phantom.js integration script 2 | // Adapted from Modernizr 3 | 4 | function waitFor(testFx, onReady, timeOutMillis) { 5 | var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s 6 | , start = new Date().getTime() 7 | , condition = false 8 | , interval = setInterval(function () { 9 | if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) { 10 | // If not time-out yet and condition not yet fulfilled 11 | condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code 12 | } else { 13 | if (!condition) { 14 | // If condition still not fulfilled (timeout but condition is 'false') 15 | console.log("'waitFor()' timeout") 16 | phantom.exit(1) 17 | } else { 18 | // Condition fulfilled (timeout and/or condition is 'true') 19 | typeof(onReady) === "string" ? eval(onReady) : onReady() //< Do what it's supposed to do once the condition is fulfilled 20 | clearInterval(interval) //< Stop this interval 21 | } 22 | } 23 | }, 100) //< repeat check every 100ms 24 | } 25 | 26 | 27 | if (phantom.args.length === 0 || phantom.args.length > 2) { 28 | console.log('Usage: phantom.js URL') 29 | phantom.exit() 30 | } 31 | 32 | var page = new WebPage() 33 | 34 | // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") 35 | page.onConsoleMessage = function(msg) { 36 | console.log(msg) 37 | }; 38 | 39 | page.open(phantom.args[0], function(status){ 40 | if (status !== "success") { 41 | console.log("Unable to access network") 42 | phantom.exit() 43 | } else { 44 | waitFor(function(){ 45 | return page.evaluate(function(){ 46 | var el = document.getElementById('qunit-testresult') 47 | if (el && el.innerText.match('completed')) { 48 | return true 49 | } 50 | return false 51 | }) 52 | }, function(){ 53 | var failedNum = page.evaluate(function(){ 54 | var el = document.getElementById('qunit-testresult') 55 | try { 56 | return el.getElementsByClassName('failed')[0].innerHTML 57 | } catch (e) { } 58 | return 10000 59 | }); 60 | phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0) 61 | }) 62 | } 63 | }) -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | var Hogan = Hogan || require('../lib/hogan'); 17 | var doc = this["document"]; 18 | var fs = require('fs'); 19 | 20 | var passed = 0; 21 | var failed = 0; 22 | 23 | if (!this["output"]) { 24 | var output = function (string) { 25 | return doc ? doc.write(string + '
    ') : console.log(string); 26 | }; 27 | } 28 | 29 | function runTest(tests) { 30 | tests.forEach(function(test) { 31 | var partials = {}; 32 | for (var i in test.partials) { 33 | partials[i] = Hogan.compile(test.partials[i]); 34 | } 35 | var t = Hogan.compile(test.template); 36 | 37 | if (test.data.lambda) { 38 | var func = (new Function ('return ' + test.data.lambda.js)()); 39 | test.data.lambda = function() { return func; }; 40 | } 41 | 42 | var s = t.render(test.data, partials); 43 | is(s, test.expected, test.name + ': ' + test.desc); 44 | }); 45 | } 46 | 47 | var testDir = './test/spec/specs'; 48 | var files = fs.readdirSync(testDir) 49 | .filter(function(f) { return f.indexOf('.json') > 0; }) 50 | .map(function(f) { return testDir + '/' + f}); 51 | 52 | for (var i = 0; i < files.length; i++) { 53 | var test = JSON.parse(fs.readFileSync(files[i]).toString()); 54 | runTest(test.tests); 55 | } 56 | 57 | function is(got, expected, msg) { 58 | if (got === expected) { 59 | output("OK: " + msg); 60 | ++passed; 61 | } else { 62 | output("FAIL: " + msg); 63 | output("Expected |" + expected + "|"); 64 | output(" Got |" + got + "|"); 65 | ++failed; 66 | } 67 | } 68 | 69 | function complete() { 70 | output("\nTests Complete"); 71 | output("--------------"); 72 | output("Passed: " + passed); 73 | output("Failed: " + failed); 74 | output("\n"); 75 | } 76 | 77 | complete(); 78 | -------------------------------------------------------------------------------- /less/tests/forms-responsive.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap, from Twitter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
    36 | 37 | 40 | 41 |

    Vertical alignment

    42 | 43 | 44 | span1 45 | 46 |

    Width across elements

    47 |
    48 | 49 |
    50 |
    51 | 52 |
    53 |
    54 | span2 55 |
    56 | 57 | 58 | 61 | 62 |
    63 | 64 | 65 | span1 66 |
    67 | 68 |
    69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /less/carousel.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | .carousel { 7 | position: relative; 8 | margin-bottom: @baseLineHeight; 9 | line-height: 1; 10 | } 11 | 12 | .carousel-inner { 13 | overflow: hidden; 14 | width: 100%; 15 | position: relative; 16 | } 17 | 18 | .carousel { 19 | 20 | .item { 21 | display: none; 22 | position: relative; 23 | .transition(.6s ease-in-out left); 24 | } 25 | 26 | // Account for jankitude on images 27 | .item > img { 28 | display: block; 29 | line-height: 1; 30 | } 31 | 32 | .active, 33 | .next, 34 | .prev { display: block; } 35 | 36 | .active { 37 | left: 0; 38 | } 39 | 40 | .next, 41 | .prev { 42 | position: absolute; 43 | top: 0; 44 | width: 100%; 45 | } 46 | 47 | .next { 48 | left: 100%; 49 | } 50 | .prev { 51 | left: -100%; 52 | } 53 | .next.left, 54 | .prev.right { 55 | left: 0; 56 | } 57 | 58 | .active.left { 59 | left: -100%; 60 | } 61 | .active.right { 62 | left: 100%; 63 | } 64 | 65 | } 66 | 67 | // Left/right controls for nav 68 | // --------------------------- 69 | 70 | .carousel-control { 71 | position: absolute; 72 | top: 40%; 73 | left: 15px; 74 | width: 40px; 75 | height: 40px; 76 | margin-top: -20px; 77 | font-size: 60px; 78 | font-weight: 100; 79 | line-height: 30px; 80 | color: @white; 81 | text-align: center; 82 | background: @grayDarker; 83 | border: 3px solid @white; 84 | .border-radius(23px); 85 | .opacity(50); 86 | 87 | // we can't have this transition here 88 | // because webkit cancels the carousel 89 | // animation if you trip this while 90 | // in the middle of another animation 91 | // ;_; 92 | // .transition(opacity .2s linear); 93 | 94 | // Reposition the right one 95 | &.right { 96 | left: auto; 97 | right: 15px; 98 | } 99 | 100 | // Hover state 101 | &:hover { 102 | color: @white; 103 | text-decoration: none; 104 | .opacity(90); 105 | } 106 | } 107 | 108 | 109 | // Caption for text below images 110 | // ----------------------------- 111 | 112 | .carousel-caption { 113 | position: absolute; 114 | left: 0; 115 | right: 0; 116 | bottom: 0; 117 | padding: 15px; 118 | background: @grayDark; 119 | background: rgba(0,0,0,.75); 120 | } 121 | .carousel-caption h4, 122 | .carousel-caption p { 123 | color: @white; 124 | line-height: @baseLineHeight; 125 | } 126 | .carousel-caption h4 { 127 | margin: 0 0 5px; 128 | } 129 | .carousel-caption p { 130 | margin-bottom: 0; 131 | } 132 | -------------------------------------------------------------------------------- /js/bootstrap-alert.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alert.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* ALERT CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var dismiss = '[data-dismiss="alert"]' 30 | , Alert = function (el) { 31 | $(el).on('click', dismiss, this.close) 32 | } 33 | 34 | Alert.prototype.close = function (e) { 35 | var $this = $(this) 36 | , selector = $this.attr('data-target') 37 | , $parent 38 | 39 | if (!selector) { 40 | selector = $this.attr('href') 41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 42 | } 43 | 44 | $parent = $(selector) 45 | 46 | e && e.preventDefault() 47 | 48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) 49 | 50 | $parent.trigger(e = $.Event('close')) 51 | 52 | if (e.isDefaultPrevented()) return 53 | 54 | $parent.removeClass('in') 55 | 56 | function removeElement() { 57 | $parent 58 | .trigger('closed') 59 | .remove() 60 | } 61 | 62 | $.support.transition && $parent.hasClass('fade') ? 63 | $parent.on($.support.transition.end, removeElement) : 64 | removeElement() 65 | } 66 | 67 | 68 | /* ALERT PLUGIN DEFINITION 69 | * ======================= */ 70 | 71 | $.fn.alert = function (option) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('alert') 75 | if (!data) $this.data('alert', (data = new Alert(this))) 76 | if (typeof option == 'string') data[option].call($this) 77 | }) 78 | } 79 | 80 | $.fn.alert.Constructor = Alert 81 | 82 | 83 | /* ALERT DATA-API 84 | * ============== */ 85 | 86 | $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) 87 | 88 | }(window.jQuery); 89 | -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-alert.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alert.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* ALERT CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var dismiss = '[data-dismiss="alert"]' 30 | , Alert = function (el) { 31 | $(el).on('click', dismiss, this.close) 32 | } 33 | 34 | Alert.prototype.close = function (e) { 35 | var $this = $(this) 36 | , selector = $this.attr('data-target') 37 | , $parent 38 | 39 | if (!selector) { 40 | selector = $this.attr('href') 41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 42 | } 43 | 44 | $parent = $(selector) 45 | 46 | e && e.preventDefault() 47 | 48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) 49 | 50 | $parent.trigger(e = $.Event('close')) 51 | 52 | if (e.isDefaultPrevented()) return 53 | 54 | $parent.removeClass('in') 55 | 56 | function removeElement() { 57 | $parent 58 | .trigger('closed') 59 | .remove() 60 | } 61 | 62 | $.support.transition && $parent.hasClass('fade') ? 63 | $parent.on($.support.transition.end, removeElement) : 64 | removeElement() 65 | } 66 | 67 | 68 | /* ALERT PLUGIN DEFINITION 69 | * ======================= */ 70 | 71 | $.fn.alert = function (option) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('alert') 75 | if (!data) $this.data('alert', (data = new Alert(this))) 76 | if (typeof option == 'string') data[option].call($this) 77 | }) 78 | } 79 | 80 | $.fn.alert.Constructor = Alert 81 | 82 | 83 | /* ALERT DATA-API 84 | * ============== */ 85 | 86 | $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) 87 | 88 | }(window.jQuery); 89 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/README.md: -------------------------------------------------------------------------------- 1 | ## Hogan.js - A mustache compiler. 2 | 3 | [Hogan.js](http://twitter.github.com/hogan.js/) is a compiler for the 4 | [Mustache](http://mustache.github.com/) templating language. For information 5 | on Mustache, see the [manpage](http://mustache.github.com/mustache.5.html) and 6 | the [spec](https://github.com/mustache/spec). 7 | 8 | ## Basics 9 | 10 | Hogan compiles templates to HoganTemplate objects, which have a render method. 11 | 12 | ```js 13 | var data = { 14 | screenName: "dhg", 15 | }; 16 | 17 | var template = Hogan.compile("Follow @{{screenName}}."); 18 | var output = template.render(data); 19 | 20 | // prints "Follow @dhg." 21 | console.log(output); 22 | ``` 23 | 24 | ## Features 25 | 26 | Hogan is fast--try it on your workload. 27 | 28 | Hogan has separate scanning, parsing and code generation phases. This way it's 29 | possible to add new features without touching the scanner at all, and many 30 | different code generation techniques can be tried without changing the parser. 31 | 32 | Hogan exposes scan and parse methods. These can be useful for 33 | pre-processing templates on the server. 34 | 35 | ```js 36 | var text = "{{^check}}{{i18n}}No{{/i18n}}{{/check}}"; 37 | text += "{{#check}}{{i18n}}Yes{{/i18n}}{{/check}}"; 38 | var tree = Hogan.parse(Hogan.scan(text)); 39 | 40 | // outputs "# check" 41 | console.log(tree[0].tag + " " + tree[0].name); 42 | 43 | // outputs "Yes" 44 | console.log(tree[1].nodes[0].nodes[0]); 45 | ``` 46 | 47 | It's also possible to use HoganTemplate objects without the Hogan compiler 48 | present. That means you can pre-compile your templates on the server, and 49 | avoid shipping the compiler. However, the optional lambda features from the 50 | Mustache spec do require the compiler to be present. 51 | 52 | ## Why Hogan.js? 53 | 54 | Why another templating library? 55 | 56 | Hogan.js was written to meet three templating library requirements: good 57 | performance, standalone template objects, and a parser API. 58 | 59 | ## Issues 60 | 61 | Have a bug? Please create an issue here on GitHub! 62 | 63 | https://github.com/twitter/hogan.js/issues 64 | 65 | ## Versioning 66 | 67 | For transparency and insight into our release cycle, releases will be numbered with the follow format: 68 | 69 | `..` 70 | 71 | And constructed with the following guidelines: 72 | 73 | * Breaking backwards compatibility bumps the major 74 | * New additions without breaking backwards compatibility bumps the minor 75 | * Bug fixes and misc changes bump the patch 76 | 77 | For more information on semantic versioning, please visit http://semver.org/. 78 | 79 | ## Authors 80 | 81 | **Robert Sayre** 82 | 83 | + http://github.com/sayrer 84 | 85 | **Jacob Thornton** 86 | 87 | + http://github.com/fat 88 | 89 | ## License 90 | 91 | Copyright 2011 Twitter, Inc. 92 | 93 | Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 -------------------------------------------------------------------------------- /docs/build/node_modules/.bin/hulk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | * Copyright 2011 Twitter, Inc. 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | var hogan = require('../lib/hogan.js'), 19 | path = require('path'), 20 | fs = require('fs'); 21 | 22 | var specials = ['/', '.', '*', '+', '?', '|','(', ')', '[', ']', '{', '}', '\\'], 23 | specialsRegExp = new RegExp('(\\' + specials.join('|\\') + ')', 'g'), 24 | templates; 25 | 26 | 27 | // Escape special regexp characters 28 | function esc(text) { 29 | return text.replace(specialsRegExp, '\\$1'); 30 | } 31 | 32 | 33 | // Check for dirs and correct ext (<3 for windows) 34 | function extractFiles(args) { 35 | var usage = 'USAGE: hulk ./templates/*.mustaches\n' + 36 | 'NOTE: hulk supports the "*" wildcard and allows you to target specific extensions too', 37 | files = []; 38 | 39 | if (!args.length) { 40 | console.log(usage); 41 | process.exit(-1); 42 | } 43 | 44 | args.forEach(function (arg) { 45 | 46 | if (/\*/.test(arg)) { 47 | arg = arg.split('*'); 48 | return files = files.concat( 49 | fs.readdirSync(arg[0] || '.') 50 | .map(function (f) { 51 | return new RegExp(esc(arg[1]) + '$').test(f) && path.join(arg[0], f); 52 | }) 53 | .filter(function (f) { 54 | return f; 55 | }) 56 | ); 57 | } 58 | 59 | files.push(arg); 60 | 61 | }) 62 | 63 | return files; 64 | } 65 | 66 | 67 | // Remove utf-8 byte order mark, http://en.wikipedia.org/wiki/Byte_order_mark 68 | function removeByteOrderMark(text) { 69 | if (text.charCodeAt(0) === 0xfeff) { 70 | return text.substring(1); 71 | } 72 | return text; 73 | } 74 | 75 | 76 | // Write a template foreach file that matches template extension 77 | templates = extractFiles(process.argv.slice(2)) 78 | .map(function (file) { 79 | var openedFile = fs.readFileSync(file, 'utf-8'), name; 80 | if (!openedFile) return; 81 | name = file.replace(/\..*$/, ''); 82 | openedFile = removeByteOrderMark(openedFile.trim()); 83 | return 'templates.' + name + ' = new Hogan.Template(' + hogan.compile(openedFile, { asString: 1 }) + ');'; 84 | }) 85 | .filter(function (t) { 86 | return t; 87 | }); 88 | 89 | 90 | // Output templates 91 | if (!templates.length) return; 92 | console.log('var templates = {};'); 93 | console.log(templates.join('\n')); -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/bin/hulk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | * Copyright 2011 Twitter, Inc. 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | var hogan = require('../lib/hogan.js'), 19 | path = require('path'), 20 | fs = require('fs'); 21 | 22 | var specials = ['/', '.', '*', '+', '?', '|','(', ')', '[', ']', '{', '}', '\\'], 23 | specialsRegExp = new RegExp('(\\' + specials.join('|\\') + ')', 'g'), 24 | templates; 25 | 26 | 27 | // Escape special regexp characters 28 | function esc(text) { 29 | return text.replace(specialsRegExp, '\\$1'); 30 | } 31 | 32 | 33 | // Check for dirs and correct ext (<3 for windows) 34 | function extractFiles(args) { 35 | var usage = 'USAGE: hulk ./templates/*.mustaches\n' + 36 | 'NOTE: hulk supports the "*" wildcard and allows you to target specific extensions too', 37 | files = []; 38 | 39 | if (!args.length) { 40 | console.log(usage); 41 | process.exit(-1); 42 | } 43 | 44 | args.forEach(function (arg) { 45 | 46 | if (/\*/.test(arg)) { 47 | arg = arg.split('*'); 48 | return files = files.concat( 49 | fs.readdirSync(arg[0] || '.') 50 | .map(function (f) { 51 | return new RegExp(esc(arg[1]) + '$').test(f) && path.join(arg[0], f); 52 | }) 53 | .filter(function (f) { 54 | return f; 55 | }) 56 | ); 57 | } 58 | 59 | files.push(arg); 60 | 61 | }) 62 | 63 | return files; 64 | } 65 | 66 | 67 | // Remove utf-8 byte order mark, http://en.wikipedia.org/wiki/Byte_order_mark 68 | function removeByteOrderMark(text) { 69 | if (text.charCodeAt(0) === 0xfeff) { 70 | return text.substring(1); 71 | } 72 | return text; 73 | } 74 | 75 | 76 | // Write a template foreach file that matches template extension 77 | templates = extractFiles(process.argv.slice(2)) 78 | .map(function (file) { 79 | var openedFile = fs.readFileSync(file, 'utf-8'), name; 80 | if (!openedFile) return; 81 | name = file.replace(/\..*$/, ''); 82 | openedFile = removeByteOrderMark(openedFile.trim()); 83 | return 'templates.' + name + ' = new Hogan.Template(' + hogan.compile(openedFile, { asString: 1 }) + ');'; 84 | }) 85 | .filter(function (t) { 86 | return t; 87 | }); 88 | 89 | 90 | // Output templates 91 | if (!templates.length) return; 92 | console.log('var templates = {};'); 93 | console.log(templates.join('\n')); -------------------------------------------------------------------------------- /js/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 | 46 | test("should not fire closed when close is prevented", function () { 47 | $.support.transition = false 48 | stop(); 49 | $('
    ') 50 | .bind('show', function (e) { 51 | e.preventDefault(); 52 | ok(true); 53 | start(); 54 | }) 55 | .bind('shown', function () { 56 | ok(false); 57 | }) 58 | .tab('show') 59 | }) 60 | 61 | test("show and shown events should reference correct relatedTarget", function () { 62 | var dropHTML = 63 | '
      ' 64 | + '' 70 | + '
    ' 71 | 72 | $(dropHTML).find('ul>li:first a').tab('show').end() 73 | .find('ul>li:last a').on('show', function(event){ 74 | equals(event.relatedTarget.hash, "#1-1") 75 | }).on('shown', function(event){ 76 | equals(event.relatedTarget.hash, "#1-1") 77 | }).tab('show') 78 | }) 79 | 80 | }) -------------------------------------------------------------------------------- /js/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 | test("should not fire shown when show is prevented", function () { 26 | $.support.transition = false 27 | stop() 28 | $('
    ') 29 | .bind('show', function (e) { 30 | e.preventDefault(); 31 | ok(true); 32 | start(); 33 | }) 34 | .bind('shown', function () { 35 | ok(false); 36 | }) 37 | .collapse('show') 38 | }) 39 | 40 | test("should reset style to auto after finishing opening collapse", function () { 41 | $.support.transition = false 42 | stop() 43 | $('
    ') 44 | .bind('show', function () { 45 | ok(this.style.height == '0px') 46 | }) 47 | .bind('shown', function () { 48 | ok(this.style.height == 'auto') 49 | start() 50 | }) 51 | .collapse('show') 52 | }) 53 | 54 | test("should add active class to target when collapse shown", function () { 55 | $.support.transition = false 56 | stop() 57 | 58 | var target = $('') 59 | .appendTo($('#qunit-fixture')) 60 | 61 | var collapsible = $('
    ') 62 | .appendTo($('#qunit-fixture')) 63 | .on('show', function () { 64 | ok(!target.hasClass('collapsed')) 65 | start() 66 | }) 67 | 68 | target.click() 69 | }) 70 | 71 | test("should remove active class to target when collapse hidden", function () { 72 | $.support.transition = false 73 | stop() 74 | 75 | var target = $('') 76 | .appendTo($('#qunit-fixture')) 77 | 78 | var collapsible = $('
    ') 79 | .appendTo($('#qunit-fixture')) 80 | .on('hide', function () { 81 | ok(target.hasClass('collapsed')) 82 | start() 83 | }) 84 | 85 | target.click() 86 | }) 87 | 88 | }) -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/specs/partials.json: -------------------------------------------------------------------------------- 1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Partial tags are used to expand an external template into the current\ntemplate.\n\nThe tag's content MUST be a non-whitespace character sequence NOT containing\nthe current closing delimiter.\n\nThis tag's content names the partial to inject. Set Delimiter tags MUST NOT\naffect the parsing of a partial. The partial MUST be rendered against the\ncontext stack local to the tag. If the named partial cannot be found, the\nempty string SHOULD be used instead, as in interpolations.\n\nPartial tags SHOULD be treated as standalone when appropriate. If this tag\nis used standalone, any whitespace preceding the tag should treated as\nindentation, and prepended to each line of the partial before rendering.\n","tests":[{"name":"Basic Behavior","data":{},"expected":"\"from partial\"","template":"\"{{>text}}\"","desc":"The greater-than operator should expand to the named partial.","partials":{"text":"from partial"}},{"name":"Failed Lookup","data":{},"expected":"\"\"","template":"\"{{>text}}\"","desc":"The empty string should be used when the named partial is not found.","partials":{}},{"name":"Context","data":{"text":"content"},"expected":"\"*content*\"","template":"\"{{>partial}}\"","desc":"The greater-than operator should operate within the current context.","partials":{"partial":"*{{text}}*"}},{"name":"Recursion","data":{"content":"X","nodes":[{"content":"Y","nodes":[]}]},"expected":"X>","template":"{{>node}}","desc":"The greater-than operator should properly recurse.","partials":{"node":"{{content}}<{{#nodes}}{{>node}}{{/nodes}}>"}},{"name":"Surrounding Whitespace","data":{},"expected":"| \t|\t |","template":"| {{>partial}} |","desc":"The greater-than operator should not alter surrounding whitespace.","partials":{"partial":"\t|\t"}},{"name":"Inline Indentation","data":{"data":"|"},"expected":" | >\n>\n","template":" {{data}} {{> partial}}\n","desc":"Whitespace should be left untouched.","partials":{"partial":">\n>"}},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n>|","template":"|\r\n{{>partial}}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags.","partials":{"partial":">"}},{"name":"Standalone Without Previous Line","data":{},"expected":" >\n >>","template":" {{>partial}}\n>","desc":"Standalone tags should not require a newline to precede them.","partials":{"partial":">\n>"}},{"name":"Standalone Without Newline","data":{},"expected":">\n >\n >","template":">\n {{>partial}}","desc":"Standalone tags should not require a newline to follow them.","partials":{"partial":">\n>"}},{"name":"Standalone Indentation","data":{"content":"<\n->"},"expected":"\\\n |\n <\n->\n |\n/\n","template":"\\\n {{>partial}}\n/\n","desc":"Each line of the partial should be indented before rendering.","partials":{"partial":"|\n{{{content}}}\n|\n"}},{"name":"Padding Whitespace","data":{"boolean":true},"expected":"|[]|","template":"|{{> partial }}|","desc":"Superfluous in-tag whitespace should be ignored.","partials":{"partial":"[]"}}]} -------------------------------------------------------------------------------- /js/bootstrap-button.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-button.js v2.2.2 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 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* BUTTON PUBLIC CLASS DEFINITION 27 | * ============================== */ 28 | 29 | var Button = function (element, options) { 30 | this.$element = $(element) 31 | this.options = $.extend({}, $.fn.button.defaults, options) 32 | } 33 | 34 | Button.prototype.setState = function (state) { 35 | var d = 'disabled' 36 | , $el = this.$element 37 | , data = $el.data() 38 | , val = $el.is('input') ? 'val' : 'html' 39 | 40 | state = state + 'Text' 41 | data.resetText || $el.data('resetText', $el[val]()) 42 | 43 | $el[val](data[state] || this.options[state]) 44 | 45 | // push to event loop to allow forms to submit 46 | setTimeout(function () { 47 | state == 'loadingText' ? 48 | $el.addClass(d).attr(d, d) : 49 | $el.removeClass(d).removeAttr(d) 50 | }, 0) 51 | } 52 | 53 | Button.prototype.toggle = function () { 54 | var $parent = this.$element.closest('[data-toggle="buttons-radio"]') 55 | 56 | $parent && $parent 57 | .find('.active') 58 | .removeClass('active') 59 | 60 | this.$element.toggleClass('active') 61 | } 62 | 63 | 64 | /* BUTTON PLUGIN DEFINITION 65 | * ======================== */ 66 | 67 | $.fn.button = function (option) { 68 | return this.each(function () { 69 | var $this = $(this) 70 | , data = $this.data('button') 71 | , options = typeof option == 'object' && option 72 | if (!data) $this.data('button', (data = new Button(this, options))) 73 | if (option == 'toggle') data.toggle() 74 | else if (option) data.setState(option) 75 | }) 76 | } 77 | 78 | $.fn.button.defaults = { 79 | loadingText: 'loading...' 80 | } 81 | 82 | $.fn.button.Constructor = Button 83 | 84 | 85 | /* BUTTON DATA-API 86 | * =============== */ 87 | 88 | $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { 89 | var $btn = $(e.target) 90 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 91 | $btn.button('toggle') 92 | }) 93 | 94 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/specs/comments.yml: -------------------------------------------------------------------------------- 1 | overview: | 2 | Comment tags represent content that should never appear in the resulting 3 | output. 4 | 5 | The tag's content may contain any substring (including newlines) EXCEPT the 6 | closing delimiter. 7 | 8 | Comment tags SHOULD be treated as standalone when appropriate. 9 | tests: 10 | - name: Inline 11 | desc: Comment blocks should be removed from the template. 12 | data: { } 13 | template: '12345{{! Comment Block! }}67890' 14 | expected: '1234567890' 15 | 16 | - name: Multiline 17 | desc: Multiline comments should be permitted. 18 | data: { } 19 | template: | 20 | 12345{{! 21 | This is a 22 | multi-line comment... 23 | }}67890 24 | expected: | 25 | 1234567890 26 | 27 | - name: Standalone 28 | desc: All standalone comment lines should be removed. 29 | data: { } 30 | template: | 31 | Begin. 32 | {{! Comment Block! }} 33 | End. 34 | expected: | 35 | Begin. 36 | End. 37 | 38 | - name: Indented Standalone 39 | desc: All standalone comment lines should be removed. 40 | data: { } 41 | template: | 42 | Begin. 43 | {{! Indented Comment Block! }} 44 | End. 45 | expected: | 46 | Begin. 47 | End. 48 | 49 | - name: Standalone Line Endings 50 | desc: '"\r\n" should be considered a newline for standalone tags.' 51 | data: { } 52 | template: "|\r\n{{! Standalone Comment }}\r\n|" 53 | expected: "|\r\n|" 54 | 55 | - name: Standalone Without Previous Line 56 | desc: Standalone tags should not require a newline to precede them. 57 | data: { } 58 | template: " {{! I'm Still Standalone }}\n!" 59 | expected: "!" 60 | 61 | - name: Standalone Without Newline 62 | desc: Standalone tags should not require a newline to follow them. 63 | data: { } 64 | template: "!\n {{! I'm Still Standalone }}" 65 | expected: "!\n" 66 | 67 | - name: Multiline Standalone 68 | desc: All standalone comment lines should be removed. 69 | data: { } 70 | template: | 71 | Begin. 72 | {{! 73 | Something's going on here... 74 | }} 75 | End. 76 | expected: | 77 | Begin. 78 | End. 79 | 80 | - name: Indented Multiline Standalone 81 | desc: All standalone comment lines should be removed. 82 | data: { } 83 | template: | 84 | Begin. 85 | {{! 86 | Something's going on here... 87 | }} 88 | End. 89 | expected: | 90 | Begin. 91 | End. 92 | 93 | - name: Indented Inline 94 | desc: Inline comments should not strip whitespace 95 | data: { } 96 | template: " 12 {{! 34 }}\n" 97 | expected: " 12 \n" 98 | 99 | - name: Surrounding Whitespace 100 | desc: Comment removal should preserve surrounding whitespace. 101 | data: { } 102 | template: '12345 {{! Comment Block! }} 67890' 103 | expected: '12345 67890' 104 | -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-button.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-button.js v2.2.2 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 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* BUTTON PUBLIC CLASS DEFINITION 27 | * ============================== */ 28 | 29 | var Button = function (element, options) { 30 | this.$element = $(element) 31 | this.options = $.extend({}, $.fn.button.defaults, options) 32 | } 33 | 34 | Button.prototype.setState = function (state) { 35 | var d = 'disabled' 36 | , $el = this.$element 37 | , data = $el.data() 38 | , val = $el.is('input') ? 'val' : 'html' 39 | 40 | state = state + 'Text' 41 | data.resetText || $el.data('resetText', $el[val]()) 42 | 43 | $el[val](data[state] || this.options[state]) 44 | 45 | // push to event loop to allow forms to submit 46 | setTimeout(function () { 47 | state == 'loadingText' ? 48 | $el.addClass(d).attr(d, d) : 49 | $el.removeClass(d).removeAttr(d) 50 | }, 0) 51 | } 52 | 53 | Button.prototype.toggle = function () { 54 | var $parent = this.$element.closest('[data-toggle="buttons-radio"]') 55 | 56 | $parent && $parent 57 | .find('.active') 58 | .removeClass('active') 59 | 60 | this.$element.toggleClass('active') 61 | } 62 | 63 | 64 | /* BUTTON PLUGIN DEFINITION 65 | * ======================== */ 66 | 67 | $.fn.button = function (option) { 68 | return this.each(function () { 69 | var $this = $(this) 70 | , data = $this.data('button') 71 | , options = typeof option == 'object' && option 72 | if (!data) $this.data('button', (data = new Button(this, options))) 73 | if (option == 'toggle') data.toggle() 74 | else if (option) data.setState(option) 75 | }) 76 | } 77 | 78 | $.fn.button.defaults = { 79 | loadingText: 'loading...' 80 | } 81 | 82 | $.fn.button.Constructor = Button 83 | 84 | 85 | /* BUTTON DATA-API 86 | * =============== */ 87 | 88 | $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { 89 | var $btn = $(e.target) 90 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 91 | $btn.button('toggle') 92 | }) 93 | 94 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/tools/release.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | var fs = require('fs'); 17 | var path = require('path'); 18 | var Hogan = require(__dirname + '/../lib/hogan'); 19 | var minlicense = '/**\n* @preserve Copyright 2012 Twitter, Inc.\n* @license http://www.apache.org/licenses/LICENSE-2.0.txt\n*/\n'; 20 | 21 | function read(path) { 22 | return fs.readFileSync(path).toString() 23 | } 24 | 25 | // Good enough for little js files 26 | function copy(src, dst) { 27 | return fs.writeFileSync(dst, read(src)); 28 | } 29 | 30 | function uglify(src, dst) { 31 | var jsp = require("uglify-js").parser; 32 | var pro = require("uglify-js").uglify; 33 | var orig_code = read(src); 34 | var ast = jsp.parse(orig_code); // parse code and get the initial AST 35 | ast = pro.ast_mangle(ast); // get a new AST with mangled names 36 | ast = pro.ast_squeeze(ast); // get an AST with compression optimizations 37 | fs.writeFileSync(dst, minlicense + pro.gen_code(ast)); 38 | } 39 | 40 | var packageJSON = JSON.parse(read('package.json')); 41 | var version = packageJSON.version.substring(0, packageJSON.version.indexOf('-')); 42 | 43 | function removeFirstComment(text) { 44 | return text.substring(text.indexOf('*/') + 2); 45 | } 46 | 47 | var context = { 48 | template: removeFirstComment(read(__dirname + '/../lib/template.js')), 49 | compiler: removeFirstComment(read(__dirname + '/../lib/compiler.js')) 50 | }; 51 | 52 | var wrapperPath = '/../wrappers/'; 53 | var wrappers = fs.readdirSync(__dirname + wrapperPath).map(function(f) { 54 | return __dirname + wrapperPath + f; 55 | }); 56 | 57 | var distPath = __dirname + '/../dist/'; 58 | wrappers.forEach(function(wrapper) { 59 | var tail = path.basename(wrapper, '.mustache'); 60 | var target = distPath + 'hogan-' + version + '.' + tail; 61 | var uglified = distPath + 'hogan-' + version + '.min.' + tail; 62 | fs.writeFileSync(target, Hogan.compile(read(wrapper)).render(context)); 63 | uglify(target, uglified); 64 | }); 65 | 66 | // Also release Hogan.Template on its own. 67 | var templateTarget = distPath + 'template-' + version + '.js'; 68 | fs.writeFileSync(templateTarget, read(__dirname + '/../lib/template.js')); 69 | uglify(templateTarget, distPath + 'template-' + version + '.min.js'); 70 | 71 | // Add packageJSON to node distribution 72 | packageJSON.version = version; 73 | fs.writeFileSync(__dirname + '/../dist/nodejs/package.json', 74 | JSON.stringify(packageJSON, null, " ")); 75 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/mustache.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Twitter, Inc. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | var doc = this['document']; 17 | var fs = require('fs'); 18 | 19 | var passed = 0; 20 | var failed = 0; 21 | 22 | if (!this['output']) { 23 | var output = function (string) { 24 | return doc ? doc.write(string + '
    ') : console.log(string); 25 | }; 26 | } 27 | 28 | var Hogan = require(__dirname + '/../lib/hogan'); 29 | var template = fs.readFileSync(__dirname + '/../lib/template.js').toString(); 30 | var compiler = fs.readFileSync(__dirname + '/../lib/compiler.js').toString(); 31 | var mustache_wrapper = fs.readFileSync(__dirname + '/../wrappers/mustache.js.mustache').toString(); 32 | 33 | // Create a Mustache.js emulator from the distribution template 34 | var engines = (new Function(Hogan.compile(mustache_wrapper).render({template: template, compiler: compiler}) + 35 | '; return {Hogan: Hogan, Mustache: Mustache};'))(); 36 | 37 | var Mustache = engines.Mustache; 38 | var Hogan2 = engines.Hogan; 39 | 40 | 41 | // sanity check 42 | is(Mustache.hasOwnProperty('to_html'), true, 'Mustache has to_html method.'); 43 | 44 | // Check for Mustache.js partial resolution behavior. 45 | var context = { 46 | foo: 'bar', 47 | mypartial: { 48 | baz: 'qux' 49 | } 50 | } 51 | var text = 'abc {{foo}} def {{>mypartial}} ghi'; 52 | var partialText = '{{baz}}'; 53 | var s = Mustache.to_html(text, context, {'mypartial': partialText}); 54 | is(s, 'abc bar def qux ghi', 'Correct emulation of Mustache.js partial-name-in-context resolution.'); 55 | 56 | // Now check to see that the Hogan resolution is unaffected. 57 | var t = Hogan2.compile(text); 58 | s = t.render(context, {'mypartial': partialText}); 59 | is(s, 'abc bar def ghi', 'Hogan behavior not changed by Mustache.js emulation.'); 60 | 61 | // Check for sendFun behavior 62 | var buf = ""; 63 | function send(s) { 64 | buf += "-FOO " + s + " FOO-"; 65 | } 66 | var s = Mustache.to_html(text, context, {'mypartial': partialText}, send); 67 | is(buf, '-FOO abc bar def qux ghi FOO-', 'Correct emulation of Mustache.js sendFun.'); 68 | 69 | 70 | function is(got, expected, msg) { 71 | if (got === expected) { 72 | output("OK: " + msg); 73 | ++passed; 74 | } else { 75 | output("FAIL: " + msg); 76 | output("Expected |" + expected + "|"); 77 | output(" Got |" + got + "|"); 78 | ++failed; 79 | } 80 | } 81 | 82 | function complete() { 83 | output("\nTests Complete"); 84 | output("--------------"); 85 | output("Passed: " + passed); 86 | output("Failed: " + failed); 87 | output("\n"); 88 | } 89 | 90 | complete(); -------------------------------------------------------------------------------- /less/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | 5 | // Space out pagination from surrounding content 6 | .pagination { 7 | margin: @baseLineHeight 0; 8 | } 9 | 10 | .pagination ul { 11 | // Allow for text-based alignment 12 | display: inline-block; 13 | .ie7-inline-block(); 14 | // Reset default ul styles 15 | margin-left: 0; 16 | margin-bottom: 0; 17 | // Visuals 18 | .border-radius(@baseBorderRadius); 19 | .box-shadow(0 1px 2px rgba(0,0,0,.05)); 20 | } 21 | .pagination ul > li { 22 | display: inline; // Remove list-style and block-level defaults 23 | } 24 | .pagination ul > li > a, 25 | .pagination ul > li > span { 26 | float: left; // Collapse white-space 27 | padding: 4px 12px; 28 | line-height: @baseLineHeight; 29 | text-decoration: none; 30 | background-color: @paginationBackground; 31 | border: 1px solid @paginationBorder; 32 | border-left-width: 0; 33 | } 34 | .pagination ul > li > a:hover, 35 | .pagination ul > .active > a, 36 | .pagination ul > .active > span { 37 | background-color: @paginationActiveBackground; 38 | } 39 | .pagination ul > .active > a, 40 | .pagination ul > .active > span { 41 | color: @grayLight; 42 | cursor: default; 43 | } 44 | .pagination ul > .disabled > span, 45 | .pagination ul > .disabled > a, 46 | .pagination ul > .disabled > a:hover { 47 | color: @grayLight; 48 | background-color: transparent; 49 | cursor: default; 50 | } 51 | .pagination ul > li:first-child > a, 52 | .pagination ul > li:first-child > span { 53 | border-left-width: 1px; 54 | .border-left-radius(@baseBorderRadius); 55 | } 56 | .pagination ul > li:last-child > a, 57 | .pagination ul > li:last-child > span { 58 | .border-right-radius(@baseBorderRadius); 59 | } 60 | 61 | 62 | // Alignment 63 | // -------------------------------------------------- 64 | 65 | .pagination-centered { 66 | text-align: center; 67 | } 68 | .pagination-right { 69 | text-align: right; 70 | } 71 | 72 | 73 | // Sizing 74 | // -------------------------------------------------- 75 | 76 | // Large 77 | .pagination-large { 78 | ul > li > a, 79 | ul > li > span { 80 | padding: @paddingLarge; 81 | font-size: @fontSizeLarge; 82 | } 83 | ul > li:first-child > a, 84 | ul > li:first-child > span { 85 | .border-left-radius(@borderRadiusLarge); 86 | } 87 | ul > li:last-child > a, 88 | ul > li:last-child > span { 89 | .border-right-radius(@borderRadiusLarge); 90 | } 91 | } 92 | 93 | // Small and mini 94 | .pagination-mini, 95 | .pagination-small { 96 | ul > li:first-child > a, 97 | ul > li:first-child > span { 98 | .border-left-radius(@borderRadiusSmall); 99 | } 100 | ul > li:last-child > a, 101 | ul > li:last-child > span { 102 | .border-right-radius(@borderRadiusSmall); 103 | } 104 | } 105 | 106 | // Small 107 | .pagination-small { 108 | ul > li > a, 109 | ul > li > span { 110 | padding: @paddingSmall; 111 | font-size: @fontSizeSmall; 112 | } 113 | } 114 | // Mini 115 | .pagination-mini { 116 | ul > li > a, 117 | ul > li > span { 118 | padding: @paddingMini; 119 | font-size: @fontSizeMini; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/README.md: -------------------------------------------------------------------------------- 1 | The repository at https://github.com/mustache/spec is the formal standard for 2 | Mustache. It defines both normal usage and edge-case behavior for libraries 3 | parsing the Mustache templating language (or a superset thereof). 4 | 5 | The specification is developed as a series of YAML files, under the `specs` 6 | directory. 7 | 8 | Versioning 9 | ---------- 10 | This specification is being [semantically versioned](http://semver.org). 11 | Roughly described, major version changes will always represent backwards 12 | incompatible changes, minor version changes will always represent new language 13 | features and will be backwards compatible, and patch ('tiny') version changes 14 | will always be bug fixes. For the purposes of semantic versioning, the public 15 | API is the contents of the `specs` directory and the algorithm for testing 16 | against it. 17 | 18 | Mustache implementations SHOULD report the most recent version of the spec 19 | (major and minor version numbers). If an implementation has support for any 20 | optional modules, they SHOULD indicate so with a remark attached to the 21 | version number (e.g. "vX.Y, including lambdas" or "v.X.Y+λ"). It is 22 | RECOMMENDED that implementations not supporting at least v1.0.0 of this spec 23 | refer to themselves as "Mustache-like", or "Mustache-inspired". 24 | 25 | Alternate Formats 26 | ----------------- 27 | 28 | Since YAML is a reasonably complex format that not every language has good 29 | tools for working with, we also provide JSON versions of the specs on a 30 | best-effort basis. 31 | 32 | These should be identical to the YAML specifications, but if you find the need 33 | to regenerate them, they can be trivially rebuilt by invoking `rake build`. 34 | 35 | It is also worth noting that some specifications (notably, the lambda module) 36 | rely on YAML "tags" to denote special types of data (e.g. source code). Since 37 | JSON offers no way to denote this, a special key ("`__tag__`") is injected 38 | with the name of the tag as its value. See `TESTING.md` for more information 39 | about handling tagged data. 40 | 41 | Optional Modules 42 | ---------------- 43 | 44 | Specification files beginning with a tilde (`~`) describe optional modules. 45 | At present, the only module being described as optional is regarding support 46 | for lambdas. As a guideline, a module may be a candidate for optionality 47 | when: 48 | 49 | * It does not affect the core syntax of the language. 50 | * It does not significantly affect the output of rendered templates. 51 | * It concerns implementation language features or data types that are not 52 | common to or core in every targeted language. 53 | * The lack of support by an implementation does not diminish the usage of 54 | Mustache in the target language. 55 | 56 | As an example, the lambda module is primarily concerned with the handling of a 57 | particular data type (code). This is a type of data that may be difficult to 58 | support in some languages, and users of those languages will not see the lack 59 | as an 'inconsistency' between implementations. 60 | 61 | Support for specific pragmas or syntax extensions, however, are best managed 62 | outside this core specification, as adjunct specifications. 63 | 64 | Implementors are strongly encouraged to support any and all modules they are 65 | reasonably capable of supporting. 66 | -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json: -------------------------------------------------------------------------------- 1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Set Delimiter tags are used to change the tag delimiters for all content\nfollowing the tag in the current compilation unit.\n\nThe tag's content MUST be any two non-whitespace sequences (separated by\nwhitespace) EXCEPT an equals sign ('=') followed by the current closing\ndelimiter.\n\nSet Delimiter tags SHOULD be treated as standalone when appropriate.\n","tests":[{"name":"Pair Behavior","data":{"text":"Hey!"},"expected":"(Hey!)","template":"{{=<% %>=}}(<%text%>)","desc":"The equals sign (used on both sides) should permit delimiter changes."},{"name":"Special Characters","data":{"text":"It worked!"},"expected":"(It worked!)","template":"({{=[ ]=}}[text])","desc":"Characters with special meaning regexen should be valid delimiters."},{"name":"Sections","data":{"section":true,"data":"I got interpolated."},"expected":"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n","template":"[\n{{#section}}\n {{data}}\n |data|\n{{/section}}\n\n{{= | | =}}\n|#section|\n {{data}}\n |data|\n|/section|\n]\n","desc":"Delimiters set outside sections should persist."},{"name":"Inverted Sections","data":{"section":false,"data":"I got interpolated."},"expected":"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n","template":"[\n{{^section}}\n {{data}}\n |data|\n{{/section}}\n\n{{= | | =}}\n|^section|\n {{data}}\n |data|\n|/section|\n]\n","desc":"Delimiters set outside inverted sections should persist."},{"name":"Partial Inheritence","data":{"value":"yes"},"expected":"[ .yes. ]\n[ .yes. ]\n","template":"[ {{>include}} ]\n{{= | | =}}\n[ |>include| ]\n","desc":"Delimiters set in a parent template should not affect a partial.","partials":{"include":".{{value}}."}},{"name":"Post-Partial Behavior","data":{"value":"yes"},"expected":"[ .yes. .yes. ]\n[ .yes. .|value|. ]\n","template":"[ {{>include}} ]\n[ .{{value}}. .|value|. ]\n","desc":"Delimiters set in a partial should not affect the parent template.","partials":{"include":".{{value}}. {{= | | =}} .|value|."}},{"name":"Surrounding Whitespace","data":{},"expected":"| |","template":"| {{=@ @=}} |","desc":"Surrounding whitespace should be left untouched."},{"name":"Outlying Whitespace (Inline)","data":{},"expected":" | \n","template":" | {{=@ @=}}\n","desc":"Whitespace should be left untouched."},{"name":"Standalone Tag","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{=@ @=}}\nEnd.\n","desc":"Standalone lines should be removed from the template."},{"name":"Indented Standalone Tag","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{=@ @=}}\nEnd.\n","desc":"Indented standalone lines should be removed from the template."},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n|","template":"|\r\n{{= @ @ =}}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags."},{"name":"Standalone Without Previous Line","data":{},"expected":"=","template":" {{=@ @=}}\n=","desc":"Standalone tags should not require a newline to precede them."},{"name":"Standalone Without Newline","data":{},"expected":"=\n","template":"=\n {{=@ @=}}","desc":"Standalone tags should not require a newline to follow them."},{"name":"Pair with Padding","data":{},"expected":"||","template":"|{{= @ @ =}}|","desc":"Superfluous in-tag whitespace should be ignored."}]} -------------------------------------------------------------------------------- /docs/build/translation.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var hogan = require('hogan.js') 3 | var fs = require('fs') 4 | var cjson = require('cjson') , prod = process.argv[2] == 'production', title = 'Globo.com Bootstrap' 5 | var langchoose = process.argv[3] || "pt-br" 6 | var count = 0 7 | 8 | red = '\033[31m'; 9 | blue = '\033[34m'; 10 | reset = '\033[0m'; 11 | 12 | var language = cjson.load(__dirname + '/languages/'+langchoose+'.json') 13 | var pages = fs.readdirSync(__dirname + '/../templates/pages') 14 | var template = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8'), 15 | strings = [], 16 | words = [], 17 | unused = [] 18 | 19 | context = { 20 | name: "Layout", 21 | title: title, 22 | _i: function (k) { 23 | if (language[context.name][k]) { 24 | return language[context.name][k] 25 | } else { 26 | if(strings.indexOf(k) == -1) { 27 | console.log(blue + 'Missing translation in Layout for: ' + red + k + reset) 28 | count++ 29 | } 30 | strings.push(k) 31 | return k 32 | } 33 | } 34 | } 35 | template = hogan.compile(template,{sectionTags: [{o: '_i', c: 'i'}]}) 36 | var translated_keys = {} 37 | var keys = {} 38 | 39 | pages.forEach(function(name){ 40 | 41 | var nicename = name 42 | .replace(/\.mustache/, '') 43 | .replace(/\-.*/, '') 44 | .replace(/(.)/, function ($1) { return $1.toUpperCase() }) 45 | var page = fs.readFileSync(__dirname + '/../templates/pages/' + name, 'utf-8') 46 | , page_context = {} 47 | page_context[name.replace(/\.mustache$/, '')] = 'active' 48 | page_context.production = prod 49 | page_context.title = nicename, 50 | page_context.name = nicename, 51 | page_context._i = function (k) { 52 | words.push(k) 53 | if(language['Pages']) { 54 | if (language['Pages'][k]) { 55 | return language['Pages'][k] 56 | } else { 57 | if(strings.indexOf(k) == -1) { 58 | console.log(blue + 'Missing translation in page '+ nicename +' for: ' + red + k + reset) 59 | count++ 60 | translated_keys['Pages'] = {} 61 | keys[k] = "" 62 | translated_keys['Pages'] = keys 63 | } 64 | strings.push(k) 65 | return k 66 | } 67 | } else { 68 | console.log(red + "missing key for "+ name +": " + k + reset); 69 | } 70 | } 71 | if (page_context.title == 'Index') { 72 | page_context.title = title 73 | } else { 74 | page_context.title += ' · ' + title 75 | } 76 | page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] }) 77 | page = page.render(page_context) 78 | full_page = template.render(context, { 79 | body: page, 80 | }) 81 | fs.writeFileSync(__dirname + '/../' + name.replace(/mustache$/, 'html'), full_page, 'utf-8') 82 | }) 83 | fs.writeFileSync(__dirname + '/languages/template.json', JSON.stringify(translated_keys), 'utf-8') 84 | console.log(blue + "The json from missing translation files(insert the keys at language file located at docs/build/languages): \n" + reset + JSON.stringify(translated_keys)) 85 | console.log(red + "There's "+ count +" words for translate") 86 | /*for(pages in language['Pages']) { 87 | if(words.indexOf(pages)==-1) { 88 | unused.push(pages) 89 | } 90 | } 91 | console.log(red + 'unused keys: \n' + reset + unused.join(red + '\n ') + reset)*/ 92 | -------------------------------------------------------------------------------- /js/bootstrap-balloon.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-balloon.js v2.1.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"; // jshint ;_; 24 | 25 | 26 | /* BALLOON PUBLIC CLASS DEFINITION 27 | * =============================== */ 28 | 29 | var Balloon = function (element, options) { 30 | this.init('balloon', element, options) 31 | } 32 | 33 | 34 | /* NOTE: BALLOON EXTENDS BOOTSTRAP-TOOLTIP.js 35 | ========================================== */ 36 | 37 | Balloon.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 38 | 39 | constructor: Balloon 40 | 41 | , setContent: function () { 42 | var $tip = this.tip() 43 | , title = this.getTitle() 44 | , content = this.getContent() 45 | 46 | $tip.find('.balloon-content > *')[this.options.html ? 'html' : 'text'](content) 47 | 48 | $tip.removeClass('fade top bottom left right in') 49 | } 50 | 51 | , hasContent: function () { 52 | return this.getTitle() || this.getContent() 53 | } 54 | 55 | , getContent: function () { 56 | var content 57 | , $e = this.$element 58 | , o = this.options 59 | 60 | content = $e.attr('data-content') 61 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 62 | 63 | return content 64 | } 65 | 66 | , tip: function () { 67 | if (!this.$tip) { 68 | this.$tip = $(this.options.template) 69 | } 70 | return this.$tip 71 | } 72 | 73 | , destroy: function () { 74 | this.hide().$element.off('.' + this.type).removeData(this.type) 75 | } 76 | 77 | }) 78 | 79 | 80 | /* Balloon PLUGIN DEFINITION 81 | * ======================= */ 82 | 83 | $.fn.balloon = function (option) { 84 | return this.each(function () { 85 | var $this = $(this) 86 | , data = $this.data('balloon') 87 | , options = typeof option == 'object' && option 88 | if (!data) $this.data('balloon', (data = new Balloon(this, options))) 89 | if (typeof option == 'string') data[option]() 90 | }) 91 | } 92 | 93 | $.fn.balloon.Constructor = Balloon 94 | 95 | $.fn.balloon.defaults = $.extend({} , $.fn.tooltip.defaults, { 96 | placement: 'bottom' 97 | , trigger: 'click' 98 | , content: '' 99 | , template: '
    ' 100 | }) 101 | 102 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-balloon.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-balloon.js v2.1.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"; // jshint ;_; 24 | 25 | 26 | /* BALLOON PUBLIC CLASS DEFINITION 27 | * =============================== */ 28 | 29 | var Balloon = function (element, options) { 30 | this.init('balloon', element, options) 31 | } 32 | 33 | 34 | /* NOTE: BALLOON EXTENDS BOOTSTRAP-TOOLTIP.js 35 | ========================================== */ 36 | 37 | Balloon.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 38 | 39 | constructor: Balloon 40 | 41 | , setContent: function () { 42 | var $tip = this.tip() 43 | , title = this.getTitle() 44 | , content = this.getContent() 45 | 46 | $tip.find('.balloon-content > *')[this.options.html ? 'html' : 'text'](content) 47 | 48 | $tip.removeClass('fade top bottom left right in') 49 | } 50 | 51 | , hasContent: function () { 52 | return this.getTitle() || this.getContent() 53 | } 54 | 55 | , getContent: function () { 56 | var content 57 | , $e = this.$element 58 | , o = this.options 59 | 60 | content = $e.attr('data-content') 61 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 62 | 63 | return content 64 | } 65 | 66 | , tip: function () { 67 | if (!this.$tip) { 68 | this.$tip = $(this.options.template) 69 | } 70 | return this.$tip 71 | } 72 | 73 | , destroy: function () { 74 | this.hide().$element.off('.' + this.type).removeData(this.type) 75 | } 76 | 77 | }) 78 | 79 | 80 | /* Balloon PLUGIN DEFINITION 81 | * ======================= */ 82 | 83 | $.fn.balloon = function (option) { 84 | return this.each(function () { 85 | var $this = $(this) 86 | , data = $this.data('balloon') 87 | , options = typeof option == 'object' && option 88 | if (!data) $this.data('balloon', (data = new Balloon(this, options))) 89 | if (typeof option == 'string') data[option]() 90 | }) 91 | } 92 | 93 | $.fn.balloon.Constructor = Balloon 94 | 95 | $.fn.balloon.defaults = $.extend({} , $.fn.tooltip.defaults, { 96 | placement: 'bottom' 97 | , trigger: 'click' 98 | , content: '' 99 | , template: '
    ' 100 | }) 101 | 102 | }(window.jQuery); -------------------------------------------------------------------------------- /less/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // ANIMATIONS 7 | // ---------- 8 | 9 | // Webkit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Firefox 16 | @-moz-keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | // IE9 22 | @-ms-keyframes progress-bar-stripes { 23 | from { background-position: 40px 0; } 24 | to { background-position: 0 0; } 25 | } 26 | 27 | // Opera 28 | @-o-keyframes progress-bar-stripes { 29 | from { background-position: 0 0; } 30 | to { background-position: 40px 0; } 31 | } 32 | 33 | // Spec 34 | @keyframes progress-bar-stripes { 35 | from { background-position: 40px 0; } 36 | to { background-position: 0 0; } 37 | } 38 | 39 | 40 | 41 | // THE BARS 42 | // -------- 43 | 44 | // Outer container 45 | .progress { 46 | overflow: hidden; 47 | height: @baseLineHeight; 48 | margin-bottom: @baseLineHeight; 49 | #gradient > .vertical(#f5f5f5, #f9f9f9); 50 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 51 | .border-radius(@baseBorderRadius); 52 | } 53 | 54 | // Bar of progress 55 | .progress .bar { 56 | width: 0%; 57 | height: 100%; 58 | color: @white; 59 | float: left; 60 | font-size: 12px; 61 | text-align: center; 62 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 63 | #gradient > .vertical(#149bdf, #0480be); 64 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 65 | .box-sizing(border-box); 66 | .transition(width .6s ease); 67 | } 68 | .progress .bar + .bar { 69 | .box-shadow(~"inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15)"); 70 | } 71 | 72 | // Striped bars 73 | .progress-striped .bar { 74 | #gradient > .striped(#149bdf); 75 | .background-size(40px 40px); 76 | } 77 | 78 | // Call animation for the active one 79 | .progress.active .bar { 80 | -webkit-animation: progress-bar-stripes 2s linear infinite; 81 | -moz-animation: progress-bar-stripes 2s linear infinite; 82 | -ms-animation: progress-bar-stripes 2s linear infinite; 83 | -o-animation: progress-bar-stripes 2s linear infinite; 84 | animation: progress-bar-stripes 2s linear infinite; 85 | } 86 | 87 | 88 | 89 | // COLORS 90 | // ------ 91 | 92 | // Danger (red) 93 | .progress-danger .bar, .progress .bar-danger { 94 | #gradient > .vertical(#ee5f5b, #c43c35); 95 | } 96 | .progress-danger.progress-striped .bar, .progress-striped .bar-danger { 97 | #gradient > .striped(#ee5f5b); 98 | } 99 | 100 | // Success (green) 101 | .progress-success .bar, .progress .bar-success { 102 | #gradient > .vertical(#62c462, #57a957); 103 | } 104 | .progress-success.progress-striped .bar, .progress-striped .bar-success { 105 | #gradient > .striped(#62c462); 106 | } 107 | 108 | // Info (teal) 109 | .progress-info .bar, .progress .bar-info { 110 | #gradient > .vertical(#5bc0de, #339bb9); 111 | } 112 | .progress-info.progress-striped .bar, .progress-striped .bar-info { 113 | #gradient > .striped(#5bc0de); 114 | } 115 | 116 | // Warning (orange) 117 | .progress-warning .bar, .progress .bar-warning { 118 | #gradient > .vertical(lighten(@orange, 15%), @orange); 119 | } 120 | .progress-warning.progress-striped .bar, .progress-striped .bar-warning { 121 | #gradient > .striped(lighten(@orange, 15%)); 122 | } 123 | -------------------------------------------------------------------------------- /js/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* POPOVER PUBLIC CLASS DEFINITION 27 | * =============================== */ 28 | 29 | var Popover = function (element, options) { 30 | this.init('popover', element, options) 31 | } 32 | 33 | 34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js 35 | ========================================== */ 36 | 37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 38 | 39 | constructor: Popover 40 | 41 | , setContent: function () { 42 | var $tip = this.tip() 43 | , title = this.getTitle() 44 | , content = this.getContent() 45 | 46 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 47 | $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content) 48 | 49 | $tip.removeClass('fade top bottom left right in') 50 | } 51 | 52 | , hasContent: function () { 53 | return this.getTitle() || this.getContent() 54 | } 55 | 56 | , getContent: function () { 57 | var content 58 | , $e = this.$element 59 | , o = this.options 60 | 61 | content = $e.attr('data-content') 62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 63 | 64 | return content 65 | } 66 | 67 | , tip: function () { 68 | if (!this.$tip) { 69 | this.$tip = $(this.options.template) 70 | } 71 | return this.$tip 72 | } 73 | 74 | , destroy: function () { 75 | this.hide().$element.off('.' + this.type).removeData(this.type) 76 | } 77 | 78 | }) 79 | 80 | 81 | /* POPOVER PLUGIN DEFINITION 82 | * ======================= */ 83 | 84 | $.fn.popover = function (option) { 85 | return this.each(function () { 86 | var $this = $(this) 87 | , data = $this.data('popover') 88 | , options = typeof option == 'object' && option 89 | if (!data) $this.data('popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | $.fn.popover.Constructor = Popover 95 | 96 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { 97 | placement: 'right' 98 | , trigger: 'click' 99 | , content: '' 100 | , template: '

    ' 101 | }) 102 | 103 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* POPOVER PUBLIC CLASS DEFINITION 27 | * =============================== */ 28 | 29 | var Popover = function (element, options) { 30 | this.init('popover', element, options) 31 | } 32 | 33 | 34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js 35 | ========================================== */ 36 | 37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 38 | 39 | constructor: Popover 40 | 41 | , setContent: function () { 42 | var $tip = this.tip() 43 | , title = this.getTitle() 44 | , content = this.getContent() 45 | 46 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 47 | $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content) 48 | 49 | $tip.removeClass('fade top bottom left right in') 50 | } 51 | 52 | , hasContent: function () { 53 | return this.getTitle() || this.getContent() 54 | } 55 | 56 | , getContent: function () { 57 | var content 58 | , $e = this.$element 59 | , o = this.options 60 | 61 | content = $e.attr('data-content') 62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 63 | 64 | return content 65 | } 66 | 67 | , tip: function () { 68 | if (!this.$tip) { 69 | this.$tip = $(this.options.template) 70 | } 71 | return this.$tip 72 | } 73 | 74 | , destroy: function () { 75 | this.hide().$element.off('.' + this.type).removeData(this.type) 76 | } 77 | 78 | }) 79 | 80 | 81 | /* POPOVER PLUGIN DEFINITION 82 | * ======================= */ 83 | 84 | $.fn.popover = function (option) { 85 | return this.each(function () { 86 | var $this = $(this) 87 | , data = $this.data('popover') 88 | , options = typeof option == 'object' && option 89 | if (!data) $this.data('popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | $.fn.popover.Constructor = Popover 95 | 96 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { 97 | placement: 'right' 98 | , trigger: 'click' 99 | , content: '' 100 | , template: '

    ' 101 | }) 102 | 103 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/examples/starter-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap, from Twitter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 53 | 54 |
    55 | 56 |

    Bootstrap starter template

    57 |

    Use this document as a way to quick start any new project.
    All you get is this message and a barebones HTML document.

    58 | 59 |
    60 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /less/balloon.less: -------------------------------------------------------------------------------- 1 | // 2 | // Balloon 3 | // -------------------------------------------------- 4 | 5 | .balloon { 6 | position: absolute; 7 | top: 0; 8 | left: 0; 9 | z-index: 1010; 10 | display: none; 11 | width: 251px; 12 | padding: 1px; 13 | background-color: #ffffff; 14 | -webkit-background-clip: padding-box; 15 | -moz-background-clip: padding; 16 | background-clip: padding-box; 17 | border: 1px solid #bbbbbb; 18 | -webkit-border-radius: 3px; 19 | -moz-border-radius: 3px; 20 | border-radius: 3px; 21 | -webkit-box-shadow: 0 0 0 4px rgba(187,187,187,0.4); 22 | -moz-box-shadow: 0 0 0 4px rgba(187,187,187,0.4); 23 | box-shadow: 0 0 0 4px rgba(187,187,187,0.4); 24 | } 25 | .balloon.top { 26 | margin-top: -15px; 27 | } 28 | .balloon.right { 29 | margin-left: 15px; 30 | } 31 | .balloon.bottom { 32 | margin-top: 15px; 33 | } 34 | .balloon.left { 35 | margin-left: -15px; 36 | } 37 | 38 | .balloon .arrow { 39 | position: absolute; 40 | content: ''; 41 | height:12px; 42 | width:12px; 43 | background: white; 44 | z-index:1; 45 | border-right: 1px solid #bbbbbb; 46 | border-top: 1px solid #bbbbbb; 47 | .rotate(-45); 48 | /*filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', 49 | M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476); 50 | zoom: 1;*/ 51 | } 52 | 53 | /* top position */ 54 | .balloon.top .arrow { 55 | position: absolute; 56 | bottom:-7px; 57 | left:46%; 58 | .rotate(135deg); 59 | } 60 | 61 | .balloon.top .arrow-border { 62 | position: absolute; 63 | width: 12px; 64 | height: 12px; 65 | bottom:-11px; 66 | left: 46.3%; 67 | overflow: hidden; 68 | .rotate(225deg); 69 | } 70 | 71 | .balloon.top .arrow-border-inner { 72 | padding: 10px; 73 | background: rgba(187,187,187,0.4); 74 | border-radius: 3px; 75 | z-index: 0; 76 | } 77 | 78 | /* right position */ 79 | .balloon.right .arrow { 80 | top: 40%; 81 | left:-7px; 82 | .rotate(-135deg); 83 | } 84 | 85 | .balloon.right .arrow-border { 86 | position: absolute; 87 | width: 12px; 88 | height: 12px; 89 | top:40%; 90 | left: -11px; 91 | overflow: hidden; 92 | .rotate(-45deg); 93 | } 94 | 95 | .balloon.right .arrow-border-inner { 96 | padding: 10px; 97 | background: rgba(187,187,187,0.4); 98 | border-radius: 3px; 99 | } 100 | 101 | 102 | /* bottom */ 103 | .balloon.bottom .arrow { 104 | position: absolute; 105 | top:-7px; 106 | left:120px; 107 | .rotate(-45deg); 108 | 109 | } 110 | 111 | .balloon.bottom .arrow-border { 112 | position: absolute; 113 | width: 82px; 114 | height: 10px; 115 | top: -15px; 116 | left:84px; 117 | overflow: hidden; 118 | } 119 | 120 | .balloon.bottom .arrow-border-inner { 121 | padding: 14px; 122 | position:absolute; 123 | bottom:-23px; 124 | left: 35%; 125 | background: rgba(187,187,187,0.4); 126 | border-radius: 3px; 127 | z-index: 0; 128 | border-radius: 3px; 129 | .rotate(-45deg); 130 | } 131 | 132 | /* left position */ 133 | .balloon.left .arrow { 134 | top: 40%; 135 | right:-7px; 136 | .rotate(45deg); 137 | } 138 | 139 | .balloon.left .arrow-border { 140 | position: absolute; 141 | width: 12px; 142 | height: 12px; 143 | top:40%; 144 | right: -10px; 145 | overflow: hidden; 146 | .rotate(45deg); 147 | } 148 | 149 | .balloon.left .arrow-border-inner { 150 | padding: 10px; 151 | background: rgba(187,187,187,0.4); 152 | border-radius: 3px; 153 | } 154 | -------------------------------------------------------------------------------- /less/popovers.less: -------------------------------------------------------------------------------- 1 | // 2 | // Popovers 3 | // -------------------------------------------------- 4 | 5 | 6 | .popover { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | z-index: @zindexPopover; 11 | display: none; 12 | width: 236px; 13 | padding: 1px; 14 | background-color: @popoverBackground; 15 | -webkit-background-clip: padding-box; 16 | -moz-background-clip: padding; 17 | background-clip: padding-box; 18 | border: 1px solid #ccc; 19 | border: 1px solid rgba(0,0,0,.2); 20 | .border-radius(6px); 21 | .box-shadow(0 5px 10px rgba(0,0,0,.2)); 22 | 23 | // Overrides for proper insertion 24 | white-space: normal; 25 | 26 | // Offset the popover to account for the popover arrow 27 | &.top { margin-top: -10px; } 28 | &.right { margin-left: 10px; } 29 | &.bottom { margin-top: 10px; } 30 | &.left { margin-left: -10px; } 31 | } 32 | 33 | .popover-title { 34 | margin: 0; // reset heading margin 35 | padding: 8px 14px; 36 | font-size: 14px; 37 | font-weight: normal; 38 | line-height: 18px; 39 | background-color: @popoverTitleBackground; 40 | border-bottom: 1px solid darken(@popoverTitleBackground, 5%); 41 | .border-radius(5px 5px 0 0); 42 | } 43 | 44 | .popover-content { 45 | padding: 9px 14px; 46 | p, ul, ol { 47 | margin-bottom: 0; 48 | } 49 | } 50 | 51 | // Arrows 52 | .popover .arrow, 53 | .popover .arrow:after { 54 | position: absolute; 55 | display: inline-block; 56 | width: 0; 57 | height: 0; 58 | border-color: transparent; 59 | border-style: solid; 60 | } 61 | .popover .arrow:after { 62 | content: ""; 63 | z-index: -1; 64 | } 65 | 66 | .popover { 67 | &.top .arrow { 68 | bottom: -@popoverArrowWidth; 69 | left: 50%; 70 | margin-left: -@popoverArrowWidth; 71 | border-width: @popoverArrowWidth @popoverArrowWidth 0; 72 | border-top-color: @popoverArrowColor; 73 | &:after { 74 | border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth 0; 75 | border-top-color: @popoverArrowOuterColor; 76 | bottom: -1px; 77 | left: -@popoverArrowOuterWidth; 78 | } 79 | } 80 | &.right .arrow { 81 | top: 50%; 82 | left: -@popoverArrowWidth; 83 | margin-top: -@popoverArrowWidth; 84 | border-width: @popoverArrowWidth @popoverArrowWidth @popoverArrowWidth 0; 85 | border-right-color: @popoverArrowColor; 86 | &:after { 87 | border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth @popoverArrowOuterWidth 0; 88 | border-right-color: @popoverArrowOuterColor; 89 | bottom: -@popoverArrowOuterWidth; 90 | left: -1px; 91 | } 92 | } 93 | &.bottom .arrow { 94 | top: -@popoverArrowWidth; 95 | left: 50%; 96 | margin-left: -@popoverArrowWidth; 97 | border-width: 0 @popoverArrowWidth @popoverArrowWidth; 98 | border-bottom-color: @popoverArrowColor; 99 | &:after { 100 | border-width: 0 @popoverArrowOuterWidth @popoverArrowOuterWidth; 101 | border-bottom-color: @popoverArrowOuterColor; 102 | top: -1px; 103 | left: -@popoverArrowOuterWidth; 104 | } 105 | } 106 | &.left .arrow { 107 | top: 50%; 108 | right: -@popoverArrowWidth; 109 | margin-top: -@popoverArrowWidth; 110 | border-width: @popoverArrowWidth 0 @popoverArrowWidth @popoverArrowWidth; 111 | border-left-color: @popoverArrowColor; 112 | &:after { 113 | border-width: @popoverArrowOuterWidth 0 @popoverArrowOuterWidth @popoverArrowOuterWidth; 114 | border-left-color: @popoverArrowOuterColor; 115 | bottom: -@popoverArrowOuterWidth; 116 | right: -1px; 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Bootstrap 2 | 3 | Looking to contribute something to Bootstrap? **Here's how you can help.** 4 | 5 | 6 | 7 | ## Reporting issues 8 | 9 | We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Bootstrap core. Please read the following guidelines before opening any issue. 10 | 11 | 1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available. 12 | 2. **Create an isolated and reproducible test case.** Be sure the problem exists in Bootstrap's code with a [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report. 13 | 3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases. 14 | 4. **Share as much information as possible.** Include operating system and version, browser and version, version of Bootstrap, customized or vanilla build, etc. where appropriate. Also include steps to reproduce the bug. 15 | 16 | 17 | 18 | ## Key branches 19 | 20 | - `master` is the latest, deployed version. 21 | - `gh-pages` is the hosted docs (not to be used for pull requests). 22 | - `*-wip` is the official work in progress branch for the next release. 23 | 24 | 25 | 26 | ## Notes on the repo 27 | 28 | As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and built via `make` before each commit and release. This was done to enable internationalization (translation) in a future release by uploading our strings to the [Twitter Translation Center](http://translate.twttr.com/). Any edits to the docs should be first done in the Mustache files and then recompiled into the HTML. 29 | 30 | 31 | 32 | ## Pull requests 33 | 34 | - Try to submit pull requests against the latest `*-wip` branch for easier merging 35 | - Any changes to the docs must be made to the Mustache templates, not just the compiled HTML pages 36 | - CSS changes must be done in .less files first, never just the compiled files 37 | - If modifying the .less files, always recompile and commit the compiled files bootstrap.css and bootstrap.min.css 38 | - Try not to pollute your pull request with unintended changes--keep them simple and small 39 | - Try to share which browsers your code has been tested in before submitting a pull request 40 | 41 | 42 | 43 | ## Coding standards: HTML 44 | 45 | - Two spaces for indentation, never tabs 46 | - Double quotes only, never single quotes 47 | - Always use proper indentation 48 | - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags) 49 | 50 | 51 | 52 | ## Coding standards: CSS 53 | 54 | - Adhere to the [Recess CSS property order](http://markdotto.com/2011/11/29/css-property-order/) 55 | - Multiple-line approach (one property and value per line) 56 | - Always a space after a property's colon (.e.g, `display: block;` and not `display:block;`) 57 | - End all lines with a semi-colon 58 | - For multiple, comma-separated selectors, place each selector on it's own line 59 | - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks). 60 | 61 | 62 | 63 | ## Coding standards: JS 64 | 65 | - No semicolons 66 | - Comma first 67 | - 2 spaces (no tabs) 68 | - strict mode 69 | - "Attractive" 70 | 71 | 72 | 73 | ## License 74 | 75 | By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/twitter/bootstrap/blob/master/LICENSE 76 | -------------------------------------------------------------------------------- /docs/assets/js/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 | ### PROGRAMMATIC 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 effect all instance's 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 it's 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/bootstrap-affix.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-affix.js v2.2.2 3 | * http://twitter.github.com/bootstrap/javascript.html#affix 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"; // jshint ;_; 24 | 25 | 26 | /* AFFIX CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var Affix = function (element, options) { 30 | this.options = $.extend({}, $.fn.affix.defaults, options) 31 | this.$window = $(window) 32 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) 33 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) 34 | this.$element = $(element) 35 | this.checkPosition() 36 | } 37 | 38 | Affix.prototype.checkPosition = function () { 39 | if (!this.$element.is(':visible')) return 40 | 41 | var scrollHeight = $(document).height() 42 | , scrollTop = this.$window.scrollTop() 43 | , position = this.$element.offset() 44 | , offset = this.options.offset 45 | , offsetBottom = offset.bottom 46 | , offsetTop = offset.top 47 | , reset = 'affix affix-top affix-bottom' 48 | , affix 49 | 50 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 51 | if (typeof offsetTop == 'function') offsetTop = offset.top() 52 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() 53 | 54 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? 55 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 56 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ? 57 | 'top' : false 58 | 59 | if (this.affixed === affix) return 60 | 61 | this.affixed = affix 62 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null 63 | 64 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) 65 | } 66 | 67 | 68 | /* AFFIX PLUGIN DEFINITION 69 | * ======================= */ 70 | 71 | $.fn.affix = function (option) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('affix') 75 | , options = typeof option == 'object' && option 76 | if (!data) $this.data('affix', (data = new Affix(this, options))) 77 | if (typeof option == 'string') data[option]() 78 | }) 79 | } 80 | 81 | $.fn.affix.Constructor = Affix 82 | 83 | $.fn.affix.defaults = { 84 | offset: 0 85 | } 86 | 87 | 88 | /* AFFIX DATA-API 89 | * ============== */ 90 | 91 | $(window).on('load', function () { 92 | $('[data-spy="affix"]').each(function () { 93 | var $spy = $(this) 94 | , data = $spy.data() 95 | 96 | data.offset = data.offset || {} 97 | 98 | data.offsetBottom && (data.offset.bottom = data.offsetBottom) 99 | data.offsetTop && (data.offset.top = data.offsetTop) 100 | 101 | $spy.affix(data) 102 | }) 103 | }) 104 | 105 | 106 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-affix.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-affix.js v2.2.2 3 | * http://twitter.github.com/bootstrap/javascript.html#affix 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"; // jshint ;_; 24 | 25 | 26 | /* AFFIX CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var Affix = function (element, options) { 30 | this.options = $.extend({}, $.fn.affix.defaults, options) 31 | this.$window = $(window) 32 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) 33 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) 34 | this.$element = $(element) 35 | this.checkPosition() 36 | } 37 | 38 | Affix.prototype.checkPosition = function () { 39 | if (!this.$element.is(':visible')) return 40 | 41 | var scrollHeight = $(document).height() 42 | , scrollTop = this.$window.scrollTop() 43 | , position = this.$element.offset() 44 | , offset = this.options.offset 45 | , offsetBottom = offset.bottom 46 | , offsetTop = offset.top 47 | , reset = 'affix affix-top affix-bottom' 48 | , affix 49 | 50 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 51 | if (typeof offsetTop == 'function') offsetTop = offset.top() 52 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() 53 | 54 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? 55 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 56 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ? 57 | 'top' : false 58 | 59 | if (this.affixed === affix) return 60 | 61 | this.affixed = affix 62 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null 63 | 64 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) 65 | } 66 | 67 | 68 | /* AFFIX PLUGIN DEFINITION 69 | * ======================= */ 70 | 71 | $.fn.affix = function (option) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('affix') 75 | , options = typeof option == 'object' && option 76 | if (!data) $this.data('affix', (data = new Affix(this, options))) 77 | if (typeof option == 'string') data[option]() 78 | }) 79 | } 80 | 81 | $.fn.affix.Constructor = Affix 82 | 83 | $.fn.affix.defaults = { 84 | offset: 0 85 | } 86 | 87 | 88 | /* AFFIX DATA-API 89 | * ============== */ 90 | 91 | $(window).on('load', function () { 92 | $('[data-spy="affix"]').each(function () { 93 | var $spy = $(this) 94 | , data = $spy.data() 95 | 96 | data.offset = data.offset || {} 97 | 98 | data.offsetBottom && (data.offset.bottom = data.offsetBottom) 99 | data.offsetTop && (data.offset.top = data.offsetTop) 100 | 101 | $spy.affix(data) 102 | }) 103 | }) 104 | 105 | 106 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/build/node_modules/hogan.js/test/spec/specs/partials.yml: -------------------------------------------------------------------------------- 1 | overview: | 2 | Partial tags are used to expand an external template into the current 3 | template. 4 | 5 | The tag's content MUST be a non-whitespace character sequence NOT containing 6 | the current closing delimiter. 7 | 8 | This tag's content names the partial to inject. Set Delimiter tags MUST NOT 9 | affect the parsing of a partial. The partial MUST be rendered against the 10 | context stack local to the tag. If the named partial cannot be found, the 11 | empty string SHOULD be used instead, as in interpolations. 12 | 13 | Partial tags SHOULD be treated as standalone when appropriate. If this tag 14 | is used standalone, any whitespace preceding the tag should treated as 15 | indentation, and prepended to each line of the partial before rendering. 16 | tests: 17 | - name: Basic Behavior 18 | desc: The greater-than operator should expand to the named partial. 19 | data: { } 20 | template: '"{{>text}}"' 21 | partials: { text: 'from partial' } 22 | expected: '"from partial"' 23 | 24 | - name: Failed Lookup 25 | desc: The empty string should be used when the named partial is not found. 26 | data: { } 27 | template: '"{{>text}}"' 28 | partials: { } 29 | expected: '""' 30 | 31 | - name: Context 32 | desc: The greater-than operator should operate within the current context. 33 | data: { text: 'content' } 34 | template: '"{{>partial}}"' 35 | partials: { partial: '*{{text}}*' } 36 | expected: '"*content*"' 37 | 38 | - name: Recursion 39 | desc: The greater-than operator should properly recurse. 40 | data: { content: "X", nodes: [ { content: "Y", nodes: [] } ] } 41 | template: '{{>node}}' 42 | partials: { node: '{{content}}<{{#nodes}}{{>node}}{{/nodes}}>' } 43 | expected: 'X>' 44 | 45 | # Whitespace Sensitivity 46 | 47 | - name: Surrounding Whitespace 48 | desc: The greater-than operator should not alter surrounding whitespace. 49 | data: { } 50 | template: '| {{>partial}} |' 51 | partials: { partial: "\t|\t" } 52 | expected: "| \t|\t |" 53 | 54 | - name: Inline Indentation 55 | desc: Whitespace should be left untouched. 56 | data: { data: '|' } 57 | template: " {{data}} {{> partial}}\n" 58 | partials: { partial: ">\n>" } 59 | expected: " | >\n>\n" 60 | 61 | - name: Standalone Line Endings 62 | desc: '"\r\n" should be considered a newline for standalone tags.' 63 | data: { } 64 | template: "|\r\n{{>partial}}\r\n|" 65 | partials: { partial: ">" } 66 | expected: "|\r\n>|" 67 | 68 | - name: Standalone Without Previous Line 69 | desc: Standalone tags should not require a newline to precede them. 70 | data: { } 71 | template: " {{>partial}}\n>" 72 | partials: { partial: ">\n>"} 73 | expected: " >\n >>" 74 | 75 | - name: Standalone Without Newline 76 | desc: Standalone tags should not require a newline to follow them. 77 | data: { } 78 | template: ">\n {{>partial}}" 79 | partials: { partial: ">\n>" } 80 | expected: ">\n >\n >" 81 | 82 | - name: Standalone Indentation 83 | desc: Each line of the partial should be indented before rendering. 84 | data: { content: "<\n->" } 85 | template: | 86 | \ 87 | {{>partial}} 88 | / 89 | partials: 90 | partial: | 91 | | 92 | {{{content}}} 93 | | 94 | expected: | 95 | \ 96 | | 97 | < 98 | -> 99 | | 100 | / 101 | 102 | # Whitespace Insensitivity 103 | 104 | - name: Padding Whitespace 105 | desc: Superfluous in-tag whitespace should be ignored. 106 | data: { boolean: true } 107 | template: "|{{> partial }}|" 108 | partials: { partial: "[]" } 109 | expected: '|[]|' 110 | -------------------------------------------------------------------------------- /js/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 | test("should toggle active when btn children are clicked", function () { 55 | var btn = $('') 56 | , inner = $('') 57 | btn 58 | .append(inner) 59 | .appendTo($('#qunit-fixture')) 60 | ok(!btn.hasClass('active'), 'btn does not have active class') 61 | inner.click() 62 | ok(btn.hasClass('active'), 'btn has class active') 63 | }) 64 | 65 | test("should toggle active when btn children are clicked within btn-group", function () { 66 | var btngroup = $('
    ') 67 | , btn = $('') 68 | , inner = $('') 69 | btngroup 70 | .append(btn.append(inner)) 71 | .appendTo($('#qunit-fixture')) 72 | ok(!btn.hasClass('active'), 'btn does not have active class') 73 | inner.click() 74 | ok(btn.hasClass('active'), 'btn has class active') 75 | }) 76 | 77 | test("should check for closest matching toggle", function () { 78 | var group = $("
    ") 79 | , btn1 = $("") 80 | , btn2 = $("") 81 | , wrap = $("
    ") 82 | 83 | wrap.append(btn1, btn2) 84 | 85 | group 86 | .append(wrap) 87 | .appendTo($('#qunit-fixture')) 88 | 89 | ok(btn1.hasClass('active'), 'btn1 has active class') 90 | ok(!btn2.hasClass('active'), 'btn2 does not have active class') 91 | btn2.click() 92 | ok(!btn1.hasClass('active'), 'btn1 does not have active class') 93 | ok(btn2.hasClass('active'), 'btn2 has active class') 94 | }) 95 | 96 | }) -------------------------------------------------------------------------------- /docs/build/node_modules/cjson/readme.md: -------------------------------------------------------------------------------- 1 | ## CJSON (Commented Javascript Object Notation) is a comments enabled json config loader. 2 | 3 | JSON has a good spec, is implemented in every language, has easy to read syntax and is much more powerfull then ini files. 4 | 5 | JSON is perfect for writing config files, except of one problem - there is no comments, but sometimes config files get large and need to be commented. 6 | 7 | Well, you could just evaluate json file as a javascript using one-liner, right? 8 | 9 | The purpose of this module is to avoid dirty javascript configs and to enable clean, consistent, secure, portable and JSON valid notation. 10 | 11 | CJSON supports javascript style comments: singleline "//" and multiline "/**/". It takes care about comments inside of strings. 12 | 13 | Example of such shiny config file: 14 | 15 | /* 16 | * This is my app configuration file. 17 | * 18 | */ 19 | { 20 | "host": "localhost", 21 | // app is listening on this port 22 | "port": 8888 23 | } 24 | 25 | 26 | ## API 27 | 28 | ### load the module 29 | var cjson = require('cjson'); 30 | 31 | ### cjson.load(path, [options]); 32 | 33 | Load config file from given path, array of paths or directory. Second parameter is optional and can be a boolean or object. 34 | 35 | - `path` {string} absolute path to the file 36 | - `options` {boolean|Object} optional options 37 | 38 | `options` defaults: 39 | { 40 | merge: false, 41 | replace: null 42 | } 43 | 44 | If you pass `true` as second param, its the same like `{merge: true}` and will merge all configs together. 45 | `replace` allows you to do some string replacements, see `cjson.replace`. 46 | 47 | Examples: 48 | 49 | // just one config 50 | var conf = cjson.load('/path/to/your/config.json'); 51 | 52 | // array of configs 53 | var conf = cjson.load(['/path/to/your/config1.json', '/path/to/your/config2.json']); 54 | 55 | //output 56 | { 57 | config1: {key1: 'value1'} 58 | config2: {key2: 'value2'} 59 | } 60 | 61 | 62 | // use optional merge parameter 63 | // array of configs 64 | var conf = cjson.load(['/path/to/your/config1.json', '/path/to/your/config2.json'], true); 65 | 66 | // output 67 | { 68 | key1: 'value1', 69 | key2: 'value2' 70 | } 71 | 72 | 73 | // load all config files from a directory 74 | var conf = cjson.load('/path/to/your/configs'); 75 | 76 | // overwriting dev config with production 77 | var paths = ['/path/to/conf.json']; 78 | if (process.env.NODE_ENV ==='production') { 79 | paths.push('/path/to/conf-prod.json'); 80 | } 81 | var conf = cjson.load(paths, true); 82 | 83 | ### cjson.extend([deep], target, object1, [objectN]) 84 | 85 | Merge the contents of two or more objects together into the first object. 86 | 87 | - `deep` If true, the merge becomes recursive. 88 | - `target` The object to extend. It will receive the new properties. 89 | - `object1` An object containing additional properties to merge in. 90 | - `objectN` Additional objects containing properties to merge in. 91 | 92 | Example: 93 | 94 | var object = $.extend({}, object1, object2); 95 | 96 | ### cjson.decomment(str) 97 | 98 | Remove javascript style comments, singleline - '//' and multiline - '/**/'. It takes care 99 | about comments inside of strings and escaping. 100 | 101 | ### cjson.parse(str, [reviver]) 102 | 103 | Like `JSON.parse`, but it takes care about comments. Optional `reviver` argument 104 | is for `JSON.parse` method and will be called for every key and value at every level 105 | of the final result 106 | 107 | ### cjson.replace(str, obj) 108 | 109 | Replace all strings `{{key}}` contained in `{key: 'value'}`, where `key` can be any 110 | property of passed `obj`. 111 | 112 | Example: 113 | var str = '{"path": "{{root}}/src"}'; // json file contents 114 | cjson.replace(str, {root: '/usr'}); // '{"path": "/usr/src"}' 115 | 116 | ## Installation 117 | 118 | npm install cjson -------------------------------------------------------------------------------- /docs/examples/signin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sign in · Twitter Bootstrap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 45 | 46 | 47 | 48 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
    63 | 64 | 73 | 74 |
    75 | 76 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /js/bootstrap-tab.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tab.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* TAB CLASS DEFINITION 27 | * ==================== */ 28 | 29 | var Tab = function (element) { 30 | this.element = $(element) 31 | } 32 | 33 | Tab.prototype = { 34 | 35 | constructor: Tab 36 | 37 | , show: function () { 38 | var $this = this.element 39 | , $ul = $this.closest('ul:not(.dropdown-menu)') 40 | , selector = $this.attr('data-target') 41 | , previous 42 | , $target 43 | , e 44 | 45 | if (!selector) { 46 | selector = $this.attr('href') 47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 48 | } 49 | 50 | if ( $this.parent('li').hasClass('active') ) return 51 | 52 | previous = $ul.find('.active:last a')[0] 53 | 54 | e = $.Event('show', { 55 | relatedTarget: previous 56 | }) 57 | 58 | $this.trigger(e) 59 | 60 | if (e.isDefaultPrevented()) return 61 | 62 | $target = $(selector) 63 | 64 | this.activate($this.parent('li'), $ul) 65 | this.activate($target, $target.parent(), function () { 66 | $this.trigger({ 67 | type: 'shown' 68 | , relatedTarget: previous 69 | }) 70 | }) 71 | } 72 | 73 | , activate: function ( element, container, callback) { 74 | var $active = container.find('> .active') 75 | , transition = callback 76 | && $.support.transition 77 | && $active.hasClass('fade') 78 | 79 | function next() { 80 | $active 81 | .removeClass('active') 82 | .find('> .dropdown-menu > .active') 83 | .removeClass('active') 84 | 85 | element.addClass('active') 86 | 87 | if (transition) { 88 | element[0].offsetWidth // reflow for transition 89 | element.addClass('in') 90 | } else { 91 | element.removeClass('fade') 92 | } 93 | 94 | if ( element.parent('.dropdown-menu') ) { 95 | element.closest('li.dropdown').addClass('active') 96 | } 97 | 98 | callback && callback() 99 | } 100 | 101 | transition ? 102 | $active.one($.support.transition.end, next) : 103 | next() 104 | 105 | $active.removeClass('in') 106 | } 107 | } 108 | 109 | 110 | /* TAB PLUGIN DEFINITION 111 | * ===================== */ 112 | 113 | $.fn.tab = function ( option ) { 114 | return this.each(function () { 115 | var $this = $(this) 116 | , data = $this.data('tab') 117 | if (!data) $this.data('tab', (data = new Tab(this))) 118 | if (typeof option == 'string') data[option]() 119 | }) 120 | } 121 | 122 | $.fn.tab.Constructor = Tab 123 | 124 | 125 | /* TAB DATA-API 126 | * ============ */ 127 | 128 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { 129 | e.preventDefault() 130 | $(this).tab('show') 131 | }) 132 | 133 | }(window.jQuery); -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-tab.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tab.js v2.2.2 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"; // jshint ;_; 24 | 25 | 26 | /* TAB CLASS DEFINITION 27 | * ==================== */ 28 | 29 | var Tab = function (element) { 30 | this.element = $(element) 31 | } 32 | 33 | Tab.prototype = { 34 | 35 | constructor: Tab 36 | 37 | , show: function () { 38 | var $this = this.element 39 | , $ul = $this.closest('ul:not(.dropdown-menu)') 40 | , selector = $this.attr('data-target') 41 | , previous 42 | , $target 43 | , e 44 | 45 | if (!selector) { 46 | selector = $this.attr('href') 47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 48 | } 49 | 50 | if ( $this.parent('li').hasClass('active') ) return 51 | 52 | previous = $ul.find('.active:last a')[0] 53 | 54 | e = $.Event('show', { 55 | relatedTarget: previous 56 | }) 57 | 58 | $this.trigger(e) 59 | 60 | if (e.isDefaultPrevented()) return 61 | 62 | $target = $(selector) 63 | 64 | this.activate($this.parent('li'), $ul) 65 | this.activate($target, $target.parent(), function () { 66 | $this.trigger({ 67 | type: 'shown' 68 | , relatedTarget: previous 69 | }) 70 | }) 71 | } 72 | 73 | , activate: function ( element, container, callback) { 74 | var $active = container.find('> .active') 75 | , transition = callback 76 | && $.support.transition 77 | && $active.hasClass('fade') 78 | 79 | function next() { 80 | $active 81 | .removeClass('active') 82 | .find('> .dropdown-menu > .active') 83 | .removeClass('active') 84 | 85 | element.addClass('active') 86 | 87 | if (transition) { 88 | element[0].offsetWidth // reflow for transition 89 | element.addClass('in') 90 | } else { 91 | element.removeClass('fade') 92 | } 93 | 94 | if ( element.parent('.dropdown-menu') ) { 95 | element.closest('li.dropdown').addClass('active') 96 | } 97 | 98 | callback && callback() 99 | } 100 | 101 | transition ? 102 | $active.one($.support.transition.end, next) : 103 | next() 104 | 105 | $active.removeClass('in') 106 | } 107 | } 108 | 109 | 110 | /* TAB PLUGIN DEFINITION 111 | * ===================== */ 112 | 113 | $.fn.tab = function ( option ) { 114 | return this.each(function () { 115 | var $this = $(this) 116 | , data = $this.data('tab') 117 | if (!data) $this.data('tab', (data = new Tab(this))) 118 | if (typeof option == 'string') data[option]() 119 | }) 120 | } 121 | 122 | $.fn.tab.Constructor = Tab 123 | 124 | 125 | /* TAB DATA-API 126 | * ============ */ 127 | 128 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { 129 | e.preventDefault() 130 | $(this).tab('show') 131 | }) 132 | 133 | }(window.jQuery); -------------------------------------------------------------------------------- /js/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 fire show event", function () { 33 | stop() 34 | $.support.transition = false 35 | $("") 36 | .bind("show", function () { 37 | ok(true, "show was called") 38 | }) 39 | .bind("shown", function () { 40 | $(this).remove() 41 | start() 42 | }) 43 | .modal("show") 44 | }) 45 | 46 | test("should not fire shown when default prevented", function () { 47 | stop() 48 | $.support.transition = false 49 | $("") 50 | .bind("show", function (e) { 51 | e.preventDefault() 52 | ok(true, "show was called") 53 | start() 54 | }) 55 | .bind("shown", function () { 56 | ok(false, "shown was called") 57 | }) 58 | .modal("show") 59 | }) 60 | 61 | test("should hide modal when hide is called", function () { 62 | stop() 63 | $.support.transition = false 64 | 65 | $("") 66 | .bind("shown", function () { 67 | ok($('#modal-test').is(":visible"), 'modal visible') 68 | ok($('#modal-test').length, 'modal insterted into dom') 69 | $(this).modal("hide") 70 | }) 71 | .bind("hidden", function() { 72 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 73 | $('#modal-test').remove() 74 | start() 75 | }) 76 | .modal("show") 77 | }) 78 | 79 | test("should toggle when toggle is called", function () { 80 | stop() 81 | $.support.transition = false 82 | var div = $("") 83 | div 84 | .bind("shown", function () { 85 | ok($('#modal-test').is(":visible"), 'modal visible') 86 | ok($('#modal-test').length, 'modal insterted into dom') 87 | div.modal("toggle") 88 | }) 89 | .bind("hidden", function() { 90 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 91 | div.remove() 92 | start() 93 | }) 94 | .modal("toggle") 95 | }) 96 | 97 | test("should remove from dom when click [data-dismiss=modal]", function () { 98 | stop() 99 | $.support.transition = false 100 | var div = $("") 101 | div 102 | .bind("shown", function () { 103 | ok($('#modal-test').is(":visible"), 'modal visible') 104 | ok($('#modal-test').length, 'modal insterted into dom') 105 | div.find('.close').click() 106 | }) 107 | .bind("hidden", function() { 108 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 109 | div.remove() 110 | start() 111 | }) 112 | .modal("toggle") 113 | }) 114 | }) -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-carousel.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-carousel") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).carousel, 'carousel method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).carousel()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should not fire sliden when slide is prevented", function () { 14 | $.support.transition = false 15 | stop() 16 | $('