신수용

mongodb

Showing 365 changed files with 4967 additions and 0 deletions
1 +# Logs
2 +logs
3 +*.log
4 +
5 +# Runtime data
6 +pids
7 +*.pid
8 +*.seed
9 +
10 +# Directory for instrumented libs generated by jscoverage/JSCover
11 +lib-cov
12 +
13 +# Coverage directory used by tools like istanbul
14 +coverage
15 +
16 +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 +.grunt
18 +
19 +# node-waf configuration
20 +.lock-wscript
21 +
22 +# Compiled binary addons (http://nodejs.org/api/addons.html)
23 +build/Release
24 +
25 +# Dependency directory
26 +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
27 +node_modules
28 +
29 +# Debug log from npm
30 +npm-debug.log
1 +{
2 + "curly": true,
3 + "eqeqeq": true,
4 + "undef": true,
5 + "globals": {
6 + "jQuery": true,
7 + "Promise" : true
8 + },
9 + "node": true
10 +}
1 +# App2: MongoDB, Mongoose를 이용하여 CRUD 처리
2 +
3 +## 1. Mongoose 설치
4 +```
5 +# mongoose ORM 설치
6 +npm install --save mongoose
7 +```
8 +
9 +## 2. MongoDB 접속
10 +app.js에 다음 추가
11 +```js
12 +var mongoose = require('mongoose');
13 +// 본인의 mongodb 접속 URL을 확인해서 id:pwd@server:port/dbname 의 형태로
14 +// local의 경우 mongodb://localhost/dbname 형태
15 +mongoose.connect('mongodb://user:asdasd@ds041394.mongolab.com:41394/nodewp');
16 +mongoose.connection.on('error', console.log);
17 +```
18 +
19 +## 3. User 모델 추가
20 +사용자를 저장할 document collection의 모델 models/User.js에 추가
21 +
22 +## 4. users.js controller 구현
23 +Route 함수에 맞게 User 모델을 이용하여 실제 controller logic 구현
24 +
25 +## 5. 사용자 인증
26 +- req.session.user 객체가 있으면 로그인 된 것으로 간주
27 +- signout에서 delete req.session.user를 통해 user객체 삭제
28 +
29 +## 6. Middleware를 이용하여 res.locals에 currentuser와 flashMessages 전달
30 +```js
31 +app.use(function(req, res, next) {
32 + res.locals.currentUser = req.session.user;
33 + res.locals.flashMessages = req.flash();
34 + next();
35 +});
36 +```
37 +
38 +## 7. 문제점
39 +- 비밀번호가 Database에 plain text로 저장된다. 사용자의 개인정보나 비밀번호는 암호화 해서 저장할 필요가 있음
40 +- 이 부분은 다음 시간에 더 나은 방법으로 새로 구현할 예정
1 +var express = require('express');
2 +var path = require('path');
3 +var favicon = require('serve-favicon');
4 +var logger = require('morgan');
5 +var cookieParser = require('cookie-parser');
6 +var bodyParser = require('body-parser');
7 +var session = require('express-session');
8 +var methodOverride = require('method-override');
9 +var flash = require('connect-flash');
10 +var mongoose = require('mongoose');
11 +
12 +var routes = require('./routes/index');
13 +var users = require('./routes/users');
14 +
15 +var app = express();
16 +
17 +// view engine setup
18 +app.set('views', path.join(__dirname, 'views'));
19 +app.set('view engine', 'jade');
20 +if (app.get('env') === 'development') {
21 + app.locals.pretty = true;
22 +}
23 +app.locals.moment = require('moment');
24 +
25 +// mongodb connect
26 +mongoose.connect('mongodb://user:asdasd@ds041394.mongolab.com:41394/nodewp');
27 +mongoose.connection.on('error', console.log);
28 +
29 +// uncomment after placing your favicon in /public
30 +//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
31 +app.use(logger('dev'));
32 +app.use(bodyParser.json());
33 +app.use(bodyParser.urlencoded({ extended: false }));
34 +app.use(cookieParser());
35 +app.use(methodOverride('_method', {methods: ['POST', 'GET']}));
36 +
37 +app.use(session({
38 + resave: true,
39 + saveUninitialized: true,
40 + secret: 'long-long-long-secret-string-1313513tefgwdsvbjkvasd'
41 +}));
42 +app.use(flash());
43 +
44 +app.use(express.static(path.join(__dirname, 'public')));
45 +app.use('/bower_components', express.static(path.join(__dirname, '/bower_components')));
46 +
47 +app.use(function(req, res, next) {
48 + res.locals.currentUser = req.session.user;
49 + res.locals.flashMessages = req.flash();
50 + next();
51 +});
52 +
53 +app.use('/', routes);
54 +app.use('/users', users);
55 +
56 +// catch 404 and forward to error handler
57 +app.use(function(req, res, next) {
58 + var err = new Error('Not Found');
59 + err.status = 404;
60 + next(err);
61 +});
62 +
63 +// error handlers
64 +
65 +// development error handler
66 +// will print stacktrace
67 +if (app.get('env') === 'development') {
68 + app.use(function(err, req, res, next) {
69 + res.status(err.status || 500);
70 + res.render('error', {
71 + message: err.message,
72 + error: err
73 + });
74 + });
75 +}
76 +
77 +// production error handler
78 +// no stacktraces leaked to user
79 +app.use(function(err, req, res, next) {
80 + res.status(err.status || 500);
81 + res.render('error', {
82 + message: err.message,
83 + error: {}
84 + });
85 +});
86 +
87 +
88 +module.exports = app;
1 +#!/usr/bin/env node
2 +
3 +/**
4 + * Module dependencies.
5 + */
6 +
7 +var app = require('../app');
8 +var debug = require('debug')('ex01:server');
9 +var http = require('http');
10 +
11 +/**
12 + * Get port from environment and store in Express.
13 + */
14 +
15 +var port = normalizePort(process.env.PORT || '3000');
16 +app.set('port', port);
17 +
18 +/**
19 + * Create HTTP server.
20 + */
21 +
22 +var server = http.createServer(app);
23 +
24 +/**
25 + * Listen on provided port, on all network interfaces.
26 + */
27 +
28 +server.listen(port);
29 +server.on('error', onError);
30 +server.on('listening', onListening);
31 +
32 +/**
33 + * Normalize a port into a number, string, or false.
34 + */
35 +
36 +function normalizePort(val) {
37 + var port = parseInt(val, 10);
38 +
39 + if (isNaN(port)) {
40 + // named pipe
41 + return val;
42 + }
43 +
44 + if (port >= 0) {
45 + // port number
46 + return port;
47 + }
48 +
49 + return false;
50 +}
51 +
52 +/**
53 + * Event listener for HTTP server "error" event.
54 + */
55 +
56 +function onError(error) {
57 + if (error.syscall !== 'listen') {
58 + throw error;
59 + }
60 +
61 + var bind = typeof port === 'string'
62 + ? 'Pipe ' + port
63 + : 'Port ' + port;
64 +
65 + // handle specific listen errors with friendly messages
66 + switch (error.code) {
67 + case 'EACCES':
68 + console.error(bind + ' requires elevated privileges');
69 + process.exit(1);
70 + break;
71 + case 'EADDRINUSE':
72 + console.error(bind + ' is already in use');
73 + process.exit(1);
74 + break;
75 + default:
76 + throw error;
77 + }
78 +}
79 +
80 +/**
81 + * Event listener for HTTP server "listening" event.
82 + */
83 +
84 +function onListening() {
85 + var addr = server.address();
86 + var bind = typeof addr === 'string'
87 + ? 'pipe ' + addr
88 + : 'port ' + addr.port;
89 + debug('Listening on ' + bind);
90 +}
1 +{
2 + "name": "ex01",
3 + "version": "0.0.0",
4 + "homepage": "https://github.com/dongseop/mju-class-wp",
5 + "authors": [
6 + "Dongseop Kwon <dongseop@gmail.com>"
7 + ],
8 + "license": "MIT",
9 + "ignore": [
10 + "**/.*",
11 + "node_modules",
12 + "bower_components",
13 + "test",
14 + "tests"
15 + ],
16 + "dependencies": {
17 + "bootstrap": "~3.3.5",
18 + "bourbon": "~4.2.5",
19 + "font-awesome": "fontawesome#~4.4.0",
20 + "jquery": "~2.1.4"
21 + }
22 +}
1 +{
2 + "name": "bootstrap",
3 + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 + "keywords": [
5 + "css",
6 + "js",
7 + "less",
8 + "mobile-first",
9 + "responsive",
10 + "front-end",
11 + "framework",
12 + "web"
13 + ],
14 + "homepage": "http://getbootstrap.com",
15 + "license": "MIT",
16 + "moduleType": "globals",
17 + "main": [
18 + "less/bootstrap.less",
19 + "dist/js/bootstrap.js"
20 + ],
21 + "ignore": [
22 + "/.*",
23 + "_config.yml",
24 + "CNAME",
25 + "composer.json",
26 + "CONTRIBUTING.md",
27 + "docs",
28 + "js/tests",
29 + "test-infra"
30 + ],
31 + "dependencies": {
32 + "jquery": ">= 1.9.1"
33 + },
34 + "version": "3.3.5",
35 + "_release": "3.3.5",
36 + "_resolution": {
37 + "type": "version",
38 + "tag": "v3.3.5",
39 + "commit": "16b48259a62f576e52c903c476bd42b90ab22482"
40 + },
41 + "_source": "git://github.com/twbs/bootstrap.git",
42 + "_target": "~3.3.5",
43 + "_originalSource": "bootstrap",
44 + "_direct": true
45 +}
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 +The MIT License (MIT)
2 +
3 +Copyright (c) 2011-2015 Twitter, Inc
4 +
5 +Permission is hereby granted, free of charge, to any person obtaining a copy
6 +of this software and associated documentation files (the "Software"), to deal
7 +in the Software without restriction, including without limitation the rights
8 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 +copies of the Software, and to permit persons to whom the Software is
10 +furnished to do so, subject to the following conditions:
11 +
12 +The above copyright notice and this permission notice shall be included in
13 +all copies or substantial portions of the Software.
14 +
15 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 +THE SOFTWARE.
1 +# [Bootstrap](http://getbootstrap.com)
2 +[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
3 +![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
4 +[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
5 +[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
6 +[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
7 +[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
8 +
9 +Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.
10 +
11 +To get started, check out <http://getbootstrap.com>!
12 +
13 +## Table of contents
14 +
15 +- [Quick start](#quick-start)
16 +- [Bugs and feature requests](#bugs-and-feature-requests)
17 +- [Documentation](#documentation)
18 +- [Contributing](#contributing)
19 +- [Community](#community)
20 +- [Versioning](#versioning)
21 +- [Creators](#creators)
22 +- [Copyright and license](#copyright-and-license)
23 +
24 +## Quick start
25 +
26 +Several quick start options are available:
27 +
28 +- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.5.zip).
29 +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
30 +- Install with [Bower](http://bower.io): `bower install bootstrap`.
31 +- Install with [npm](https://www.npmjs.com): `npm install bootstrap`.
32 +- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.
33 +- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.
34 +
35 +Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
36 +
37 +### What's included
38 +
39 +Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
40 +
41 +```
42 +bootstrap/
43 +├── css/
44 +│ ├── bootstrap.css
45 +│ ├── bootstrap.css.map
46 +│ ├── bootstrap.min.css
47 +│ ├── bootstrap-theme.css
48 +│ ├── bootstrap-theme.css.map
49 +│ └── bootstrap-theme.min.css
50 +├── js/
51 +│ ├── bootstrap.js
52 +│ └── bootstrap.min.js
53 +└── fonts/
54 + ├── glyphicons-halflings-regular.eot
55 + ├── glyphicons-halflings-regular.svg
56 + ├── glyphicons-halflings-regular.ttf
57 + ├── glyphicons-halflings-regular.woff
58 + └── glyphicons-halflings-regular.woff2
59 +```
60 +
61 +We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.
62 +
63 +
64 +
65 +## Bugs and feature requests
66 +
67 +Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
68 +
69 +
70 +## Documentation
71 +
72 +Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://getbootstrap.com>. The docs may also be run locally.
73 +
74 +### Running documentation locally
75 +
76 +1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.5.x).
77 + - **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
78 +2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
79 +3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
80 +4. Open <http://localhost:9001> in your browser, and voilà.
81 +
82 +Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
83 +
84 +### Documentation for previous releases
85 +
86 +Documentation for v2.3.2 has been made available for the time being at <http://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
87 +
88 +[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
89 +
90 +
91 +
92 +## Contributing
93 +
94 +Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
95 +
96 +Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
97 +
98 +Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
99 +
100 +
101 +
102 +## Community
103 +
104 +Get updates on Bootstrap's development and chat with the project maintainers and community members.
105 +
106 +- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
107 +- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
108 +- Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
109 +- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
110 +- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
111 +- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
112 +
113 +
114 +
115 +## Versioning
116 +
117 +For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
118 +
119 +
120 +
121 +## Creators
122 +
123 +**Mark Otto**
124 +
125 +- <https://twitter.com/mdo>
126 +- <https://github.com/mdo>
127 +
128 +**Jacob Thornton**
129 +
130 +- <https://twitter.com/fat>
131 +- <https://github.com/fat>
132 +
133 +
134 +
135 +## Copyright and license
136 +
137 +Code and documentation copyright 2011-2015 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
1 +{
2 + "name": "bootstrap",
3 + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 + "keywords": [
5 + "css",
6 + "js",
7 + "less",
8 + "mobile-first",
9 + "responsive",
10 + "front-end",
11 + "framework",
12 + "web"
13 + ],
14 + "homepage": "http://getbootstrap.com",
15 + "license": "MIT",
16 + "moduleType": "globals",
17 + "main": [
18 + "less/bootstrap.less",
19 + "dist/js/bootstrap.js"
20 + ],
21 + "ignore": [
22 + "/.*",
23 + "_config.yml",
24 + "CNAME",
25 + "composer.json",
26 + "CONTRIBUTING.md",
27 + "docs",
28 + "js/tests",
29 + "test-infra"
30 + ],
31 + "dependencies": {
32 + "jquery": ">= 1.9.1"
33 + }
34 +}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 +require('../../js/transition.js')
3 +require('../../js/alert.js')
4 +require('../../js/button.js')
5 +require('../../js/carousel.js')
6 +require('../../js/collapse.js')
7 +require('../../js/dropdown.js')
8 +require('../../js/modal.js')
9 +require('../../js/tooltip.js')
10 +require('../../js/popover.js')
11 +require('../../js/scrollspy.js')
12 +require('../../js/tab.js')
13 +require('../../js/affix.js')
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +{
2 + "extends" : "../js/.jshintrc",
3 + "asi" : false,
4 + "browser" : false,
5 + "es3" : false,
6 + "node" : true
7 +}
1 +/*!
2 + * Bootstrap Grunt task for the CommonJS module generation
3 + * http://getbootstrap.com
4 + * Copyright 2014-2015 Twitter, Inc.
5 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 + */
7 +
8 +'use strict';
9 +
10 +var fs = require('fs');
11 +var path = require('path');
12 +
13 +var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
14 +
15 +module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
16 + var destDir = path.dirname(destFilepath);
17 +
18 + function srcPathToDestRequire(srcFilepath) {
19 + var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
20 + return 'require(\'' + requirePath + '\')';
21 + }
22 +
23 + var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
24 + try {
25 + fs.writeFileSync(destFilepath, moduleOutputJs);
26 + } catch (err) {
27 + grunt.fail.warn(err);
28 + }
29 + grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
30 +};
1 +/*!
2 + * Bootstrap Grunt task for Glyphicons data generation
3 + * http://getbootstrap.com
4 + * Copyright 2014-2015 Twitter, Inc.
5 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 + */
7 +
8 +'use strict';
9 +
10 +var fs = require('fs');
11 +
12 +module.exports = function generateGlyphiconsData(grunt) {
13 + // Pass encoding, utf8, so `readFileSync` will return a string instead of a
14 + // buffer
15 + var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8');
16 + var glyphiconsLines = glyphiconsFile.split('\n');
17 +
18 + // Use any line that starts with ".glyphicon-" and capture the class name
19 + var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/;
20 + var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' +
21 + '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
22 + var glyphiconsYml = 'docs/_data/glyphicons.yml';
23 + for (var i = 0, len = glyphiconsLines.length; i < len; i++) {
24 + var match = glyphiconsLines[i].match(iconClassName);
25 +
26 + if (match !== null) {
27 + glyphiconsData += '- ' + match[1] + '\n';
28 + }
29 + }
30 +
31 + // Create the `_data` directory if it doesn't already exist
32 + if (!fs.existsSync('docs/_data')) {
33 + fs.mkdirSync('docs/_data');
34 + }
35 +
36 + try {
37 + fs.writeFileSync(glyphiconsYml, glyphiconsData);
38 + } catch (err) {
39 + grunt.fail.warn(err);
40 + }
41 + grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
42 +};
1 +/*!
2 + * Bootstrap Grunt task for parsing Less docstrings
3 + * http://getbootstrap.com
4 + * Copyright 2014-2015 Twitter, Inc.
5 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 + */
7 +
8 +'use strict';
9 +
10 +var Markdown = require('markdown-it');
11 +
12 +function markdown2html(markdownString) {
13 + var md = new Markdown();
14 +
15 + // the slice removes the <p>...</p> wrapper output by Markdown processor
16 + return md.render(markdownString.trim()).slice(3, -5);
17 +}
18 +
19 +
20 +/*
21 +Mini-language:
22 + //== This is a normal heading, which starts a section. Sections group variables together.
23 + //## Optional description for the heading
24 +
25 + //=== This is a subheading.
26 +
27 + //** Optional description for the following variable. You **can** use Markdown in descriptions to discuss `<html>` stuff.
28 + @foo: #fff;
29 +
30 + //-- This is a heading for a section whose variables shouldn't be customizable
31 +
32 + All other lines are ignored completely.
33 +*/
34 +
35 +
36 +var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
37 +var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
38 +var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
39 +var SECTION_DOCSTRING = /^[/]{2}#{2}(.+)$/;
40 +var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]*);[ ]*$/;
41 +var VAR_DOCSTRING = /^[/]{2}[*]{2}(.+)$/;
42 +
43 +function Section(heading, customizable) {
44 + this.heading = heading.trim();
45 + this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
46 + this.customizable = customizable;
47 + this.docstring = null;
48 + this.subsections = [];
49 +}
50 +
51 +Section.prototype.addSubSection = function (subsection) {
52 + this.subsections.push(subsection);
53 +};
54 +
55 +function SubSection(heading) {
56 + this.heading = heading.trim();
57 + this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
58 + this.variables = [];
59 +}
60 +
61 +SubSection.prototype.addVar = function (variable) {
62 + this.variables.push(variable);
63 +};
64 +
65 +function VarDocstring(markdownString) {
66 + this.html = markdown2html(markdownString);
67 +}
68 +
69 +function SectionDocstring(markdownString) {
70 + this.html = markdown2html(markdownString);
71 +}
72 +
73 +function Variable(name, defaultValue) {
74 + this.name = name;
75 + this.defaultValue = defaultValue;
76 + this.docstring = null;
77 +}
78 +
79 +function Tokenizer(fileContent) {
80 + this._lines = fileContent.split('\n');
81 + this._next = undefined;
82 +}
83 +
84 +Tokenizer.prototype.unshift = function (token) {
85 + if (this._next !== undefined) {
86 + throw new Error('Attempted to unshift twice!');
87 + }
88 + this._next = token;
89 +};
90 +
91 +Tokenizer.prototype._shift = function () {
92 + // returning null signals EOF
93 + // returning undefined means the line was ignored
94 + if (this._next !== undefined) {
95 + var result = this._next;
96 + this._next = undefined;
97 + return result;
98 + }
99 + if (this._lines.length <= 0) {
100 + return null;
101 + }
102 + var line = this._lines.shift();
103 + var match = null;
104 + match = SUBSECTION_HEADING.exec(line);
105 + if (match !== null) {
106 + return new SubSection(match[1]);
107 + }
108 + match = CUSTOMIZABLE_HEADING.exec(line);
109 + if (match !== null) {
110 + return new Section(match[1], true);
111 + }
112 + match = UNCUSTOMIZABLE_HEADING.exec(line);
113 + if (match !== null) {
114 + return new Section(match[1], false);
115 + }
116 + match = SECTION_DOCSTRING.exec(line);
117 + if (match !== null) {
118 + return new SectionDocstring(match[1]);
119 + }
120 + match = VAR_DOCSTRING.exec(line);
121 + if (match !== null) {
122 + return new VarDocstring(match[1]);
123 + }
124 + var commentStart = line.lastIndexOf('//');
125 + var varLine = commentStart === -1 ? line : line.slice(0, commentStart);
126 + match = VAR_ASSIGNMENT.exec(varLine);
127 + if (match !== null) {
128 + return new Variable(match[1], match[2]);
129 + }
130 + return undefined;
131 +};
132 +
133 +Tokenizer.prototype.shift = function () {
134 + while (true) {
135 + var result = this._shift();
136 + if (result === undefined) {
137 + continue;
138 + }
139 + return result;
140 + }
141 +};
142 +
143 +function Parser(fileContent) {
144 + this._tokenizer = new Tokenizer(fileContent);
145 +}
146 +
147 +Parser.prototype.parseFile = function () {
148 + var sections = [];
149 + while (true) {
150 + var section = this.parseSection();
151 + if (section === null) {
152 + if (this._tokenizer.shift() !== null) {
153 + throw new Error('Unexpected unparsed section of file remains!');
154 + }
155 + return sections;
156 + }
157 + sections.push(section);
158 + }
159 +};
160 +
161 +Parser.prototype.parseSection = function () {
162 + var section = this._tokenizer.shift();
163 + if (section === null) {
164 + return null;
165 + }
166 + if (!(section instanceof Section)) {
167 + throw new Error('Expected section heading; got: ' + JSON.stringify(section));
168 + }
169 + var docstring = this._tokenizer.shift();
170 + if (docstring instanceof SectionDocstring) {
171 + section.docstring = docstring;
172 + } else {
173 + this._tokenizer.unshift(docstring);
174 + }
175 + this.parseSubSections(section);
176 +
177 + return section;
178 +};
179 +
180 +Parser.prototype.parseSubSections = function (section) {
181 + while (true) {
182 + var subsection = this.parseSubSection();
183 + if (subsection === null) {
184 + if (section.subsections.length === 0) {
185 + // Presume an implicit initial subsection
186 + subsection = new SubSection('');
187 + this.parseVars(subsection);
188 + } else {
189 + break;
190 + }
191 + }
192 + section.addSubSection(subsection);
193 + }
194 +
195 + if (section.subsections.length === 1 && !section.subsections[0].heading && section.subsections[0].variables.length === 0) {
196 + // Ignore lone empty implicit subsection
197 + section.subsections = [];
198 + }
199 +};
200 +
201 +Parser.prototype.parseSubSection = function () {
202 + var subsection = this._tokenizer.shift();
203 + if (subsection instanceof SubSection) {
204 + this.parseVars(subsection);
205 + return subsection;
206 + }
207 + this._tokenizer.unshift(subsection);
208 + return null;
209 +};
210 +
211 +Parser.prototype.parseVars = function (subsection) {
212 + while (true) {
213 + var variable = this.parseVar();
214 + if (variable === null) {
215 + return;
216 + }
217 + subsection.addVar(variable);
218 + }
219 +};
220 +
221 +Parser.prototype.parseVar = function () {
222 + var docstring = this._tokenizer.shift();
223 + if (!(docstring instanceof VarDocstring)) {
224 + this._tokenizer.unshift(docstring);
225 + docstring = null;
226 + }
227 + var variable = this._tokenizer.shift();
228 + if (variable instanceof Variable) {
229 + variable.docstring = docstring;
230 + return variable;
231 + }
232 + this._tokenizer.unshift(variable);
233 + return null;
234 +};
235 +
236 +
237 +module.exports = Parser;
1 +/*!
2 + * Bootstrap Grunt task for generating raw-files.min.js for the Customizer
3 + * http://getbootstrap.com
4 + * Copyright 2014-2015 Twitter, Inc.
5 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 + */
7 +
8 +'use strict';
9 +
10 +var fs = require('fs');
11 +var btoa = require('btoa');
12 +var glob = require('glob');
13 +
14 +function getFiles(type) {
15 + var files = {};
16 + var recursive = type === 'less';
17 + var globExpr = recursive ? '/**/*' : '/*';
18 + glob.sync(type + globExpr)
19 + .filter(function (path) {
20 + return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
21 + })
22 + .forEach(function (fullPath) {
23 + var relativePath = fullPath.replace(/^[^/]+\//, '');
24 + files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8');
25 + });
26 + return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
27 +}
28 +
29 +module.exports = function generateRawFilesJs(grunt, banner) {
30 + if (!banner) {
31 + banner = '';
32 + }
33 + var dirs = ['js', 'less', 'fonts'];
34 + var files = banner + dirs.map(getFiles).reduce(function (combined, file) {
35 + return combined + file;
36 + }, '');
37 + var rawFilesJs = 'docs/assets/js/raw-files.min.js';
38 + try {
39 + fs.writeFileSync(rawFilesJs, files);
40 + } catch (err) {
41 + grunt.fail.warn(err);
42 + }
43 + grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');
44 +};
1 +{
2 + "paths": {
3 + "customizerJs": [
4 + "../assets/js/vendor/autoprefixer.js",
5 + "../assets/js/vendor/less.min.js",
6 + "../assets/js/vendor/jszip.min.js",
7 + "../assets/js/vendor/uglify.min.js",
8 + "../assets/js/vendor/Blob.js",
9 + "../assets/js/vendor/FileSaver.js",
10 + "../assets/js/raw-files.min.js",
11 + "../assets/js/src/customizer.js"
12 + ],
13 + "docsJs": [
14 + "../assets/js/vendor/holder.min.js",
15 + "../assets/js/vendor/ZeroClipboard.min.js",
16 + "../assets/js/vendor/anchor.js",
17 + "../assets/js/src/application.js"
18 + ]
19 + },
20 + "config": {
21 + "autoprefixerBrowsers": [
22 + "Android 2.3",
23 + "Android >= 4",
24 + "Chrome >= 20",
25 + "Firefox >= 24",
26 + "Explorer >= 8",
27 + "iOS >= 6",
28 + "Opera >= 12",
29 + "Safari >= 6"
30 + ],
31 + "jqueryCheck": [
32 + "if (typeof jQuery === 'undefined') {",
33 + " throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
34 + "}\n"
35 + ],
36 + "jqueryVersionCheck": [
37 + "+function ($) {",
38 + " 'use strict';",
39 + " var version = $.fn.jquery.split(' ')[0].split('.')",
40 + " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {",
41 + " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')",
42 + " }",
43 + "}(jQuery);\n\n"
44 + ]
45 + }
46 +}
...\ No newline at end of file ...\ No newline at end of file
1 +[
2 + # Docs: https://saucelabs.com/docs/platforms/webdriver
3 +
4 + {
5 + browserName: "safari",
6 + platform: "OS X 10.10"
7 + },
8 + {
9 + browserName: "chrome",
10 + platform: "OS X 10.10"
11 + },
12 + {
13 + browserName: "firefox",
14 + platform: "OS X 10.10"
15 + },
16 +
17 + # Mac Opera not currently supported by Sauce Labs
18 +
19 + {
20 + browserName: "internet explorer",
21 + version: "11",
22 + platform: "Windows 8.1"
23 + },
24 + {
25 + browserName: "internet explorer",
26 + version: "10",
27 + platform: "Windows 8"
28 + },
29 + {
30 + browserName: "internet explorer",
31 + version: "9",
32 + platform: "Windows 7"
33 + },
34 + {
35 + browserName: "internet explorer",
36 + version: "8",
37 + platform: "Windows 7"
38 + },
39 +
40 + # { # Unofficial
41 + # browserName: "internet explorer",
42 + # version: "7",
43 + # platform: "Windows XP"
44 + # },
45 +
46 + {
47 + browserName: "chrome",
48 + platform: "Windows 8.1"
49 + },
50 + {
51 + browserName: "firefox",
52 + platform: "Windows 8.1"
53 + },
54 +
55 + # Win Opera 15+ not currently supported by Sauce Labs
56 +
57 + {
58 + browserName: "iphone",
59 + platform: "OS X 10.10",
60 + version: "8.2"
61 + },
62 +
63 + # iOS Chrome not currently supported by Sauce Labs
64 +
65 + # Linux (unofficial)
66 + {
67 + browserName: "chrome",
68 + platform: "Linux"
69 + },
70 + {
71 + browserName: "firefox",
72 + platform: "Linux"
73 + }
74 +
75 + # Android Chrome not currently supported by Sauce Labs
76 +
77 + # { # Android Browser (super-unofficial)
78 + # browserName: "android",
79 + # version: "4.0",
80 + # platform: "Linux"
81 + # }
82 +]
1 +{
2 + "disallowEmptyBlocks": true,
3 + "disallowKeywords": ["with"],
4 + "disallowMixedSpacesAndTabs": true,
5 + "disallowMultipleLineStrings": true,
6 + "disallowMultipleVarDecl": true,
7 + "disallowQuotedKeysInObjects": "allButReserved",
8 + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
9 + "disallowSpaceBeforeBinaryOperators": [","],
10 + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
11 + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
12 + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
13 + "disallowSpacesInsideArrayBrackets": true,
14 + "disallowSpacesInsideParentheses": true,
15 + "disallowTrailingComma": true,
16 + "disallowTrailingWhitespace": true,
17 + "requireCamelCaseOrUpperCaseIdentifiers": true,
18 + "requireCapitalizedConstructors": true,
19 + "requireCommaBeforeLineBreak": true,
20 + "requireDollarBeforejQueryAssignment": true,
21 + "requireDotNotation": true,
22 + "requireLineFeedAtFileEnd": true,
23 + "requirePaddingNewLinesAfterUseStrict": true,
24 + "requirePaddingNewLinesBeforeExport": true,
25 + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
26 + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
27 + "requireSpaceAfterLineComment": true,
28 + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
29 + "requireSpaceBetweenArguments": true,
30 + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
31 + "requireSpacesInConditionalExpression": true,
32 + "requireSpacesInForStatement": true,
33 + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
34 + "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
35 + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
36 + "requireSpacesInsideObjectBrackets": "allButNested",
37 + "validateAlignedFunctionParameters": true,
38 + "validateIndentation": 2,
39 + "validateLineBreaks": "LF",
40 + "validateNewlineAfterArrayElements": true,
41 + "validateQuoteMarks": "'"
42 +}
1 +{
2 + "asi" : true,
3 + "browser" : true,
4 + "eqeqeq" : false,
5 + "eqnull" : true,
6 + "es3" : true,
7 + "expr" : true,
8 + "jquery" : true,
9 + "latedef" : true,
10 + "laxbreak" : true,
11 + "nonbsp" : true,
12 + "strict" : true,
13 + "undef" : true,
14 + "unused" : true
15 +}
1 +/* ========================================================================
2 + * Bootstrap: affix.js v3.3.5
3 + * http://getbootstrap.com/javascript/#affix
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // AFFIX CLASS DEFINITION
14 + // ======================
15 +
16 + var Affix = function (element, options) {
17 + this.options = $.extend({}, Affix.DEFAULTS, options)
18 +
19 + this.$target = $(this.options.target)
20 + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
21 + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
22 +
23 + this.$element = $(element)
24 + this.affixed = null
25 + this.unpin = null
26 + this.pinnedOffset = null
27 +
28 + this.checkPosition()
29 + }
30 +
31 + Affix.VERSION = '3.3.5'
32 +
33 + Affix.RESET = 'affix affix-top affix-bottom'
34 +
35 + Affix.DEFAULTS = {
36 + offset: 0,
37 + target: window
38 + }
39 +
40 + Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
41 + var scrollTop = this.$target.scrollTop()
42 + var position = this.$element.offset()
43 + var targetHeight = this.$target.height()
44 +
45 + if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
46 +
47 + if (this.affixed == 'bottom') {
48 + if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
49 + return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
50 + }
51 +
52 + var initializing = this.affixed == null
53 + var colliderTop = initializing ? scrollTop : position.top
54 + var colliderHeight = initializing ? targetHeight : height
55 +
56 + if (offsetTop != null && scrollTop <= offsetTop) return 'top'
57 + if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
58 +
59 + return false
60 + }
61 +
62 + Affix.prototype.getPinnedOffset = function () {
63 + if (this.pinnedOffset) return this.pinnedOffset
64 + this.$element.removeClass(Affix.RESET).addClass('affix')
65 + var scrollTop = this.$target.scrollTop()
66 + var position = this.$element.offset()
67 + return (this.pinnedOffset = position.top - scrollTop)
68 + }
69 +
70 + Affix.prototype.checkPositionWithEventLoop = function () {
71 + setTimeout($.proxy(this.checkPosition, this), 1)
72 + }
73 +
74 + Affix.prototype.checkPosition = function () {
75 + if (!this.$element.is(':visible')) return
76 +
77 + var height = this.$element.height()
78 + var offset = this.options.offset
79 + var offsetTop = offset.top
80 + var offsetBottom = offset.bottom
81 + var scrollHeight = Math.max($(document).height(), $(document.body).height())
82 +
83 + if (typeof offset != 'object') offsetBottom = offsetTop = offset
84 + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
85 + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
86 +
87 + var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
88 +
89 + if (this.affixed != affix) {
90 + if (this.unpin != null) this.$element.css('top', '')
91 +
92 + var affixType = 'affix' + (affix ? '-' + affix : '')
93 + var e = $.Event(affixType + '.bs.affix')
94 +
95 + this.$element.trigger(e)
96 +
97 + if (e.isDefaultPrevented()) return
98 +
99 + this.affixed = affix
100 + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
101 +
102 + this.$element
103 + .removeClass(Affix.RESET)
104 + .addClass(affixType)
105 + .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
106 + }
107 +
108 + if (affix == 'bottom') {
109 + this.$element.offset({
110 + top: scrollHeight - height - offsetBottom
111 + })
112 + }
113 + }
114 +
115 +
116 + // AFFIX PLUGIN DEFINITION
117 + // =======================
118 +
119 + function Plugin(option) {
120 + return this.each(function () {
121 + var $this = $(this)
122 + var data = $this.data('bs.affix')
123 + var options = typeof option == 'object' && option
124 +
125 + if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
126 + if (typeof option == 'string') data[option]()
127 + })
128 + }
129 +
130 + var old = $.fn.affix
131 +
132 + $.fn.affix = Plugin
133 + $.fn.affix.Constructor = Affix
134 +
135 +
136 + // AFFIX NO CONFLICT
137 + // =================
138 +
139 + $.fn.affix.noConflict = function () {
140 + $.fn.affix = old
141 + return this
142 + }
143 +
144 +
145 + // AFFIX DATA-API
146 + // ==============
147 +
148 + $(window).on('load', function () {
149 + $('[data-spy="affix"]').each(function () {
150 + var $spy = $(this)
151 + var data = $spy.data()
152 +
153 + data.offset = data.offset || {}
154 +
155 + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
156 + if (data.offsetTop != null) data.offset.top = data.offsetTop
157 +
158 + Plugin.call($spy, data)
159 + })
160 + })
161 +
162 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: alert.js v3.3.5
3 + * http://getbootstrap.com/javascript/#alerts
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // ALERT CLASS DEFINITION
14 + // ======================
15 +
16 + var dismiss = '[data-dismiss="alert"]'
17 + var Alert = function (el) {
18 + $(el).on('click', dismiss, this.close)
19 + }
20 +
21 + Alert.VERSION = '3.3.5'
22 +
23 + Alert.TRANSITION_DURATION = 150
24 +
25 + Alert.prototype.close = function (e) {
26 + var $this = $(this)
27 + var selector = $this.attr('data-target')
28 +
29 + if (!selector) {
30 + selector = $this.attr('href')
31 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32 + }
33 +
34 + var $parent = $(selector)
35 +
36 + if (e) e.preventDefault()
37 +
38 + if (!$parent.length) {
39 + $parent = $this.closest('.alert')
40 + }
41 +
42 + $parent.trigger(e = $.Event('close.bs.alert'))
43 +
44 + if (e.isDefaultPrevented()) return
45 +
46 + $parent.removeClass('in')
47 +
48 + function removeElement() {
49 + // detach from parent, fire event then clean up data
50 + $parent.detach().trigger('closed.bs.alert').remove()
51 + }
52 +
53 + $.support.transition && $parent.hasClass('fade') ?
54 + $parent
55 + .one('bsTransitionEnd', removeElement)
56 + .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
57 + removeElement()
58 + }
59 +
60 +
61 + // ALERT PLUGIN DEFINITION
62 + // =======================
63 +
64 + function Plugin(option) {
65 + return this.each(function () {
66 + var $this = $(this)
67 + var data = $this.data('bs.alert')
68 +
69 + if (!data) $this.data('bs.alert', (data = new Alert(this)))
70 + if (typeof option == 'string') data[option].call($this)
71 + })
72 + }
73 +
74 + var old = $.fn.alert
75 +
76 + $.fn.alert = Plugin
77 + $.fn.alert.Constructor = Alert
78 +
79 +
80 + // ALERT NO CONFLICT
81 + // =================
82 +
83 + $.fn.alert.noConflict = function () {
84 + $.fn.alert = old
85 + return this
86 + }
87 +
88 +
89 + // ALERT DATA-API
90 + // ==============
91 +
92 + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
93 +
94 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: button.js v3.3.5
3 + * http://getbootstrap.com/javascript/#buttons
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // BUTTON PUBLIC CLASS DEFINITION
14 + // ==============================
15 +
16 + var Button = function (element, options) {
17 + this.$element = $(element)
18 + this.options = $.extend({}, Button.DEFAULTS, options)
19 + this.isLoading = false
20 + }
21 +
22 + Button.VERSION = '3.3.5'
23 +
24 + Button.DEFAULTS = {
25 + loadingText: 'loading...'
26 + }
27 +
28 + Button.prototype.setState = function (state) {
29 + var d = 'disabled'
30 + var $el = this.$element
31 + var val = $el.is('input') ? 'val' : 'html'
32 + var data = $el.data()
33 +
34 + state += 'Text'
35 +
36 + if (data.resetText == null) $el.data('resetText', $el[val]())
37 +
38 + // push to event loop to allow forms to submit
39 + setTimeout($.proxy(function () {
40 + $el[val](data[state] == null ? this.options[state] : data[state])
41 +
42 + if (state == 'loadingText') {
43 + this.isLoading = true
44 + $el.addClass(d).attr(d, d)
45 + } else if (this.isLoading) {
46 + this.isLoading = false
47 + $el.removeClass(d).removeAttr(d)
48 + }
49 + }, this), 0)
50 + }
51 +
52 + Button.prototype.toggle = function () {
53 + var changed = true
54 + var $parent = this.$element.closest('[data-toggle="buttons"]')
55 +
56 + if ($parent.length) {
57 + var $input = this.$element.find('input')
58 + if ($input.prop('type') == 'radio') {
59 + if ($input.prop('checked')) changed = false
60 + $parent.find('.active').removeClass('active')
61 + this.$element.addClass('active')
62 + } else if ($input.prop('type') == 'checkbox') {
63 + if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
64 + this.$element.toggleClass('active')
65 + }
66 + $input.prop('checked', this.$element.hasClass('active'))
67 + if (changed) $input.trigger('change')
68 + } else {
69 + this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
70 + this.$element.toggleClass('active')
71 + }
72 + }
73 +
74 +
75 + // BUTTON PLUGIN DEFINITION
76 + // ========================
77 +
78 + function Plugin(option) {
79 + return this.each(function () {
80 + var $this = $(this)
81 + var data = $this.data('bs.button')
82 + var options = typeof option == 'object' && option
83 +
84 + if (!data) $this.data('bs.button', (data = new Button(this, options)))
85 +
86 + if (option == 'toggle') data.toggle()
87 + else if (option) data.setState(option)
88 + })
89 + }
90 +
91 + var old = $.fn.button
92 +
93 + $.fn.button = Plugin
94 + $.fn.button.Constructor = Button
95 +
96 +
97 + // BUTTON NO CONFLICT
98 + // ==================
99 +
100 + $.fn.button.noConflict = function () {
101 + $.fn.button = old
102 + return this
103 + }
104 +
105 +
106 + // BUTTON DATA-API
107 + // ===============
108 +
109 + $(document)
110 + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
111 + var $btn = $(e.target)
112 + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
113 + Plugin.call($btn, 'toggle')
114 + if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
115 + })
116 + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
117 + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
118 + })
119 +
120 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: carousel.js v3.3.5
3 + * http://getbootstrap.com/javascript/#carousel
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // CAROUSEL CLASS DEFINITION
14 + // =========================
15 +
16 + var Carousel = function (element, options) {
17 + this.$element = $(element)
18 + this.$indicators = this.$element.find('.carousel-indicators')
19 + this.options = options
20 + this.paused = null
21 + this.sliding = null
22 + this.interval = null
23 + this.$active = null
24 + this.$items = null
25 +
26 + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
27 +
28 + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
29 + .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
30 + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
31 + }
32 +
33 + Carousel.VERSION = '3.3.5'
34 +
35 + Carousel.TRANSITION_DURATION = 600
36 +
37 + Carousel.DEFAULTS = {
38 + interval: 5000,
39 + pause: 'hover',
40 + wrap: true,
41 + keyboard: true
42 + }
43 +
44 + Carousel.prototype.keydown = function (e) {
45 + if (/input|textarea/i.test(e.target.tagName)) return
46 + switch (e.which) {
47 + case 37: this.prev(); break
48 + case 39: this.next(); break
49 + default: return
50 + }
51 +
52 + e.preventDefault()
53 + }
54 +
55 + Carousel.prototype.cycle = function (e) {
56 + e || (this.paused = false)
57 +
58 + this.interval && clearInterval(this.interval)
59 +
60 + this.options.interval
61 + && !this.paused
62 + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
63 +
64 + return this
65 + }
66 +
67 + Carousel.prototype.getItemIndex = function (item) {
68 + this.$items = item.parent().children('.item')
69 + return this.$items.index(item || this.$active)
70 + }
71 +
72 + Carousel.prototype.getItemForDirection = function (direction, active) {
73 + var activeIndex = this.getItemIndex(active)
74 + var willWrap = (direction == 'prev' && activeIndex === 0)
75 + || (direction == 'next' && activeIndex == (this.$items.length - 1))
76 + if (willWrap && !this.options.wrap) return active
77 + var delta = direction == 'prev' ? -1 : 1
78 + var itemIndex = (activeIndex + delta) % this.$items.length
79 + return this.$items.eq(itemIndex)
80 + }
81 +
82 + Carousel.prototype.to = function (pos) {
83 + var that = this
84 + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
85 +
86 + if (pos > (this.$items.length - 1) || pos < 0) return
87 +
88 + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
89 + if (activeIndex == pos) return this.pause().cycle()
90 +
91 + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
92 + }
93 +
94 + Carousel.prototype.pause = function (e) {
95 + e || (this.paused = true)
96 +
97 + if (this.$element.find('.next, .prev').length && $.support.transition) {
98 + this.$element.trigger($.support.transition.end)
99 + this.cycle(true)
100 + }
101 +
102 + this.interval = clearInterval(this.interval)
103 +
104 + return this
105 + }
106 +
107 + Carousel.prototype.next = function () {
108 + if (this.sliding) return
109 + return this.slide('next')
110 + }
111 +
112 + Carousel.prototype.prev = function () {
113 + if (this.sliding) return
114 + return this.slide('prev')
115 + }
116 +
117 + Carousel.prototype.slide = function (type, next) {
118 + var $active = this.$element.find('.item.active')
119 + var $next = next || this.getItemForDirection(type, $active)
120 + var isCycling = this.interval
121 + var direction = type == 'next' ? 'left' : 'right'
122 + var that = this
123 +
124 + if ($next.hasClass('active')) return (this.sliding = false)
125 +
126 + var relatedTarget = $next[0]
127 + var slideEvent = $.Event('slide.bs.carousel', {
128 + relatedTarget: relatedTarget,
129 + direction: direction
130 + })
131 + this.$element.trigger(slideEvent)
132 + if (slideEvent.isDefaultPrevented()) return
133 +
134 + this.sliding = true
135 +
136 + isCycling && this.pause()
137 +
138 + if (this.$indicators.length) {
139 + this.$indicators.find('.active').removeClass('active')
140 + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
141 + $nextIndicator && $nextIndicator.addClass('active')
142 + }
143 +
144 + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
145 + if ($.support.transition && this.$element.hasClass('slide')) {
146 + $next.addClass(type)
147 + $next[0].offsetWidth // force reflow
148 + $active.addClass(direction)
149 + $next.addClass(direction)
150 + $active
151 + .one('bsTransitionEnd', function () {
152 + $next.removeClass([type, direction].join(' ')).addClass('active')
153 + $active.removeClass(['active', direction].join(' '))
154 + that.sliding = false
155 + setTimeout(function () {
156 + that.$element.trigger(slidEvent)
157 + }, 0)
158 + })
159 + .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
160 + } else {
161 + $active.removeClass('active')
162 + $next.addClass('active')
163 + this.sliding = false
164 + this.$element.trigger(slidEvent)
165 + }
166 +
167 + isCycling && this.cycle()
168 +
169 + return this
170 + }
171 +
172 +
173 + // CAROUSEL PLUGIN DEFINITION
174 + // ==========================
175 +
176 + function Plugin(option) {
177 + return this.each(function () {
178 + var $this = $(this)
179 + var data = $this.data('bs.carousel')
180 + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
181 + var action = typeof option == 'string' ? option : options.slide
182 +
183 + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
184 + if (typeof option == 'number') data.to(option)
185 + else if (action) data[action]()
186 + else if (options.interval) data.pause().cycle()
187 + })
188 + }
189 +
190 + var old = $.fn.carousel
191 +
192 + $.fn.carousel = Plugin
193 + $.fn.carousel.Constructor = Carousel
194 +
195 +
196 + // CAROUSEL NO CONFLICT
197 + // ====================
198 +
199 + $.fn.carousel.noConflict = function () {
200 + $.fn.carousel = old
201 + return this
202 + }
203 +
204 +
205 + // CAROUSEL DATA-API
206 + // =================
207 +
208 + var clickHandler = function (e) {
209 + var href
210 + var $this = $(this)
211 + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
212 + if (!$target.hasClass('carousel')) return
213 + var options = $.extend({}, $target.data(), $this.data())
214 + var slideIndex = $this.attr('data-slide-to')
215 + if (slideIndex) options.interval = false
216 +
217 + Plugin.call($target, options)
218 +
219 + if (slideIndex) {
220 + $target.data('bs.carousel').to(slideIndex)
221 + }
222 +
223 + e.preventDefault()
224 + }
225 +
226 + $(document)
227 + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
228 + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
229 +
230 + $(window).on('load', function () {
231 + $('[data-ride="carousel"]').each(function () {
232 + var $carousel = $(this)
233 + Plugin.call($carousel, $carousel.data())
234 + })
235 + })
236 +
237 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: collapse.js v3.3.5
3 + * http://getbootstrap.com/javascript/#collapse
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // COLLAPSE PUBLIC CLASS DEFINITION
14 + // ================================
15 +
16 + var Collapse = function (element, options) {
17 + this.$element = $(element)
18 + this.options = $.extend({}, Collapse.DEFAULTS, options)
19 + this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
20 + '[data-toggle="collapse"][data-target="#' + element.id + '"]')
21 + this.transitioning = null
22 +
23 + if (this.options.parent) {
24 + this.$parent = this.getParent()
25 + } else {
26 + this.addAriaAndCollapsedClass(this.$element, this.$trigger)
27 + }
28 +
29 + if (this.options.toggle) this.toggle()
30 + }
31 +
32 + Collapse.VERSION = '3.3.5'
33 +
34 + Collapse.TRANSITION_DURATION = 350
35 +
36 + Collapse.DEFAULTS = {
37 + toggle: true
38 + }
39 +
40 + Collapse.prototype.dimension = function () {
41 + var hasWidth = this.$element.hasClass('width')
42 + return hasWidth ? 'width' : 'height'
43 + }
44 +
45 + Collapse.prototype.show = function () {
46 + if (this.transitioning || this.$element.hasClass('in')) return
47 +
48 + var activesData
49 + var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
50 +
51 + if (actives && actives.length) {
52 + activesData = actives.data('bs.collapse')
53 + if (activesData && activesData.transitioning) return
54 + }
55 +
56 + var startEvent = $.Event('show.bs.collapse')
57 + this.$element.trigger(startEvent)
58 + if (startEvent.isDefaultPrevented()) return
59 +
60 + if (actives && actives.length) {
61 + Plugin.call(actives, 'hide')
62 + activesData || actives.data('bs.collapse', null)
63 + }
64 +
65 + var dimension = this.dimension()
66 +
67 + this.$element
68 + .removeClass('collapse')
69 + .addClass('collapsing')[dimension](0)
70 + .attr('aria-expanded', true)
71 +
72 + this.$trigger
73 + .removeClass('collapsed')
74 + .attr('aria-expanded', true)
75 +
76 + this.transitioning = 1
77 +
78 + var complete = function () {
79 + this.$element
80 + .removeClass('collapsing')
81 + .addClass('collapse in')[dimension]('')
82 + this.transitioning = 0
83 + this.$element
84 + .trigger('shown.bs.collapse')
85 + }
86 +
87 + if (!$.support.transition) return complete.call(this)
88 +
89 + var scrollSize = $.camelCase(['scroll', dimension].join('-'))
90 +
91 + this.$element
92 + .one('bsTransitionEnd', $.proxy(complete, this))
93 + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
94 + }
95 +
96 + Collapse.prototype.hide = function () {
97 + if (this.transitioning || !this.$element.hasClass('in')) return
98 +
99 + var startEvent = $.Event('hide.bs.collapse')
100 + this.$element.trigger(startEvent)
101 + if (startEvent.isDefaultPrevented()) return
102 +
103 + var dimension = this.dimension()
104 +
105 + this.$element[dimension](this.$element[dimension]())[0].offsetHeight
106 +
107 + this.$element
108 + .addClass('collapsing')
109 + .removeClass('collapse in')
110 + .attr('aria-expanded', false)
111 +
112 + this.$trigger
113 + .addClass('collapsed')
114 + .attr('aria-expanded', false)
115 +
116 + this.transitioning = 1
117 +
118 + var complete = function () {
119 + this.transitioning = 0
120 + this.$element
121 + .removeClass('collapsing')
122 + .addClass('collapse')
123 + .trigger('hidden.bs.collapse')
124 + }
125 +
126 + if (!$.support.transition) return complete.call(this)
127 +
128 + this.$element
129 + [dimension](0)
130 + .one('bsTransitionEnd', $.proxy(complete, this))
131 + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
132 + }
133 +
134 + Collapse.prototype.toggle = function () {
135 + this[this.$element.hasClass('in') ? 'hide' : 'show']()
136 + }
137 +
138 + Collapse.prototype.getParent = function () {
139 + return $(this.options.parent)
140 + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
141 + .each($.proxy(function (i, element) {
142 + var $element = $(element)
143 + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
144 + }, this))
145 + .end()
146 + }
147 +
148 + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
149 + var isOpen = $element.hasClass('in')
150 +
151 + $element.attr('aria-expanded', isOpen)
152 + $trigger
153 + .toggleClass('collapsed', !isOpen)
154 + .attr('aria-expanded', isOpen)
155 + }
156 +
157 + function getTargetFromTrigger($trigger) {
158 + var href
159 + var target = $trigger.attr('data-target')
160 + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
161 +
162 + return $(target)
163 + }
164 +
165 +
166 + // COLLAPSE PLUGIN DEFINITION
167 + // ==========================
168 +
169 + function Plugin(option) {
170 + return this.each(function () {
171 + var $this = $(this)
172 + var data = $this.data('bs.collapse')
173 + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
174 +
175 + if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
176 + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
177 + if (typeof option == 'string') data[option]()
178 + })
179 + }
180 +
181 + var old = $.fn.collapse
182 +
183 + $.fn.collapse = Plugin
184 + $.fn.collapse.Constructor = Collapse
185 +
186 +
187 + // COLLAPSE NO CONFLICT
188 + // ====================
189 +
190 + $.fn.collapse.noConflict = function () {
191 + $.fn.collapse = old
192 + return this
193 + }
194 +
195 +
196 + // COLLAPSE DATA-API
197 + // =================
198 +
199 + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
200 + var $this = $(this)
201 +
202 + if (!$this.attr('data-target')) e.preventDefault()
203 +
204 + var $target = getTargetFromTrigger($this)
205 + var data = $target.data('bs.collapse')
206 + var option = data ? 'toggle' : $this.data()
207 +
208 + Plugin.call($target, option)
209 + })
210 +
211 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: dropdown.js v3.3.5
3 + * http://getbootstrap.com/javascript/#dropdowns
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // DROPDOWN CLASS DEFINITION
14 + // =========================
15 +
16 + var backdrop = '.dropdown-backdrop'
17 + var toggle = '[data-toggle="dropdown"]'
18 + var Dropdown = function (element) {
19 + $(element).on('click.bs.dropdown', this.toggle)
20 + }
21 +
22 + Dropdown.VERSION = '3.3.5'
23 +
24 + function getParent($this) {
25 + var selector = $this.attr('data-target')
26 +
27 + if (!selector) {
28 + selector = $this.attr('href')
29 + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
30 + }
31 +
32 + var $parent = selector && $(selector)
33 +
34 + return $parent && $parent.length ? $parent : $this.parent()
35 + }
36 +
37 + function clearMenus(e) {
38 + if (e && e.which === 3) return
39 + $(backdrop).remove()
40 + $(toggle).each(function () {
41 + var $this = $(this)
42 + var $parent = getParent($this)
43 + var relatedTarget = { relatedTarget: this }
44 +
45 + if (!$parent.hasClass('open')) return
46 +
47 + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
48 +
49 + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
50 +
51 + if (e.isDefaultPrevented()) return
52 +
53 + $this.attr('aria-expanded', 'false')
54 + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
55 + })
56 + }
57 +
58 + Dropdown.prototype.toggle = function (e) {
59 + var $this = $(this)
60 +
61 + if ($this.is('.disabled, :disabled')) return
62 +
63 + var $parent = getParent($this)
64 + var isActive = $parent.hasClass('open')
65 +
66 + clearMenus()
67 +
68 + if (!isActive) {
69 + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
70 + // if mobile we use a backdrop because click events don't delegate
71 + $(document.createElement('div'))
72 + .addClass('dropdown-backdrop')
73 + .insertAfter($(this))
74 + .on('click', clearMenus)
75 + }
76 +
77 + var relatedTarget = { relatedTarget: this }
78 + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
79 +
80 + if (e.isDefaultPrevented()) return
81 +
82 + $this
83 + .trigger('focus')
84 + .attr('aria-expanded', 'true')
85 +
86 + $parent
87 + .toggleClass('open')
88 + .trigger('shown.bs.dropdown', relatedTarget)
89 + }
90 +
91 + return false
92 + }
93 +
94 + Dropdown.prototype.keydown = function (e) {
95 + if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
96 +
97 + var $this = $(this)
98 +
99 + e.preventDefault()
100 + e.stopPropagation()
101 +
102 + if ($this.is('.disabled, :disabled')) return
103 +
104 + var $parent = getParent($this)
105 + var isActive = $parent.hasClass('open')
106 +
107 + if (!isActive && e.which != 27 || isActive && e.which == 27) {
108 + if (e.which == 27) $parent.find(toggle).trigger('focus')
109 + return $this.trigger('click')
110 + }
111 +
112 + var desc = ' li:not(.disabled):visible a'
113 + var $items = $parent.find('.dropdown-menu' + desc)
114 +
115 + if (!$items.length) return
116 +
117 + var index = $items.index(e.target)
118 +
119 + if (e.which == 38 && index > 0) index-- // up
120 + if (e.which == 40 && index < $items.length - 1) index++ // down
121 + if (!~index) index = 0
122 +
123 + $items.eq(index).trigger('focus')
124 + }
125 +
126 +
127 + // DROPDOWN PLUGIN DEFINITION
128 + // ==========================
129 +
130 + function Plugin(option) {
131 + return this.each(function () {
132 + var $this = $(this)
133 + var data = $this.data('bs.dropdown')
134 +
135 + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
136 + if (typeof option == 'string') data[option].call($this)
137 + })
138 + }
139 +
140 + var old = $.fn.dropdown
141 +
142 + $.fn.dropdown = Plugin
143 + $.fn.dropdown.Constructor = Dropdown
144 +
145 +
146 + // DROPDOWN NO CONFLICT
147 + // ====================
148 +
149 + $.fn.dropdown.noConflict = function () {
150 + $.fn.dropdown = old
151 + return this
152 + }
153 +
154 +
155 + // APPLY TO STANDARD DROPDOWN ELEMENTS
156 + // ===================================
157 +
158 + $(document)
159 + .on('click.bs.dropdown.data-api', clearMenus)
160 + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
161 + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
162 + .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
163 + .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
164 +
165 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: modal.js v3.3.5
3 + * http://getbootstrap.com/javascript/#modals
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // MODAL CLASS DEFINITION
14 + // ======================
15 +
16 + var Modal = function (element, options) {
17 + this.options = options
18 + this.$body = $(document.body)
19 + this.$element = $(element)
20 + this.$dialog = this.$element.find('.modal-dialog')
21 + this.$backdrop = null
22 + this.isShown = null
23 + this.originalBodyPad = null
24 + this.scrollbarWidth = 0
25 + this.ignoreBackdropClick = false
26 +
27 + if (this.options.remote) {
28 + this.$element
29 + .find('.modal-content')
30 + .load(this.options.remote, $.proxy(function () {
31 + this.$element.trigger('loaded.bs.modal')
32 + }, this))
33 + }
34 + }
35 +
36 + Modal.VERSION = '3.3.5'
37 +
38 + Modal.TRANSITION_DURATION = 300
39 + Modal.BACKDROP_TRANSITION_DURATION = 150
40 +
41 + Modal.DEFAULTS = {
42 + backdrop: true,
43 + keyboard: true,
44 + show: true
45 + }
46 +
47 + Modal.prototype.toggle = function (_relatedTarget) {
48 + return this.isShown ? this.hide() : this.show(_relatedTarget)
49 + }
50 +
51 + Modal.prototype.show = function (_relatedTarget) {
52 + var that = this
53 + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
54 +
55 + this.$element.trigger(e)
56 +
57 + if (this.isShown || e.isDefaultPrevented()) return
58 +
59 + this.isShown = true
60 +
61 + this.checkScrollbar()
62 + this.setScrollbar()
63 + this.$body.addClass('modal-open')
64 +
65 + this.escape()
66 + this.resize()
67 +
68 + this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
69 +
70 + this.$dialog.on('mousedown.dismiss.bs.modal', function () {
71 + that.$element.one('mouseup.dismiss.bs.modal', function (e) {
72 + if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
73 + })
74 + })
75 +
76 + this.backdrop(function () {
77 + var transition = $.support.transition && that.$element.hasClass('fade')
78 +
79 + if (!that.$element.parent().length) {
80 + that.$element.appendTo(that.$body) // don't move modals dom position
81 + }
82 +
83 + that.$element
84 + .show()
85 + .scrollTop(0)
86 +
87 + that.adjustDialog()
88 +
89 + if (transition) {
90 + that.$element[0].offsetWidth // force reflow
91 + }
92 +
93 + that.$element.addClass('in')
94 +
95 + that.enforceFocus()
96 +
97 + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
98 +
99 + transition ?
100 + that.$dialog // wait for modal to slide in
101 + .one('bsTransitionEnd', function () {
102 + that.$element.trigger('focus').trigger(e)
103 + })
104 + .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
105 + that.$element.trigger('focus').trigger(e)
106 + })
107 + }
108 +
109 + Modal.prototype.hide = function (e) {
110 + if (e) e.preventDefault()
111 +
112 + e = $.Event('hide.bs.modal')
113 +
114 + this.$element.trigger(e)
115 +
116 + if (!this.isShown || e.isDefaultPrevented()) return
117 +
118 + this.isShown = false
119 +
120 + this.escape()
121 + this.resize()
122 +
123 + $(document).off('focusin.bs.modal')
124 +
125 + this.$element
126 + .removeClass('in')
127 + .off('click.dismiss.bs.modal')
128 + .off('mouseup.dismiss.bs.modal')
129 +
130 + this.$dialog.off('mousedown.dismiss.bs.modal')
131 +
132 + $.support.transition && this.$element.hasClass('fade') ?
133 + this.$element
134 + .one('bsTransitionEnd', $.proxy(this.hideModal, this))
135 + .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
136 + this.hideModal()
137 + }
138 +
139 + Modal.prototype.enforceFocus = function () {
140 + $(document)
141 + .off('focusin.bs.modal') // guard against infinite focus loop
142 + .on('focusin.bs.modal', $.proxy(function (e) {
143 + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
144 + this.$element.trigger('focus')
145 + }
146 + }, this))
147 + }
148 +
149 + Modal.prototype.escape = function () {
150 + if (this.isShown && this.options.keyboard) {
151 + this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
152 + e.which == 27 && this.hide()
153 + }, this))
154 + } else if (!this.isShown) {
155 + this.$element.off('keydown.dismiss.bs.modal')
156 + }
157 + }
158 +
159 + Modal.prototype.resize = function () {
160 + if (this.isShown) {
161 + $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
162 + } else {
163 + $(window).off('resize.bs.modal')
164 + }
165 + }
166 +
167 + Modal.prototype.hideModal = function () {
168 + var that = this
169 + this.$element.hide()
170 + this.backdrop(function () {
171 + that.$body.removeClass('modal-open')
172 + that.resetAdjustments()
173 + that.resetScrollbar()
174 + that.$element.trigger('hidden.bs.modal')
175 + })
176 + }
177 +
178 + Modal.prototype.removeBackdrop = function () {
179 + this.$backdrop && this.$backdrop.remove()
180 + this.$backdrop = null
181 + }
182 +
183 + Modal.prototype.backdrop = function (callback) {
184 + var that = this
185 + var animate = this.$element.hasClass('fade') ? 'fade' : ''
186 +
187 + if (this.isShown && this.options.backdrop) {
188 + var doAnimate = $.support.transition && animate
189 +
190 + this.$backdrop = $(document.createElement('div'))
191 + .addClass('modal-backdrop ' + animate)
192 + .appendTo(this.$body)
193 +
194 + this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
195 + if (this.ignoreBackdropClick) {
196 + this.ignoreBackdropClick = false
197 + return
198 + }
199 + if (e.target !== e.currentTarget) return
200 + this.options.backdrop == 'static'
201 + ? this.$element[0].focus()
202 + : this.hide()
203 + }, this))
204 +
205 + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
206 +
207 + this.$backdrop.addClass('in')
208 +
209 + if (!callback) return
210 +
211 + doAnimate ?
212 + this.$backdrop
213 + .one('bsTransitionEnd', callback)
214 + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
215 + callback()
216 +
217 + } else if (!this.isShown && this.$backdrop) {
218 + this.$backdrop.removeClass('in')
219 +
220 + var callbackRemove = function () {
221 + that.removeBackdrop()
222 + callback && callback()
223 + }
224 + $.support.transition && this.$element.hasClass('fade') ?
225 + this.$backdrop
226 + .one('bsTransitionEnd', callbackRemove)
227 + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
228 + callbackRemove()
229 +
230 + } else if (callback) {
231 + callback()
232 + }
233 + }
234 +
235 + // these following methods are used to handle overflowing modals
236 +
237 + Modal.prototype.handleUpdate = function () {
238 + this.adjustDialog()
239 + }
240 +
241 + Modal.prototype.adjustDialog = function () {
242 + var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
243 +
244 + this.$element.css({
245 + paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
246 + paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
247 + })
248 + }
249 +
250 + Modal.prototype.resetAdjustments = function () {
251 + this.$element.css({
252 + paddingLeft: '',
253 + paddingRight: ''
254 + })
255 + }
256 +
257 + Modal.prototype.checkScrollbar = function () {
258 + var fullWindowWidth = window.innerWidth
259 + if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
260 + var documentElementRect = document.documentElement.getBoundingClientRect()
261 + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
262 + }
263 + this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
264 + this.scrollbarWidth = this.measureScrollbar()
265 + }
266 +
267 + Modal.prototype.setScrollbar = function () {
268 + var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
269 + this.originalBodyPad = document.body.style.paddingRight || ''
270 + if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
271 + }
272 +
273 + Modal.prototype.resetScrollbar = function () {
274 + this.$body.css('padding-right', this.originalBodyPad)
275 + }
276 +
277 + Modal.prototype.measureScrollbar = function () { // thx walsh
278 + var scrollDiv = document.createElement('div')
279 + scrollDiv.className = 'modal-scrollbar-measure'
280 + this.$body.append(scrollDiv)
281 + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
282 + this.$body[0].removeChild(scrollDiv)
283 + return scrollbarWidth
284 + }
285 +
286 +
287 + // MODAL PLUGIN DEFINITION
288 + // =======================
289 +
290 + function Plugin(option, _relatedTarget) {
291 + return this.each(function () {
292 + var $this = $(this)
293 + var data = $this.data('bs.modal')
294 + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
295 +
296 + if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
297 + if (typeof option == 'string') data[option](_relatedTarget)
298 + else if (options.show) data.show(_relatedTarget)
299 + })
300 + }
301 +
302 + var old = $.fn.modal
303 +
304 + $.fn.modal = Plugin
305 + $.fn.modal.Constructor = Modal
306 +
307 +
308 + // MODAL NO CONFLICT
309 + // =================
310 +
311 + $.fn.modal.noConflict = function () {
312 + $.fn.modal = old
313 + return this
314 + }
315 +
316 +
317 + // MODAL DATA-API
318 + // ==============
319 +
320 + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
321 + var $this = $(this)
322 + var href = $this.attr('href')
323 + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
324 + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
325 +
326 + if ($this.is('a')) e.preventDefault()
327 +
328 + $target.one('show.bs.modal', function (showEvent) {
329 + if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
330 + $target.one('hidden.bs.modal', function () {
331 + $this.is(':visible') && $this.trigger('focus')
332 + })
333 + })
334 + Plugin.call($target, option, this)
335 + })
336 +
337 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: popover.js v3.3.5
3 + * http://getbootstrap.com/javascript/#popovers
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // POPOVER PUBLIC CLASS DEFINITION
14 + // ===============================
15 +
16 + var Popover = function (element, options) {
17 + this.init('popover', element, options)
18 + }
19 +
20 + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21 +
22 + Popover.VERSION = '3.3.5'
23 +
24 + Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
25 + placement: 'right',
26 + trigger: 'click',
27 + content: '',
28 + template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
29 + })
30 +
31 +
32 + // NOTE: POPOVER EXTENDS tooltip.js
33 + // ================================
34 +
35 + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
36 +
37 + Popover.prototype.constructor = Popover
38 +
39 + Popover.prototype.getDefaults = function () {
40 + return Popover.DEFAULTS
41 + }
42 +
43 + Popover.prototype.setContent = function () {
44 + var $tip = this.tip()
45 + var title = this.getTitle()
46 + var content = this.getContent()
47 +
48 + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
49 + $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
50 + this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
51 + ](content)
52 +
53 + $tip.removeClass('fade top bottom left right in')
54 +
55 + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
56 + // this manually by checking the contents.
57 + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
58 + }
59 +
60 + Popover.prototype.hasContent = function () {
61 + return this.getTitle() || this.getContent()
62 + }
63 +
64 + Popover.prototype.getContent = function () {
65 + var $e = this.$element
66 + var o = this.options
67 +
68 + return $e.attr('data-content')
69 + || (typeof o.content == 'function' ?
70 + o.content.call($e[0]) :
71 + o.content)
72 + }
73 +
74 + Popover.prototype.arrow = function () {
75 + return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
76 + }
77 +
78 +
79 + // POPOVER PLUGIN DEFINITION
80 + // =========================
81 +
82 + function Plugin(option) {
83 + return this.each(function () {
84 + var $this = $(this)
85 + var data = $this.data('bs.popover')
86 + var options = typeof option == 'object' && option
87 +
88 + if (!data && /destroy|hide/.test(option)) return
89 + if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
90 + if (typeof option == 'string') data[option]()
91 + })
92 + }
93 +
94 + var old = $.fn.popover
95 +
96 + $.fn.popover = Plugin
97 + $.fn.popover.Constructor = Popover
98 +
99 +
100 + // POPOVER NO CONFLICT
101 + // ===================
102 +
103 + $.fn.popover.noConflict = function () {
104 + $.fn.popover = old
105 + return this
106 + }
107 +
108 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: scrollspy.js v3.3.5
3 + * http://getbootstrap.com/javascript/#scrollspy
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // SCROLLSPY CLASS DEFINITION
14 + // ==========================
15 +
16 + function ScrollSpy(element, options) {
17 + this.$body = $(document.body)
18 + this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
19 + this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
20 + this.selector = (this.options.target || '') + ' .nav li > a'
21 + this.offsets = []
22 + this.targets = []
23 + this.activeTarget = null
24 + this.scrollHeight = 0
25 +
26 + this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
27 + this.refresh()
28 + this.process()
29 + }
30 +
31 + ScrollSpy.VERSION = '3.3.5'
32 +
33 + ScrollSpy.DEFAULTS = {
34 + offset: 10
35 + }
36 +
37 + ScrollSpy.prototype.getScrollHeight = function () {
38 + return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
39 + }
40 +
41 + ScrollSpy.prototype.refresh = function () {
42 + var that = this
43 + var offsetMethod = 'offset'
44 + var offsetBase = 0
45 +
46 + this.offsets = []
47 + this.targets = []
48 + this.scrollHeight = this.getScrollHeight()
49 +
50 + if (!$.isWindow(this.$scrollElement[0])) {
51 + offsetMethod = 'position'
52 + offsetBase = this.$scrollElement.scrollTop()
53 + }
54 +
55 + this.$body
56 + .find(this.selector)
57 + .map(function () {
58 + var $el = $(this)
59 + var href = $el.data('target') || $el.attr('href')
60 + var $href = /^#./.test(href) && $(href)
61 +
62 + return ($href
63 + && $href.length
64 + && $href.is(':visible')
65 + && [[$href[offsetMethod]().top + offsetBase, href]]) || null
66 + })
67 + .sort(function (a, b) { return a[0] - b[0] })
68 + .each(function () {
69 + that.offsets.push(this[0])
70 + that.targets.push(this[1])
71 + })
72 + }
73 +
74 + ScrollSpy.prototype.process = function () {
75 + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
76 + var scrollHeight = this.getScrollHeight()
77 + var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
78 + var offsets = this.offsets
79 + var targets = this.targets
80 + var activeTarget = this.activeTarget
81 + var i
82 +
83 + if (this.scrollHeight != scrollHeight) {
84 + this.refresh()
85 + }
86 +
87 + if (scrollTop >= maxScroll) {
88 + return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
89 + }
90 +
91 + if (activeTarget && scrollTop < offsets[0]) {
92 + this.activeTarget = null
93 + return this.clear()
94 + }
95 +
96 + for (i = offsets.length; i--;) {
97 + activeTarget != targets[i]
98 + && scrollTop >= offsets[i]
99 + && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
100 + && this.activate(targets[i])
101 + }
102 + }
103 +
104 + ScrollSpy.prototype.activate = function (target) {
105 + this.activeTarget = target
106 +
107 + this.clear()
108 +
109 + var selector = this.selector +
110 + '[data-target="' + target + '"],' +
111 + this.selector + '[href="' + target + '"]'
112 +
113 + var active = $(selector)
114 + .parents('li')
115 + .addClass('active')
116 +
117 + if (active.parent('.dropdown-menu').length) {
118 + active = active
119 + .closest('li.dropdown')
120 + .addClass('active')
121 + }
122 +
123 + active.trigger('activate.bs.scrollspy')
124 + }
125 +
126 + ScrollSpy.prototype.clear = function () {
127 + $(this.selector)
128 + .parentsUntil(this.options.target, '.active')
129 + .removeClass('active')
130 + }
131 +
132 +
133 + // SCROLLSPY PLUGIN DEFINITION
134 + // ===========================
135 +
136 + function Plugin(option) {
137 + return this.each(function () {
138 + var $this = $(this)
139 + var data = $this.data('bs.scrollspy')
140 + var options = typeof option == 'object' && option
141 +
142 + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
143 + if (typeof option == 'string') data[option]()
144 + })
145 + }
146 +
147 + var old = $.fn.scrollspy
148 +
149 + $.fn.scrollspy = Plugin
150 + $.fn.scrollspy.Constructor = ScrollSpy
151 +
152 +
153 + // SCROLLSPY NO CONFLICT
154 + // =====================
155 +
156 + $.fn.scrollspy.noConflict = function () {
157 + $.fn.scrollspy = old
158 + return this
159 + }
160 +
161 +
162 + // SCROLLSPY DATA-API
163 + // ==================
164 +
165 + $(window).on('load.bs.scrollspy.data-api', function () {
166 + $('[data-spy="scroll"]').each(function () {
167 + var $spy = $(this)
168 + Plugin.call($spy, $spy.data())
169 + })
170 + })
171 +
172 +}(jQuery);
1 +/* ========================================================================
2 + * Bootstrap: tab.js v3.3.5
3 + * http://getbootstrap.com/javascript/#tabs
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // TAB CLASS DEFINITION
14 + // ====================
15 +
16 + var Tab = function (element) {
17 + // jscs:disable requireDollarBeforejQueryAssignment
18 + this.element = $(element)
19 + // jscs:enable requireDollarBeforejQueryAssignment
20 + }
21 +
22 + Tab.VERSION = '3.3.5'
23 +
24 + Tab.TRANSITION_DURATION = 150
25 +
26 + Tab.prototype.show = function () {
27 + var $this = this.element
28 + var $ul = $this.closest('ul:not(.dropdown-menu)')
29 + var selector = $this.data('target')
30 +
31 + if (!selector) {
32 + selector = $this.attr('href')
33 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
34 + }
35 +
36 + if ($this.parent('li').hasClass('active')) return
37 +
38 + var $previous = $ul.find('.active:last a')
39 + var hideEvent = $.Event('hide.bs.tab', {
40 + relatedTarget: $this[0]
41 + })
42 + var showEvent = $.Event('show.bs.tab', {
43 + relatedTarget: $previous[0]
44 + })
45 +
46 + $previous.trigger(hideEvent)
47 + $this.trigger(showEvent)
48 +
49 + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
50 +
51 + var $target = $(selector)
52 +
53 + this.activate($this.closest('li'), $ul)
54 + this.activate($target, $target.parent(), function () {
55 + $previous.trigger({
56 + type: 'hidden.bs.tab',
57 + relatedTarget: $this[0]
58 + })
59 + $this.trigger({
60 + type: 'shown.bs.tab',
61 + relatedTarget: $previous[0]
62 + })
63 + })
64 + }
65 +
66 + Tab.prototype.activate = function (element, container, callback) {
67 + var $active = container.find('> .active')
68 + var transition = callback
69 + && $.support.transition
70 + && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
71 +
72 + function next() {
73 + $active
74 + .removeClass('active')
75 + .find('> .dropdown-menu > .active')
76 + .removeClass('active')
77 + .end()
78 + .find('[data-toggle="tab"]')
79 + .attr('aria-expanded', false)
80 +
81 + element
82 + .addClass('active')
83 + .find('[data-toggle="tab"]')
84 + .attr('aria-expanded', true)
85 +
86 + if (transition) {
87 + element[0].offsetWidth // reflow for transition
88 + element.addClass('in')
89 + } else {
90 + element.removeClass('fade')
91 + }
92 +
93 + if (element.parent('.dropdown-menu').length) {
94 + element
95 + .closest('li.dropdown')
96 + .addClass('active')
97 + .end()
98 + .find('[data-toggle="tab"]')
99 + .attr('aria-expanded', true)
100 + }
101 +
102 + callback && callback()
103 + }
104 +
105 + $active.length && transition ?
106 + $active
107 + .one('bsTransitionEnd', next)
108 + .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
109 + next()
110 +
111 + $active.removeClass('in')
112 + }
113 +
114 +
115 + // TAB PLUGIN DEFINITION
116 + // =====================
117 +
118 + function Plugin(option) {
119 + return this.each(function () {
120 + var $this = $(this)
121 + var data = $this.data('bs.tab')
122 +
123 + if (!data) $this.data('bs.tab', (data = new Tab(this)))
124 + if (typeof option == 'string') data[option]()
125 + })
126 + }
127 +
128 + var old = $.fn.tab
129 +
130 + $.fn.tab = Plugin
131 + $.fn.tab.Constructor = Tab
132 +
133 +
134 + // TAB NO CONFLICT
135 + // ===============
136 +
137 + $.fn.tab.noConflict = function () {
138 + $.fn.tab = old
139 + return this
140 + }
141 +
142 +
143 + // TAB DATA-API
144 + // ============
145 +
146 + var clickHandler = function (e) {
147 + e.preventDefault()
148 + Plugin.call($(this), 'show')
149 + }
150 +
151 + $(document)
152 + .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
153 + .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
154 +
155 +}(jQuery);
This diff is collapsed. Click to expand it.
1 +/* ========================================================================
2 + * Bootstrap: transition.js v3.3.5
3 + * http://getbootstrap.com/javascript/#transitions
4 + * ========================================================================
5 + * Copyright 2011-2015 Twitter, Inc.
6 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 + * ======================================================================== */
8 +
9 +
10 ++function ($) {
11 + 'use strict';
12 +
13 + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
14 + // ============================================================
15 +
16 + function transitionEnd() {
17 + var el = document.createElement('bootstrap')
18 +
19 + var transEndEventNames = {
20 + WebkitTransition : 'webkitTransitionEnd',
21 + MozTransition : 'transitionend',
22 + OTransition : 'oTransitionEnd otransitionend',
23 + transition : 'transitionend'
24 + }
25 +
26 + for (var name in transEndEventNames) {
27 + if (el.style[name] !== undefined) {
28 + return { end: transEndEventNames[name] }
29 + }
30 + }
31 +
32 + return false // explicit for ie8 ( ._.)
33 + }
34 +
35 + // http://blog.alexmaccaw.com/css-transitions
36 + $.fn.emulateTransitionEnd = function (duration) {
37 + var called = false
38 + var $el = this
39 + $(this).one('bsTransitionEnd', function () { called = true })
40 + var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
41 + setTimeout(callback, duration)
42 + return this
43 + }
44 +
45 + $(function () {
46 + $.support.transition = transitionEnd()
47 +
48 + if (!$.support.transition) return
49 +
50 + $.event.special.bsTransitionEnd = {
51 + bindType: $.support.transition.end,
52 + delegateType: $.support.transition.end,
53 + handle: function (e) {
54 + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
55 + }
56 + }
57 + })
58 +
59 +}(jQuery);
1 +{
2 + "always-semicolon": true,
3 + "block-indent": 2,
4 + "color-case": "lower",
5 + "color-shorthand": true,
6 + "element-case": "lower",
7 + "eof-newline": true,
8 + "leading-zero": false,
9 + "remove-empty-rulesets": true,
10 + "space-after-colon": 1,
11 + "space-after-combinator": 1,
12 + "space-before-selector-delimiter": 0,
13 + "space-between-declarations": "\n",
14 + "space-after-opening-brace": "\n",
15 + "space-before-closing-brace": "\n",
16 + "space-before-colon": 0,
17 + "space-before-combinator": 1,
18 + "space-before-opening-brace": 1,
19 + "strip-spaces": true,
20 + "unitless-zero": true,
21 + "vendor-prefix-align": true,
22 + "sort-order": [
23 + [
24 + "position",
25 + "top",
26 + "right",
27 + "bottom",
28 + "left",
29 + "z-index",
30 + "display",
31 + "float",
32 + "width",
33 + "min-width",
34 + "max-width",
35 + "height",
36 + "min-height",
37 + "max-height",
38 + "-webkit-box-sizing",
39 + "-moz-box-sizing",
40 + "box-sizing",
41 + "-webkit-appearance",
42 + "padding",
43 + "padding-top",
44 + "padding-right",
45 + "padding-bottom",
46 + "padding-left",
47 + "margin",
48 + "margin-top",
49 + "margin-right",
50 + "margin-bottom",
51 + "margin-left",
52 + "overflow",
53 + "overflow-x",
54 + "overflow-y",
55 + "-webkit-overflow-scrolling",
56 + "-ms-overflow-x",
57 + "-ms-overflow-y",
58 + "-ms-overflow-style",
59 + "clip",
60 + "clear",
61 + "font",
62 + "font-family",
63 + "font-size",
64 + "font-style",
65 + "font-weight",
66 + "font-variant",
67 + "font-size-adjust",
68 + "font-stretch",
69 + "font-effect",
70 + "font-emphasize",
71 + "font-emphasize-position",
72 + "font-emphasize-style",
73 + "font-smooth",
74 + "-webkit-hyphens",
75 + "-moz-hyphens",
76 + "hyphens",
77 + "line-height",
78 + "color",
79 + "text-align",
80 + "-webkit-text-align-last",
81 + "-moz-text-align-last",
82 + "-ms-text-align-last",
83 + "text-align-last",
84 + "text-emphasis",
85 + "text-emphasis-color",
86 + "text-emphasis-style",
87 + "text-emphasis-position",
88 + "text-decoration",
89 + "text-indent",
90 + "text-justify",
91 + "text-outline",
92 + "-ms-text-overflow",
93 + "text-overflow",
94 + "text-overflow-ellipsis",
95 + "text-overflow-mode",
96 + "text-shadow",
97 + "text-transform",
98 + "text-wrap",
99 + "-webkit-text-size-adjust",
100 + "-ms-text-size-adjust",
101 + "letter-spacing",
102 + "-ms-word-break",
103 + "word-break",
104 + "word-spacing",
105 + "-ms-word-wrap",
106 + "word-wrap",
107 + "-moz-tab-size",
108 + "-o-tab-size",
109 + "tab-size",
110 + "white-space",
111 + "vertical-align",
112 + "list-style",
113 + "list-style-position",
114 + "list-style-type",
115 + "list-style-image",
116 + "pointer-events",
117 + "-ms-touch-action",
118 + "touch-action",
119 + "cursor",
120 + "visibility",
121 + "zoom",
122 + "flex-direction",
123 + "flex-order",
124 + "flex-pack",
125 + "flex-align",
126 + "table-layout",
127 + "empty-cells",
128 + "caption-side",
129 + "border-spacing",
130 + "border-collapse",
131 + "content",
132 + "quotes",
133 + "counter-reset",
134 + "counter-increment",
135 + "resize",
136 + "-webkit-user-select",
137 + "-moz-user-select",
138 + "-ms-user-select",
139 + "-o-user-select",
140 + "user-select",
141 + "nav-index",
142 + "nav-up",
143 + "nav-right",
144 + "nav-down",
145 + "nav-left",
146 + "background",
147 + "background-color",
148 + "background-image",
149 + "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
150 + "filter:progid:DXImageTransform.Microsoft.gradient",
151 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
152 + "filter",
153 + "background-repeat",
154 + "background-attachment",
155 + "background-position",
156 + "background-position-x",
157 + "background-position-y",
158 + "-webkit-background-clip",
159 + "-moz-background-clip",
160 + "background-clip",
161 + "background-origin",
162 + "-webkit-background-size",
163 + "-moz-background-size",
164 + "-o-background-size",
165 + "background-size",
166 + "border",
167 + "border-color",
168 + "border-style",
169 + "border-width",
170 + "border-top",
171 + "border-top-color",
172 + "border-top-style",
173 + "border-top-width",
174 + "border-right",
175 + "border-right-color",
176 + "border-right-style",
177 + "border-right-width",
178 + "border-bottom",
179 + "border-bottom-color",
180 + "border-bottom-style",
181 + "border-bottom-width",
182 + "border-left",
183 + "border-left-color",
184 + "border-left-style",
185 + "border-left-width",
186 + "border-radius",
187 + "border-top-left-radius",
188 + "border-top-right-radius",
189 + "border-bottom-right-radius",
190 + "border-bottom-left-radius",
191 + "-webkit-border-image",
192 + "-moz-border-image",
193 + "-o-border-image",
194 + "border-image",
195 + "-webkit-border-image-source",
196 + "-moz-border-image-source",
197 + "-o-border-image-source",
198 + "border-image-source",
199 + "-webkit-border-image-slice",
200 + "-moz-border-image-slice",
201 + "-o-border-image-slice",
202 + "border-image-slice",
203 + "-webkit-border-image-width",
204 + "-moz-border-image-width",
205 + "-o-border-image-width",
206 + "border-image-width",
207 + "-webkit-border-image-outset",
208 + "-moz-border-image-outset",
209 + "-o-border-image-outset",
210 + "border-image-outset",
211 + "-webkit-border-image-repeat",
212 + "-moz-border-image-repeat",
213 + "-o-border-image-repeat",
214 + "border-image-repeat",
215 + "outline",
216 + "outline-width",
217 + "outline-style",
218 + "outline-color",
219 + "outline-offset",
220 + "-webkit-box-shadow",
221 + "-moz-box-shadow",
222 + "box-shadow",
223 + "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
224 + "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
225 + "opacity",
226 + "-ms-interpolation-mode",
227 + "-webkit-transition",
228 + "-moz-transition",
229 + "-ms-transition",
230 + "-o-transition",
231 + "transition",
232 + "-webkit-transition-delay",
233 + "-moz-transition-delay",
234 + "-ms-transition-delay",
235 + "-o-transition-delay",
236 + "transition-delay",
237 + "-webkit-transition-timing-function",
238 + "-moz-transition-timing-function",
239 + "-ms-transition-timing-function",
240 + "-o-transition-timing-function",
241 + "transition-timing-function",
242 + "-webkit-transition-duration",
243 + "-moz-transition-duration",
244 + "-ms-transition-duration",
245 + "-o-transition-duration",
246 + "transition-duration",
247 + "-webkit-transition-property",
248 + "-moz-transition-property",
249 + "-ms-transition-property",
250 + "-o-transition-property",
251 + "transition-property",
252 + "-webkit-transform",
253 + "-moz-transform",
254 + "-ms-transform",
255 + "-o-transform",
256 + "transform",
257 + "-webkit-transform-origin",
258 + "-moz-transform-origin",
259 + "-ms-transform-origin",
260 + "-o-transform-origin",
261 + "transform-origin",
262 + "-webkit-animation",
263 + "-moz-animation",
264 + "-ms-animation",
265 + "-o-animation",
266 + "animation",
267 + "-webkit-animation-name",
268 + "-moz-animation-name",
269 + "-ms-animation-name",
270 + "-o-animation-name",
271 + "animation-name",
272 + "-webkit-animation-duration",
273 + "-moz-animation-duration",
274 + "-ms-animation-duration",
275 + "-o-animation-duration",
276 + "animation-duration",
277 + "-webkit-animation-play-state",
278 + "-moz-animation-play-state",
279 + "-ms-animation-play-state",
280 + "-o-animation-play-state",
281 + "animation-play-state",
282 + "-webkit-animation-timing-function",
283 + "-moz-animation-timing-function",
284 + "-ms-animation-timing-function",
285 + "-o-animation-timing-function",
286 + "animation-timing-function",
287 + "-webkit-animation-delay",
288 + "-moz-animation-delay",
289 + "-ms-animation-delay",
290 + "-o-animation-delay",
291 + "animation-delay",
292 + "-webkit-animation-iteration-count",
293 + "-moz-animation-iteration-count",
294 + "-ms-animation-iteration-count",
295 + "-o-animation-iteration-count",
296 + "animation-iteration-count",
297 + "-webkit-animation-direction",
298 + "-moz-animation-direction",
299 + "-ms-animation-direction",
300 + "-o-animation-direction",
301 + "animation-direction"
302 + ]
303 + ]
304 +}
1 +{
2 + "adjoining-classes": false,
3 + "box-sizing": false,
4 + "box-model": false,
5 + "compatible-vendor-prefixes": false,
6 + "floats": false,
7 + "font-sizes": false,
8 + "gradients": false,
9 + "important": false,
10 + "known-properties": false,
11 + "outline-none": false,
12 + "qualified-headings": false,
13 + "regex-selectors": false,
14 + "shorthand": false,
15 + "text-indent": false,
16 + "unique-headings": false,
17 + "universal-selector": false,
18 + "unqualified-attributes": false
19 +}
1 +//
2 +// Alerts
3 +// --------------------------------------------------
4 +
5 +
6 +// Base styles
7 +// -------------------------
8 +
9 +.alert {
10 + padding: @alert-padding;
11 + margin-bottom: @line-height-computed;
12 + border: 1px solid transparent;
13 + border-radius: @alert-border-radius;
14 +
15 + // Headings for larger alerts
16 + h4 {
17 + margin-top: 0;
18 + // Specified for the h4 to prevent conflicts of changing @headings-color
19 + color: inherit;
20 + }
21 +
22 + // Provide class for links that match alerts
23 + .alert-link {
24 + font-weight: @alert-link-font-weight;
25 + }
26 +
27 + // Improve alignment and spacing of inner content
28 + > p,
29 + > ul {
30 + margin-bottom: 0;
31 + }
32 +
33 + > p + p {
34 + margin-top: 5px;
35 + }
36 +}
37 +
38 +// Dismissible alerts
39 +//
40 +// Expand the right padding and account for the close button's positioning.
41 +
42 +.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
43 +.alert-dismissible {
44 + padding-right: (@alert-padding + 20);
45 +
46 + // Adjust close link position
47 + .close {
48 + position: relative;
49 + top: -2px;
50 + right: -21px;
51 + color: inherit;
52 + }
53 +}
54 +
55 +// Alternate styles
56 +//
57 +// Generate contextual modifier classes for colorizing the alert.
58 +
59 +.alert-success {
60 + .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
61 +}
62 +
63 +.alert-info {
64 + .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
65 +}
66 +
67 +.alert-warning {
68 + .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
69 +}
70 +
71 +.alert-danger {
72 + .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
73 +}
1 +//
2 +// Badges
3 +// --------------------------------------------------
4 +
5 +
6 +// Base class
7 +.badge {
8 + display: inline-block;
9 + min-width: 10px;
10 + padding: 3px 7px;
11 + font-size: @font-size-small;
12 + font-weight: @badge-font-weight;
13 + color: @badge-color;
14 + line-height: @badge-line-height;
15 + vertical-align: middle;
16 + white-space: nowrap;
17 + text-align: center;
18 + background-color: @badge-bg;
19 + border-radius: @badge-border-radius;
20 +
21 + // Empty badges collapse automatically (not available in IE8)
22 + &:empty {
23 + display: none;
24 + }
25 +
26 + // Quick fix for badges in buttons
27 + .btn & {
28 + position: relative;
29 + top: -1px;
30 + }
31 +
32 + .btn-xs &,
33 + .btn-group-xs > .btn & {
34 + top: 0;
35 + padding: 1px 5px;
36 + }
37 +
38 + // Hover state, but only for links
39 + a& {
40 + &:hover,
41 + &:focus {
42 + color: @badge-link-hover-color;
43 + text-decoration: none;
44 + cursor: pointer;
45 + }
46 + }
47 +
48 + // Account for badges in navs
49 + .list-group-item.active > &,
50 + .nav-pills > .active > a > & {
51 + color: @badge-active-color;
52 + background-color: @badge-active-bg;
53 + }
54 +
55 + .list-group-item > & {
56 + float: right;
57 + }
58 +
59 + .list-group-item > & + & {
60 + margin-right: 5px;
61 + }
62 +
63 + .nav-pills > li > a > & {
64 + margin-left: 3px;
65 + }
66 +}
1 +/*!
2 + * Bootstrap v3.3.5 (http://getbootstrap.com)
3 + * Copyright 2011-2015 Twitter, Inc.
4 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 + */
6 +
7 +// Core variables and mixins
8 +@import "variables.less";
9 +@import "mixins.less";
10 +
11 +// Reset and dependencies
12 +@import "normalize.less";
13 +@import "print.less";
14 +@import "glyphicons.less";
15 +
16 +// Core CSS
17 +@import "scaffolding.less";
18 +@import "type.less";
19 +@import "code.less";
20 +@import "grid.less";
21 +@import "tables.less";
22 +@import "forms.less";
23 +@import "buttons.less";
24 +
25 +// Components
26 +@import "component-animations.less";
27 +@import "dropdowns.less";
28 +@import "button-groups.less";
29 +@import "input-groups.less";
30 +@import "navs.less";
31 +@import "navbar.less";
32 +@import "breadcrumbs.less";
33 +@import "pagination.less";
34 +@import "pager.less";
35 +@import "labels.less";
36 +@import "badges.less";
37 +@import "jumbotron.less";
38 +@import "thumbnails.less";
39 +@import "alerts.less";
40 +@import "progress-bars.less";
41 +@import "media.less";
42 +@import "list-group.less";
43 +@import "panels.less";
44 +@import "responsive-embed.less";
45 +@import "wells.less";
46 +@import "close.less";
47 +
48 +// Components w/ JavaScript
49 +@import "modals.less";
50 +@import "tooltip.less";
51 +@import "popovers.less";
52 +@import "carousel.less";
53 +
54 +// Utility classes
55 +@import "utilities.less";
56 +@import "responsive-utilities.less";
1 +//
2 +// Breadcrumbs
3 +// --------------------------------------------------
4 +
5 +
6 +.breadcrumb {
7 + padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8 + margin-bottom: @line-height-computed;
9 + list-style: none;
10 + background-color: @breadcrumb-bg;
11 + border-radius: @border-radius-base;
12 +
13 + > li {
14 + display: inline-block;
15 +
16 + + li:before {
17 + content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
18 + padding: 0 5px;
19 + color: @breadcrumb-color;
20 + }
21 + }
22 +
23 + > .active {
24 + color: @breadcrumb-active-color;
25 + }
26 +}
1 +//
2 +// Button groups
3 +// --------------------------------------------------
4 +
5 +// Make the div behave like a button
6 +.btn-group,
7 +.btn-group-vertical {
8 + position: relative;
9 + display: inline-block;
10 + vertical-align: middle; // match .btn alignment given font-size hack above
11 + > .btn {
12 + position: relative;
13 + float: left;
14 + // Bring the "active" button to the front
15 + &:hover,
16 + &:focus,
17 + &:active,
18 + &.active {
19 + z-index: 2;
20 + }
21 + }
22 +}
23 +
24 +// Prevent double borders when buttons are next to each other
25 +.btn-group {
26 + .btn + .btn,
27 + .btn + .btn-group,
28 + .btn-group + .btn,
29 + .btn-group + .btn-group {
30 + margin-left: -1px;
31 + }
32 +}
33 +
34 +// Optional: Group multiple button groups together for a toolbar
35 +.btn-toolbar {
36 + margin-left: -5px; // Offset the first child's margin
37 + &:extend(.clearfix all);
38 +
39 + .btn,
40 + .btn-group,
41 + .input-group {
42 + float: left;
43 + }
44 + > .btn,
45 + > .btn-group,
46 + > .input-group {
47 + margin-left: 5px;
48 + }
49 +}
50 +
51 +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
52 + border-radius: 0;
53 +}
54 +
55 +// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
56 +.btn-group > .btn:first-child {
57 + margin-left: 0;
58 + &:not(:last-child):not(.dropdown-toggle) {
59 + .border-right-radius(0);
60 + }
61 +}
62 +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
63 +.btn-group > .btn:last-child:not(:first-child),
64 +.btn-group > .dropdown-toggle:not(:first-child) {
65 + .border-left-radius(0);
66 +}
67 +
68 +// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
69 +.btn-group > .btn-group {
70 + float: left;
71 +}
72 +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
73 + border-radius: 0;
74 +}
75 +.btn-group > .btn-group:first-child:not(:last-child) {
76 + > .btn:last-child,
77 + > .dropdown-toggle {
78 + .border-right-radius(0);
79 + }
80 +}
81 +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
82 + .border-left-radius(0);
83 +}
84 +
85 +// On active and open, don't show outline
86 +.btn-group .dropdown-toggle:active,
87 +.btn-group.open .dropdown-toggle {
88 + outline: 0;
89 +}
90 +
91 +
92 +// Sizing
93 +//
94 +// Remix the default button sizing classes into new ones for easier manipulation.
95 +
96 +.btn-group-xs > .btn { &:extend(.btn-xs); }
97 +.btn-group-sm > .btn { &:extend(.btn-sm); }
98 +.btn-group-lg > .btn { &:extend(.btn-lg); }
99 +
100 +
101 +// Split button dropdowns
102 +// ----------------------
103 +
104 +// Give the line between buttons some depth
105 +.btn-group > .btn + .dropdown-toggle {
106 + padding-left: 8px;
107 + padding-right: 8px;
108 +}
109 +.btn-group > .btn-lg + .dropdown-toggle {
110 + padding-left: 12px;
111 + padding-right: 12px;
112 +}
113 +
114 +// The clickable button for toggling the menu
115 +// Remove the gradient and set the same inset shadow as the :active state
116 +.btn-group.open .dropdown-toggle {
117 + .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
118 +
119 + // Show no shadow for `.btn-link` since it has no other button styles.
120 + &.btn-link {
121 + .box-shadow(none);
122 + }
123 +}
124 +
125 +
126 +// Reposition the caret
127 +.btn .caret {
128 + margin-left: 0;
129 +}
130 +// Carets in other button sizes
131 +.btn-lg .caret {
132 + border-width: @caret-width-large @caret-width-large 0;
133 + border-bottom-width: 0;
134 +}
135 +// Upside down carets for .dropup
136 +.dropup .btn-lg .caret {
137 + border-width: 0 @caret-width-large @caret-width-large;
138 +}
139 +
140 +
141 +// Vertical button groups
142 +// ----------------------
143 +
144 +.btn-group-vertical {
145 + > .btn,
146 + > .btn-group,
147 + > .btn-group > .btn {
148 + display: block;
149 + float: none;
150 + width: 100%;
151 + max-width: 100%;
152 + }
153 +
154 + // Clear floats so dropdown menus can be properly placed
155 + > .btn-group {
156 + &:extend(.clearfix all);
157 + > .btn {
158 + float: none;
159 + }
160 + }
161 +
162 + > .btn + .btn,
163 + > .btn + .btn-group,
164 + > .btn-group + .btn,
165 + > .btn-group + .btn-group {
166 + margin-top: -1px;
167 + margin-left: 0;
168 + }
169 +}
170 +
171 +.btn-group-vertical > .btn {
172 + &:not(:first-child):not(:last-child) {
173 + border-radius: 0;
174 + }
175 + &:first-child:not(:last-child) {
176 + border-top-right-radius: @btn-border-radius-base;
177 + .border-bottom-radius(0);
178 + }
179 + &:last-child:not(:first-child) {
180 + border-bottom-left-radius: @btn-border-radius-base;
181 + .border-top-radius(0);
182 + }
183 +}
184 +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
185 + border-radius: 0;
186 +}
187 +.btn-group-vertical > .btn-group:first-child:not(:last-child) {
188 + > .btn:last-child,
189 + > .dropdown-toggle {
190 + .border-bottom-radius(0);
191 + }
192 +}
193 +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
194 + .border-top-radius(0);
195 +}
196 +
197 +
198 +// Justified button groups
199 +// ----------------------
200 +
201 +.btn-group-justified {
202 + display: table;
203 + width: 100%;
204 + table-layout: fixed;
205 + border-collapse: separate;
206 + > .btn,
207 + > .btn-group {
208 + float: none;
209 + display: table-cell;
210 + width: 1%;
211 + }
212 + > .btn-group .btn {
213 + width: 100%;
214 + }
215 +
216 + > .btn-group .dropdown-menu {
217 + left: auto;
218 + }
219 +}
220 +
221 +
222 +// Checkbox and radio options
223 +//
224 +// In order to support the browser's form validation feedback, powered by the
225 +// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
226 +// `display: none;` or `visibility: hidden;` as that also hides the popover.
227 +// Simply visually hiding the inputs via `opacity` would leave them clickable in
228 +// certain cases which is prevented by using `clip` and `pointer-events`.
229 +// This way, we ensure a DOM element is visible to position the popover from.
230 +//
231 +// See https://github.com/twbs/bootstrap/pull/12794 and
232 +// https://github.com/twbs/bootstrap/pull/14559 for more information.
233 +
234 +[data-toggle="buttons"] {
235 + > .btn,
236 + > .btn-group > .btn {
237 + input[type="radio"],
238 + input[type="checkbox"] {
239 + position: absolute;
240 + clip: rect(0,0,0,0);
241 + pointer-events: none;
242 + }
243 + }
244 +}
1 +//
2 +// Buttons
3 +// --------------------------------------------------
4 +
5 +
6 +// Base styles
7 +// --------------------------------------------------
8 +
9 +.btn {
10 + display: inline-block;
11 + margin-bottom: 0; // For input.btn
12 + font-weight: @btn-font-weight;
13 + text-align: center;
14 + vertical-align: middle;
15 + touch-action: manipulation;
16 + cursor: pointer;
17 + background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
18 + border: 1px solid transparent;
19 + white-space: nowrap;
20 + .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);
21 + .user-select(none);
22 +
23 + &,
24 + &:active,
25 + &.active {
26 + &:focus,
27 + &.focus {
28 + .tab-focus();
29 + }
30 + }
31 +
32 + &:hover,
33 + &:focus,
34 + &.focus {
35 + color: @btn-default-color;
36 + text-decoration: none;
37 + }
38 +
39 + &:active,
40 + &.active {
41 + outline: 0;
42 + background-image: none;
43 + .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
44 + }
45 +
46 + &.disabled,
47 + &[disabled],
48 + fieldset[disabled] & {
49 + cursor: @cursor-disabled;
50 + .opacity(.65);
51 + .box-shadow(none);
52 + }
53 +
54 + a& {
55 + &.disabled,
56 + fieldset[disabled] & {
57 + pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
58 + }
59 + }
60 +}
61 +
62 +
63 +// Alternate buttons
64 +// --------------------------------------------------
65 +
66 +.btn-default {
67 + .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
68 +}
69 +.btn-primary {
70 + .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
71 +}
72 +// Success appears as green
73 +.btn-success {
74 + .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
75 +}
76 +// Info appears as blue-green
77 +.btn-info {
78 + .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
79 +}
80 +// Warning appears as orange
81 +.btn-warning {
82 + .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
83 +}
84 +// Danger and error appear as red
85 +.btn-danger {
86 + .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
87 +}
88 +
89 +
90 +// Link buttons
91 +// -------------------------
92 +
93 +// Make a button look and behave like a link
94 +.btn-link {
95 + color: @link-color;
96 + font-weight: normal;
97 + border-radius: 0;
98 +
99 + &,
100 + &:active,
101 + &.active,
102 + &[disabled],
103 + fieldset[disabled] & {
104 + background-color: transparent;
105 + .box-shadow(none);
106 + }
107 + &,
108 + &:hover,
109 + &:focus,
110 + &:active {
111 + border-color: transparent;
112 + }
113 + &:hover,
114 + &:focus {
115 + color: @link-hover-color;
116 + text-decoration: @link-hover-decoration;
117 + background-color: transparent;
118 + }
119 + &[disabled],
120 + fieldset[disabled] & {
121 + &:hover,
122 + &:focus {
123 + color: @btn-link-disabled-color;
124 + text-decoration: none;
125 + }
126 + }
127 +}
128 +
129 +
130 +// Button Sizes
131 +// --------------------------------------------------
132 +
133 +.btn-lg {
134 + // line-height: ensure even-numbered height of button next to large input
135 + .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);
136 +}
137 +.btn-sm {
138 + // line-height: ensure proper height of button next to small input
139 + .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
140 +}
141 +.btn-xs {
142 + .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
143 +}
144 +
145 +
146 +// Block button
147 +// --------------------------------------------------
148 +
149 +.btn-block {
150 + display: block;
151 + width: 100%;
152 +}
153 +
154 +// Vertically space out multiple block buttons
155 +.btn-block + .btn-block {
156 + margin-top: 5px;
157 +}
158 +
159 +// Specificity overrides
160 +input[type="submit"],
161 +input[type="reset"],
162 +input[type="button"] {
163 + &.btn-block {
164 + width: 100%;
165 + }
166 +}
1 +//
2 +// Carousel
3 +// --------------------------------------------------
4 +
5 +
6 +// Wrapper for the slide container and indicators
7 +.carousel {
8 + position: relative;
9 +}
10 +
11 +.carousel-inner {
12 + position: relative;
13 + overflow: hidden;
14 + width: 100%;
15 +
16 + > .item {
17 + display: none;
18 + position: relative;
19 + .transition(.6s ease-in-out left);
20 +
21 + // Account for jankitude on images
22 + > img,
23 + > a > img {
24 + &:extend(.img-responsive);
25 + line-height: 1;
26 + }
27 +
28 + // WebKit CSS3 transforms for supported devices
29 + @media all and (transform-3d), (-webkit-transform-3d) {
30 + .transition-transform(~'0.6s ease-in-out');
31 + .backface-visibility(~'hidden');
32 + .perspective(1000px);
33 +
34 + &.next,
35 + &.active.right {
36 + .translate3d(100%, 0, 0);
37 + left: 0;
38 + }
39 + &.prev,
40 + &.active.left {
41 + .translate3d(-100%, 0, 0);
42 + left: 0;
43 + }
44 + &.next.left,
45 + &.prev.right,
46 + &.active {
47 + .translate3d(0, 0, 0);
48 + left: 0;
49 + }
50 + }
51 + }
52 +
53 + > .active,
54 + > .next,
55 + > .prev {
56 + display: block;
57 + }
58 +
59 + > .active {
60 + left: 0;
61 + }
62 +
63 + > .next,
64 + > .prev {
65 + position: absolute;
66 + top: 0;
67 + width: 100%;
68 + }
69 +
70 + > .next {
71 + left: 100%;
72 + }
73 + > .prev {
74 + left: -100%;
75 + }
76 + > .next.left,
77 + > .prev.right {
78 + left: 0;
79 + }
80 +
81 + > .active.left {
82 + left: -100%;
83 + }
84 + > .active.right {
85 + left: 100%;
86 + }
87 +
88 +}
89 +
90 +// Left/right controls for nav
91 +// ---------------------------
92 +
93 +.carousel-control {
94 + position: absolute;
95 + top: 0;
96 + left: 0;
97 + bottom: 0;
98 + width: @carousel-control-width;
99 + .opacity(@carousel-control-opacity);
100 + font-size: @carousel-control-font-size;
101 + color: @carousel-control-color;
102 + text-align: center;
103 + text-shadow: @carousel-text-shadow;
104 + // We can't have this transition here because WebKit cancels the carousel
105 + // animation if you trip this while in the middle of another animation.
106 +
107 + // Set gradients for backgrounds
108 + &.left {
109 + #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
110 + }
111 + &.right {
112 + left: auto;
113 + right: 0;
114 + #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
115 + }
116 +
117 + // Hover/focus state
118 + &:hover,
119 + &:focus {
120 + outline: 0;
121 + color: @carousel-control-color;
122 + text-decoration: none;
123 + .opacity(.9);
124 + }
125 +
126 + // Toggles
127 + .icon-prev,
128 + .icon-next,
129 + .glyphicon-chevron-left,
130 + .glyphicon-chevron-right {
131 + position: absolute;
132 + top: 50%;
133 + margin-top: -10px;
134 + z-index: 5;
135 + display: inline-block;
136 + }
137 + .icon-prev,
138 + .glyphicon-chevron-left {
139 + left: 50%;
140 + margin-left: -10px;
141 + }
142 + .icon-next,
143 + .glyphicon-chevron-right {
144 + right: 50%;
145 + margin-right: -10px;
146 + }
147 + .icon-prev,
148 + .icon-next {
149 + width: 20px;
150 + height: 20px;
151 + line-height: 1;
152 + font-family: serif;
153 + }
154 +
155 +
156 + .icon-prev {
157 + &:before {
158 + content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
159 + }
160 + }
161 + .icon-next {
162 + &:before {
163 + content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
164 + }
165 + }
166 +}
167 +
168 +// Optional indicator pips
169 +//
170 +// Add an unordered list with the following class and add a list item for each
171 +// slide your carousel holds.
172 +
173 +.carousel-indicators {
174 + position: absolute;
175 + bottom: 10px;
176 + left: 50%;
177 + z-index: 15;
178 + width: 60%;
179 + margin-left: -30%;
180 + padding-left: 0;
181 + list-style: none;
182 + text-align: center;
183 +
184 + li {
185 + display: inline-block;
186 + width: 10px;
187 + height: 10px;
188 + margin: 1px;
189 + text-indent: -999px;
190 + border: 1px solid @carousel-indicator-border-color;
191 + border-radius: 10px;
192 + cursor: pointer;
193 +
194 + // IE8-9 hack for event handling
195 + //
196 + // Internet Explorer 8-9 does not support clicks on elements without a set
197 + // `background-color`. We cannot use `filter` since that's not viewed as a
198 + // background color by the browser. Thus, a hack is needed.
199 + // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
200 + //
201 + // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
202 + // set alpha transparency for the best results possible.
203 + background-color: #000 \9; // IE8
204 + background-color: rgba(0,0,0,0); // IE9
205 + }
206 + .active {
207 + margin: 0;
208 + width: 12px;
209 + height: 12px;
210 + background-color: @carousel-indicator-active-bg;
211 + }
212 +}
213 +
214 +// Optional captions
215 +// -----------------------------
216 +// Hidden by default for smaller viewports
217 +.carousel-caption {
218 + position: absolute;
219 + left: 15%;
220 + right: 15%;
221 + bottom: 20px;
222 + z-index: 10;
223 + padding-top: 20px;
224 + padding-bottom: 20px;
225 + color: @carousel-caption-color;
226 + text-align: center;
227 + text-shadow: @carousel-text-shadow;
228 + & .btn {
229 + text-shadow: none; // No shadow for button elements in carousel-caption
230 + }
231 +}
232 +
233 +
234 +// Scale up controls for tablets and up
235 +@media screen and (min-width: @screen-sm-min) {
236 +
237 + // Scale up the controls a smidge
238 + .carousel-control {
239 + .glyphicon-chevron-left,
240 + .glyphicon-chevron-right,
241 + .icon-prev,
242 + .icon-next {
243 + width: 30px;
244 + height: 30px;
245 + margin-top: -15px;
246 + font-size: 30px;
247 + }
248 + .glyphicon-chevron-left,
249 + .icon-prev {
250 + margin-left: -15px;
251 + }
252 + .glyphicon-chevron-right,
253 + .icon-next {
254 + margin-right: -15px;
255 + }
256 + }
257 +
258 + // Show and left align the captions
259 + .carousel-caption {
260 + left: 20%;
261 + right: 20%;
262 + padding-bottom: 30px;
263 + }
264 +
265 + // Move up the indicators
266 + .carousel-indicators {
267 + bottom: 20px;
268 + }
269 +}
1 +//
2 +// Close icons
3 +// --------------------------------------------------
4 +
5 +
6 +.close {
7 + float: right;
8 + font-size: (@font-size-base * 1.5);
9 + font-weight: @close-font-weight;
10 + line-height: 1;
11 + color: @close-color;
12 + text-shadow: @close-text-shadow;
13 + .opacity(.2);
14 +
15 + &:hover,
16 + &:focus {
17 + color: @close-color;
18 + text-decoration: none;
19 + cursor: pointer;
20 + .opacity(.5);
21 + }
22 +
23 + // Additional properties for button version
24 + // iOS requires the button element instead of an anchor tag.
25 + // If you want the anchor version, it requires `href="#"`.
26 + // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27 + button& {
28 + padding: 0;
29 + cursor: pointer;
30 + background: transparent;
31 + border: 0;
32 + -webkit-appearance: none;
33 + }
34 +}
1 +//
2 +// Code (inline and block)
3 +// --------------------------------------------------
4 +
5 +
6 +// Inline and block code styles
7 +code,
8 +kbd,
9 +pre,
10 +samp {
11 + font-family: @font-family-monospace;
12 +}
13 +
14 +// Inline code
15 +code {
16 + padding: 2px 4px;
17 + font-size: 90%;
18 + color: @code-color;
19 + background-color: @code-bg;
20 + border-radius: @border-radius-base;
21 +}
22 +
23 +// User input typically entered via keyboard
24 +kbd {
25 + padding: 2px 4px;
26 + font-size: 90%;
27 + color: @kbd-color;
28 + background-color: @kbd-bg;
29 + border-radius: @border-radius-small;
30 + box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
31 +
32 + kbd {
33 + padding: 0;
34 + font-size: 100%;
35 + font-weight: bold;
36 + box-shadow: none;
37 + }
38 +}
39 +
40 +// Blocks of code
41 +pre {
42 + display: block;
43 + padding: ((@line-height-computed - 1) / 2);
44 + margin: 0 0 (@line-height-computed / 2);
45 + font-size: (@font-size-base - 1); // 14px to 13px
46 + line-height: @line-height-base;
47 + word-break: break-all;
48 + word-wrap: break-word;
49 + color: @pre-color;
50 + background-color: @pre-bg;
51 + border: 1px solid @pre-border-color;
52 + border-radius: @border-radius-base;
53 +
54 + // Account for some code outputs that place code tags in pre tags
55 + code {
56 + padding: 0;
57 + font-size: inherit;
58 + color: inherit;
59 + white-space: pre-wrap;
60 + background-color: transparent;
61 + border-radius: 0;
62 + }
63 +}
64 +
65 +// Enable scrollable blocks of code
66 +.pre-scrollable {
67 + max-height: @pre-scrollable-max-height;
68 + overflow-y: scroll;
69 +}
1 +//
2 +// Component animations
3 +// --------------------------------------------------
4 +
5 +// Heads up!
6 +//
7 +// We don't use the `.opacity()` mixin here since it causes a bug with text
8 +// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9 +
10 +.fade {
11 + opacity: 0;
12 + .transition(opacity .15s linear);
13 + &.in {
14 + opacity: 1;
15 + }
16 +}
17 +
18 +.collapse {
19 + display: none;
20 +
21 + &.in { display: block; }
22 + tr&.in { display: table-row; }
23 + tbody&.in { display: table-row-group; }
24 +}
25 +
26 +.collapsing {
27 + position: relative;
28 + height: 0;
29 + overflow: hidden;
30 + .transition-property(~"height, visibility");
31 + .transition-duration(.35s);
32 + .transition-timing-function(ease);
33 +}
1 +//
2 +// Dropdown menus
3 +// --------------------------------------------------
4 +
5 +
6 +// Dropdown arrow/caret
7 +.caret {
8 + display: inline-block;
9 + width: 0;
10 + height: 0;
11 + margin-left: 2px;
12 + vertical-align: middle;
13 + border-top: @caret-width-base dashed;
14 + border-top: @caret-width-base solid ~"\9"; // IE8
15 + border-right: @caret-width-base solid transparent;
16 + border-left: @caret-width-base solid transparent;
17 +}
18 +
19 +// The dropdown wrapper (div)
20 +.dropup,
21 +.dropdown {
22 + position: relative;
23 +}
24 +
25 +// Prevent the focus on the dropdown toggle when closing dropdowns
26 +.dropdown-toggle:focus {
27 + outline: 0;
28 +}
29 +
30 +// The dropdown menu (ul)
31 +.dropdown-menu {
32 + position: absolute;
33 + top: 100%;
34 + left: 0;
35 + z-index: @zindex-dropdown;
36 + display: none; // none by default, but block on "open" of the menu
37 + float: left;
38 + min-width: 160px;
39 + padding: 5px 0;
40 + margin: 2px 0 0; // override default ul
41 + list-style: none;
42 + font-size: @font-size-base;
43 + text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
44 + background-color: @dropdown-bg;
45 + border: 1px solid @dropdown-fallback-border; // IE8 fallback
46 + border: 1px solid @dropdown-border;
47 + border-radius: @border-radius-base;
48 + .box-shadow(0 6px 12px rgba(0,0,0,.175));
49 + background-clip: padding-box;
50 +
51 + // Aligns the dropdown menu to right
52 + //
53 + // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
54 + &.pull-right {
55 + right: 0;
56 + left: auto;
57 + }
58 +
59 + // Dividers (basically an hr) within the dropdown
60 + .divider {
61 + .nav-divider(@dropdown-divider-bg);
62 + }
63 +
64 + // Links within the dropdown menu
65 + > li > a {
66 + display: block;
67 + padding: 3px 20px;
68 + clear: both;
69 + font-weight: normal;
70 + line-height: @line-height-base;
71 + color: @dropdown-link-color;
72 + white-space: nowrap; // prevent links from randomly breaking onto new lines
73 + }
74 +}
75 +
76 +// Hover/Focus state
77 +.dropdown-menu > li > a {
78 + &:hover,
79 + &:focus {
80 + text-decoration: none;
81 + color: @dropdown-link-hover-color;
82 + background-color: @dropdown-link-hover-bg;
83 + }
84 +}
85 +
86 +// Active state
87 +.dropdown-menu > .active > a {
88 + &,
89 + &:hover,
90 + &:focus {
91 + color: @dropdown-link-active-color;
92 + text-decoration: none;
93 + outline: 0;
94 + background-color: @dropdown-link-active-bg;
95 + }
96 +}
97 +
98 +// Disabled state
99 +//
100 +// Gray out text and ensure the hover/focus state remains gray
101 +
102 +.dropdown-menu > .disabled > a {
103 + &,
104 + &:hover,
105 + &:focus {
106 + color: @dropdown-link-disabled-color;
107 + }
108 +
109 + // Nuke hover/focus effects
110 + &:hover,
111 + &:focus {
112 + text-decoration: none;
113 + background-color: transparent;
114 + background-image: none; // Remove CSS gradient
115 + .reset-filter();
116 + cursor: @cursor-disabled;
117 + }
118 +}
119 +
120 +// Open state for the dropdown
121 +.open {
122 + // Show the menu
123 + > .dropdown-menu {
124 + display: block;
125 + }
126 +
127 + // Remove the outline when :focus is triggered
128 + > a {
129 + outline: 0;
130 + }
131 +}
132 +
133 +// Menu positioning
134 +//
135 +// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
136 +// menu with the parent.
137 +.dropdown-menu-right {
138 + left: auto; // Reset the default from `.dropdown-menu`
139 + right: 0;
140 +}
141 +// With v3, we enabled auto-flipping if you have a dropdown within a right
142 +// aligned nav component. To enable the undoing of that, we provide an override
143 +// to restore the default dropdown menu alignment.
144 +//
145 +// This is only for left-aligning a dropdown menu within a `.navbar-right` or
146 +// `.pull-right` nav component.
147 +.dropdown-menu-left {
148 + left: 0;
149 + right: auto;
150 +}
151 +
152 +// Dropdown section headers
153 +.dropdown-header {
154 + display: block;
155 + padding: 3px 20px;
156 + font-size: @font-size-small;
157 + line-height: @line-height-base;
158 + color: @dropdown-header-color;
159 + white-space: nowrap; // as with > li > a
160 +}
161 +
162 +// Backdrop to catch body clicks on mobile, etc.
163 +.dropdown-backdrop {
164 + position: fixed;
165 + left: 0;
166 + right: 0;
167 + bottom: 0;
168 + top: 0;
169 + z-index: (@zindex-dropdown - 10);
170 +}
171 +
172 +// Right aligned dropdowns
173 +.pull-right > .dropdown-menu {
174 + right: 0;
175 + left: auto;
176 +}
177 +
178 +// Allow for dropdowns to go bottom up (aka, dropup-menu)
179 +//
180 +// Just add .dropup after the standard .dropdown class and you're set, bro.
181 +// TODO: abstract this so that the navbar fixed styles are not placed here?
182 +
183 +.dropup,
184 +.navbar-fixed-bottom .dropdown {
185 + // Reverse the caret
186 + .caret {
187 + border-top: 0;
188 + border-bottom: @caret-width-base dashed;
189 + border-bottom: @caret-width-base solid ~"\9"; // IE8
190 + content: "";
191 + }
192 + // Different positioning for bottom up menu
193 + .dropdown-menu {
194 + top: auto;
195 + bottom: 100%;
196 + margin-bottom: 2px;
197 + }
198 +}
199 +
200 +
201 +// Component alignment
202 +//
203 +// Reiterate per navbar.less and the modified component alignment there.
204 +
205 +@media (min-width: @grid-float-breakpoint) {
206 + .navbar-right {
207 + .dropdown-menu {
208 + .dropdown-menu-right();
209 + }
210 + // Necessary for overrides of the default right aligned menu.
211 + // Will remove come v4 in all likelihood.
212 + .dropdown-menu-left {
213 + .dropdown-menu-left();
214 + }
215 + }
216 +}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +//
2 +// Grid system
3 +// --------------------------------------------------
4 +
5 +
6 +// Container widths
7 +//
8 +// Set the container width, and override it for fixed navbars in media queries.
9 +
10 +.container {
11 + .container-fixed();
12 +
13 + @media (min-width: @screen-sm-min) {
14 + width: @container-sm;
15 + }
16 + @media (min-width: @screen-md-min) {
17 + width: @container-md;
18 + }
19 + @media (min-width: @screen-lg-min) {
20 + width: @container-lg;
21 + }
22 +}
23 +
24 +
25 +// Fluid container
26 +//
27 +// Utilizes the mixin meant for fixed width containers, but without any defined
28 +// width for fluid, full width layouts.
29 +
30 +.container-fluid {
31 + .container-fixed();
32 +}
33 +
34 +
35 +// Row
36 +//
37 +// Rows contain and clear the floats of your columns.
38 +
39 +.row {
40 + .make-row();
41 +}
42 +
43 +
44 +// Columns
45 +//
46 +// Common styles for small and large grid columns
47 +
48 +.make-grid-columns();
49 +
50 +
51 +// Extra small grid
52 +//
53 +// Columns, offsets, pushes, and pulls for extra small devices like
54 +// smartphones.
55 +
56 +.make-grid(xs);
57 +
58 +
59 +// Small grid
60 +//
61 +// Columns, offsets, pushes, and pulls for the small device range, from phones
62 +// to tablets.
63 +
64 +@media (min-width: @screen-sm-min) {
65 + .make-grid(sm);
66 +}
67 +
68 +
69 +// Medium grid
70 +//
71 +// Columns, offsets, pushes, and pulls for the desktop device range.
72 +
73 +@media (min-width: @screen-md-min) {
74 + .make-grid(md);
75 +}
76 +
77 +
78 +// Large grid
79 +//
80 +// Columns, offsets, pushes, and pulls for the large desktop device range.
81 +
82 +@media (min-width: @screen-lg-min) {
83 + .make-grid(lg);
84 +}
1 +//
2 +// Input groups
3 +// --------------------------------------------------
4 +
5 +// Base styles
6 +// -------------------------
7 +.input-group {
8 + position: relative; // For dropdowns
9 + display: table;
10 + border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11 +
12 + // Undo padding and float of grid classes
13 + &[class*="col-"] {
14 + float: none;
15 + padding-left: 0;
16 + padding-right: 0;
17 + }
18 +
19 + .form-control {
20 + // Ensure that the input is always above the *appended* addon button for
21 + // proper border colors.
22 + position: relative;
23 + z-index: 2;
24 +
25 + // IE9 fubars the placeholder attribute in text inputs and the arrows on
26 + // select elements in input groups. To fix it, we float the input. Details:
27 + // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
28 + float: left;
29 +
30 + width: 100%;
31 + margin-bottom: 0;
32 + }
33 +}
34 +
35 +// Sizing options
36 +//
37 +// Remix the default form control sizing classes into new ones for easier
38 +// manipulation.
39 +
40 +.input-group-lg > .form-control,
41 +.input-group-lg > .input-group-addon,
42 +.input-group-lg > .input-group-btn > .btn {
43 + .input-lg();
44 +}
45 +.input-group-sm > .form-control,
46 +.input-group-sm > .input-group-addon,
47 +.input-group-sm > .input-group-btn > .btn {
48 + .input-sm();
49 +}
50 +
51 +
52 +// Display as table-cell
53 +// -------------------------
54 +.input-group-addon,
55 +.input-group-btn,
56 +.input-group .form-control {
57 + display: table-cell;
58 +
59 + &:not(:first-child):not(:last-child) {
60 + border-radius: 0;
61 + }
62 +}
63 +// Addon and addon wrapper for buttons
64 +.input-group-addon,
65 +.input-group-btn {
66 + width: 1%;
67 + white-space: nowrap;
68 + vertical-align: middle; // Match the inputs
69 +}
70 +
71 +// Text input groups
72 +// -------------------------
73 +.input-group-addon {
74 + padding: @padding-base-vertical @padding-base-horizontal;
75 + font-size: @font-size-base;
76 + font-weight: normal;
77 + line-height: 1;
78 + color: @input-color;
79 + text-align: center;
80 + background-color: @input-group-addon-bg;
81 + border: 1px solid @input-group-addon-border-color;
82 + border-radius: @border-radius-base;
83 +
84 + // Sizing
85 + &.input-sm {
86 + padding: @padding-small-vertical @padding-small-horizontal;
87 + font-size: @font-size-small;
88 + border-radius: @border-radius-small;
89 + }
90 + &.input-lg {
91 + padding: @padding-large-vertical @padding-large-horizontal;
92 + font-size: @font-size-large;
93 + border-radius: @border-radius-large;
94 + }
95 +
96 + // Nuke default margins from checkboxes and radios to vertically center within.
97 + input[type="radio"],
98 + input[type="checkbox"] {
99 + margin-top: 0;
100 + }
101 +}
102 +
103 +// Reset rounded corners
104 +.input-group .form-control:first-child,
105 +.input-group-addon:first-child,
106 +.input-group-btn:first-child > .btn,
107 +.input-group-btn:first-child > .btn-group > .btn,
108 +.input-group-btn:first-child > .dropdown-toggle,
109 +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
110 +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
111 + .border-right-radius(0);
112 +}
113 +.input-group-addon:first-child {
114 + border-right: 0;
115 +}
116 +.input-group .form-control:last-child,
117 +.input-group-addon:last-child,
118 +.input-group-btn:last-child > .btn,
119 +.input-group-btn:last-child > .btn-group > .btn,
120 +.input-group-btn:last-child > .dropdown-toggle,
121 +.input-group-btn:first-child > .btn:not(:first-child),
122 +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
123 + .border-left-radius(0);
124 +}
125 +.input-group-addon:last-child {
126 + border-left: 0;
127 +}
128 +
129 +// Button input groups
130 +// -------------------------
131 +.input-group-btn {
132 + position: relative;
133 + // Jankily prevent input button groups from wrapping with `white-space` and
134 + // `font-size` in combination with `inline-block` on buttons.
135 + font-size: 0;
136 + white-space: nowrap;
137 +
138 + // Negative margin for spacing, position for bringing hovered/focused/actived
139 + // element above the siblings.
140 + > .btn {
141 + position: relative;
142 + + .btn {
143 + margin-left: -1px;
144 + }
145 + // Bring the "active" button to the front
146 + &:hover,
147 + &:focus,
148 + &:active {
149 + z-index: 2;
150 + }
151 + }
152 +
153 + // Negative margin to only have a 1px border between the two
154 + &:first-child {
155 + > .btn,
156 + > .btn-group {
157 + margin-right: -1px;
158 + }
159 + }
160 + &:last-child {
161 + > .btn,
162 + > .btn-group {
163 + z-index: 2;
164 + margin-left: -1px;
165 + }
166 + }
167 +}
1 +//
2 +// Jumbotron
3 +// --------------------------------------------------
4 +
5 +
6 +.jumbotron {
7 + padding-top: @jumbotron-padding;
8 + padding-bottom: @jumbotron-padding;
9 + margin-bottom: @jumbotron-padding;
10 + color: @jumbotron-color;
11 + background-color: @jumbotron-bg;
12 +
13 + h1,
14 + .h1 {
15 + color: @jumbotron-heading-color;
16 + }
17 +
18 + p {
19 + margin-bottom: (@jumbotron-padding / 2);
20 + font-size: @jumbotron-font-size;
21 + font-weight: 200;
22 + }
23 +
24 + > hr {
25 + border-top-color: darken(@jumbotron-bg, 10%);
26 + }
27 +
28 + .container &,
29 + .container-fluid & {
30 + border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
31 + }
32 +
33 + .container {
34 + max-width: 100%;
35 + }
36 +
37 + @media screen and (min-width: @screen-sm-min) {
38 + padding-top: (@jumbotron-padding * 1.6);
39 + padding-bottom: (@jumbotron-padding * 1.6);
40 +
41 + .container &,
42 + .container-fluid & {
43 + padding-left: (@jumbotron-padding * 2);
44 + padding-right: (@jumbotron-padding * 2);
45 + }
46 +
47 + h1,
48 + .h1 {
49 + font-size: @jumbotron-heading-font-size;
50 + }
51 + }
52 +}
1 +//
2 +// Labels
3 +// --------------------------------------------------
4 +
5 +.label {
6 + display: inline;
7 + padding: .2em .6em .3em;
8 + font-size: 75%;
9 + font-weight: bold;
10 + line-height: 1;
11 + color: @label-color;
12 + text-align: center;
13 + white-space: nowrap;
14 + vertical-align: baseline;
15 + border-radius: .25em;
16 +
17 + // Add hover effects, but only for links
18 + a& {
19 + &:hover,
20 + &:focus {
21 + color: @label-link-hover-color;
22 + text-decoration: none;
23 + cursor: pointer;
24 + }
25 + }
26 +
27 + // Empty labels collapse automatically (not available in IE8)
28 + &:empty {
29 + display: none;
30 + }
31 +
32 + // Quick fix for labels in buttons
33 + .btn & {
34 + position: relative;
35 + top: -1px;
36 + }
37 +}
38 +
39 +// Colors
40 +// Contextual variations (linked labels get darker on :hover)
41 +
42 +.label-default {
43 + .label-variant(@label-default-bg);
44 +}
45 +
46 +.label-primary {
47 + .label-variant(@label-primary-bg);
48 +}
49 +
50 +.label-success {
51 + .label-variant(@label-success-bg);
52 +}
53 +
54 +.label-info {
55 + .label-variant(@label-info-bg);
56 +}
57 +
58 +.label-warning {
59 + .label-variant(@label-warning-bg);
60 +}
61 +
62 +.label-danger {
63 + .label-variant(@label-danger-bg);
64 +}
1 +//
2 +// List groups
3 +// --------------------------------------------------
4 +
5 +
6 +// Base class
7 +//
8 +// Easily usable on <ul>, <ol>, or <div>.
9 +
10 +.list-group {
11 + // No need to set list-style: none; since .list-group-item is block level
12 + margin-bottom: 20px;
13 + padding-left: 0; // reset padding because ul and ol
14 +}
15 +
16 +
17 +// Individual list items
18 +//
19 +// Use on `li`s or `div`s within the `.list-group` parent.
20 +
21 +.list-group-item {
22 + position: relative;
23 + display: block;
24 + padding: 10px 15px;
25 + // Place the border on the list items and negative margin up for better styling
26 + margin-bottom: -1px;
27 + background-color: @list-group-bg;
28 + border: 1px solid @list-group-border;
29 +
30 + // Round the first and last items
31 + &:first-child {
32 + .border-top-radius(@list-group-border-radius);
33 + }
34 + &:last-child {
35 + margin-bottom: 0;
36 + .border-bottom-radius(@list-group-border-radius);
37 + }
38 +}
39 +
40 +
41 +// Interactive list items
42 +//
43 +// Use anchor or button elements instead of `li`s or `div`s to create interactive items.
44 +// Includes an extra `.active` modifier class for showing selected items.
45 +
46 +a.list-group-item,
47 +button.list-group-item {
48 + color: @list-group-link-color;
49 +
50 + .list-group-item-heading {
51 + color: @list-group-link-heading-color;
52 + }
53 +
54 + // Hover state
55 + &:hover,
56 + &:focus {
57 + text-decoration: none;
58 + color: @list-group-link-hover-color;
59 + background-color: @list-group-hover-bg;
60 + }
61 +}
62 +
63 +button.list-group-item {
64 + width: 100%;
65 + text-align: left;
66 +}
67 +
68 +.list-group-item {
69 + // Disabled state
70 + &.disabled,
71 + &.disabled:hover,
72 + &.disabled:focus {
73 + background-color: @list-group-disabled-bg;
74 + color: @list-group-disabled-color;
75 + cursor: @cursor-disabled;
76 +
77 + // Force color to inherit for custom content
78 + .list-group-item-heading {
79 + color: inherit;
80 + }
81 + .list-group-item-text {
82 + color: @list-group-disabled-text-color;
83 + }
84 + }
85 +
86 + // Active class on item itself, not parent
87 + &.active,
88 + &.active:hover,
89 + &.active:focus {
90 + z-index: 2; // Place active items above their siblings for proper border styling
91 + color: @list-group-active-color;
92 + background-color: @list-group-active-bg;
93 + border-color: @list-group-active-border;
94 +
95 + // Force color to inherit for custom content
96 + .list-group-item-heading,
97 + .list-group-item-heading > small,
98 + .list-group-item-heading > .small {
99 + color: inherit;
100 + }
101 + .list-group-item-text {
102 + color: @list-group-active-text-color;
103 + }
104 + }
105 +}
106 +
107 +
108 +// Contextual variants
109 +//
110 +// Add modifier classes to change text and background color on individual items.
111 +// Organizationally, this must come after the `:hover` states.
112 +
113 +.list-group-item-variant(success; @state-success-bg; @state-success-text);
114 +.list-group-item-variant(info; @state-info-bg; @state-info-text);
115 +.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
116 +.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
117 +
118 +
119 +// Custom content options
120 +//
121 +// Extra classes for creating well-formatted content within `.list-group-item`s.
122 +
123 +.list-group-item-heading {
124 + margin-top: 0;
125 + margin-bottom: 5px;
126 +}
127 +.list-group-item-text {
128 + margin-bottom: 0;
129 + line-height: 1.3;
130 +}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.