mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2f72ebb89 | ||
|
|
9b943de3f4 | ||
|
|
57ddc36d3e | ||
|
|
ade9f4826b | ||
|
|
4e27c63ca4 | ||
|
|
92f54b29d6 | ||
|
|
c3e9a12870 | ||
|
|
e9505f2909 | ||
|
|
2dc9cb4917 | ||
|
|
1684271a76 | ||
|
|
a0c9b1591d | ||
|
|
b5bd1b1714 | ||
|
|
bafef3dcd9 | ||
|
|
1c2fde09a0 | ||
|
|
71f8cbce12 | ||
|
|
20aabdde44 | ||
|
|
12c88aaa00 | ||
|
|
5779e70db7 | ||
|
|
4408405009 | ||
|
|
51f8c89ac8 | ||
|
|
61c769a626 | ||
|
|
e8b4cca929 | ||
|
|
0efdeef8d4 | ||
|
|
8a3ffced0b | ||
|
|
843c8241e7 | ||
|
|
49a7ece11e | ||
|
|
b02b71c0e6 | ||
|
|
dd49087566 | ||
|
|
95da80b103 | ||
|
|
a79b8f14d3 | ||
|
|
c8523caf13 | ||
|
|
7e5ab5d7f5 | ||
|
|
0628cee6d7 | ||
|
|
cb97fb59be | ||
|
|
ff935c396c | ||
|
|
283e237cee | ||
|
|
3e0aefdf90 | ||
|
|
f96d55965a | ||
|
|
7b28b14c80 | ||
|
|
75b0c88693 | ||
|
|
1a2bb62b5f | ||
|
|
d79f5c17bc | ||
|
|
5925040bf2 | ||
|
|
30b22685cd | ||
|
|
828bdbf4d2 | ||
|
|
f37278b371 | ||
|
|
02c281bbf0 | ||
|
|
9dc14167d1 | ||
|
|
72d948a8eb | ||
|
|
6c47ebecf6 | ||
|
|
9e1d6be08e | ||
|
|
1dc7d44daf | ||
|
|
54a950138d | ||
|
|
45fbc321e9 | ||
|
|
c5a39941e0 | ||
|
|
31c575c568 | ||
|
|
071b04b16f | ||
|
|
758d5f2a06 | ||
|
|
1d5a7589b8 | ||
|
|
ca19e02b17 | ||
|
|
b000850500 | ||
|
|
2bc3e6f3dc | ||
|
|
574034791d | ||
|
|
dded81671a | ||
|
|
473a741ede | ||
|
|
02d43b36d0 | ||
|
|
fe25e85e40 | ||
|
|
0b812a49f8 | ||
|
|
ea757e46e9 | ||
|
|
a5fd93a7e2 | ||
|
|
fb643bdb6f | ||
|
|
912f10f1cf | ||
|
|
27f6a5b3f9 | ||
|
|
c3948a744b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,4 +38,5 @@ validation-status.json
|
||||
validation-report.json
|
||||
|
||||
# Folders to ignore
|
||||
bower_components
|
||||
node_modules
|
||||
|
||||
19
.travis.yml
19
.travis.yml
@@ -2,27 +2,16 @@ language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
before_install:
|
||||
- time sudo pip install --use-mirrors -r test-infra/requirements.txt
|
||||
- sudo pip install --use-mirrors -r test-infra/requirements.txt
|
||||
- rvm use 1.9.3 --fuzzy
|
||||
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
|
||||
install:
|
||||
- time npm install -g grunt-cli
|
||||
- time ./test-infra/s3_cache.py download 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules || time ./test-infra/uncached-npm-install.sh
|
||||
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py download rubygems pseudo_Gemfile.lock $(rvm gemdir) || gem install -N jekyll -v $JEKYLL_VERSION; fi
|
||||
after_script:
|
||||
- if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules; fi
|
||||
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi
|
||||
- npm install -g grunt-cli
|
||||
- npm install
|
||||
env:
|
||||
global:
|
||||
- JEKYLL_VERSION: 1.4.1
|
||||
- SAUCE_USERNAME: bootstrap
|
||||
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
|
||||
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
|
||||
- secure: "Gghh/e3Gsbj1+4RR9Lh2aR/xJl35HWiHqlPIeSUqE9D7uDCVTAwNce/dGL3Ew7uJPfJ6Pgr70wD3zgu3stw0Zmzayax0hiDtGwcQCxVIER08wqGANK9C2Q7PYJkNTNtiTo6ehKWbdV4Z+/U+TEYyQfpQTDbAFYk/vVpsdjp0Lmc="
|
||||
- secure: "RTbRdx4G/2OTLfrZtP1VbRljxEmd6A1F3GqXboeQTldsnAlwpsES65es5CE3ub/rmixLApOY9ot7OPmNixFgC2Y8xOsV7lNCC62QVpmqQEDyGFFQKb3yO6/dmwQxdsCqGfzf9Np6Wh5V22QFvr50ZLKLd7Uhd9oXMDIk/z1MJ3o="
|
||||
matrix:
|
||||
- TWBS_TEST=core
|
||||
- TWBS_TEST=validate-html
|
||||
- TWBS_TEST=sauce-js-unit
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
|
||||
24
Gruntfile.js
24
Gruntfile.js
@@ -64,7 +64,7 @@ module.exports = function (grunt) {
|
||||
|
||||
jscs: {
|
||||
options: {
|
||||
config: 'js/.jscs.json',
|
||||
config: 'js/.jscsrc'
|
||||
},
|
||||
grunt: {
|
||||
src: ['Gruntfile.js', 'grunt/*.js']
|
||||
@@ -256,9 +256,9 @@ module.exports = function (grunt) {
|
||||
pretty: true,
|
||||
data: function () {
|
||||
var filePath = path.join(__dirname, 'less/build/variables.less');
|
||||
var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
|
||||
var fileContent = fs.readFileSync(filePath, { encoding: 'utf8' });
|
||||
var parser = new BsLessdocParser(fileContent);
|
||||
return {sections: parser.parseFile()};
|
||||
return { sections: parser.parseFile() };
|
||||
}
|
||||
},
|
||||
files: {
|
||||
@@ -276,7 +276,9 @@ module.exports = function (grunt) {
|
||||
reset: true,
|
||||
relaxerror: [
|
||||
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
|
||||
'Element img is missing required attribute src.'
|
||||
'Element img is missing required attribute src.',
|
||||
'This interface to HTML5 document checking is deprecated.',
|
||||
'\\& did not start a character reference. \\(\\& probably should have been escaped as \\&.\\)'
|
||||
]
|
||||
},
|
||||
files: {
|
||||
@@ -303,10 +305,12 @@ module.exports = function (grunt) {
|
||||
versionNumber: {
|
||||
src: ['*.js', '*.md', '*.json', '*.yml', 'js/*.js'],
|
||||
overwrite: true,
|
||||
replacements: [{
|
||||
from: grunt.option('oldver'),
|
||||
to: grunt.option('newver')
|
||||
}]
|
||||
replacements: [
|
||||
{
|
||||
from: grunt.option('oldver'),
|
||||
to: grunt.option('newver')
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -333,7 +337,7 @@ module.exports = function (grunt) {
|
||||
|
||||
|
||||
// These plugins provide necessary tasks.
|
||||
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
|
||||
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
|
||||
|
||||
// Docs HTML validation task
|
||||
grunt.registerTask('validate-html', ['jekyll', 'validation']);
|
||||
@@ -374,7 +378,7 @@ module.exports = function (grunt) {
|
||||
|
||||
// Documentation task.
|
||||
grunt.registerTask('docs', ['jekyll', 'dist-docs']);
|
||||
|
||||
|
||||
// Version numbering task.
|
||||
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
|
||||
// This can be overzealous, so its changes should always be manually reviewed!
|
||||
|
||||
18
README.md
18
README.md
@@ -1,6 +1,6 @@
|
||||
# [Jasny Bootstrap](http://jasny.github.io/bootstrap/) [](http://travis-ci.org/jasny/bootstrap)[](https://david-dm.org/jasny/bootstrap#info=devDependencies)
|
||||
# [Jasny Bootstrap](http://jasny.github.io/bootstrap/)  [](http://travis-ci.org/jasny/bootstrap) [](https://gitter.im/jasny/bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Jasny Bootstrap is an extension of the famous [Twitter Bootstrap](http://getbootstrap.com/), adding the following components:
|
||||
Jasny Bootstrap is an extension of the famous [Bootstrap](http://getbootstrap.com/), adding the following components:
|
||||
|
||||
* [Button labels](http://jasny.github.io/bootstrap/css/#buttons-labels)
|
||||
* [Off canvas navmenu](http://jasny.github.io/bootstrap/components/#navmenu)
|
||||
@@ -14,11 +14,13 @@ To get started, check out <http://jasny.github.io/bootstrap>!
|
||||
|
||||
## Quick start
|
||||
|
||||
Three quick start options are available:
|
||||
Four quick start options are available:
|
||||
|
||||
* [Download the latest release](https://github.com/jasny/bootstrap/releases/download/v3.1.0/jasny-bootstrap-3.1.0-dist.zip).
|
||||
* [Download the latest release](https://github.com/jasny/bootstrap/releases/download/v3.1.3/jasny-bootstrap-3.1.3-dist.zip).
|
||||
* Clone the repo: `git clone git://github.com/jasny/bootstrap.git`.
|
||||
* Install with [Bower](http://bower.io): `bower install bootstrap=jasny-bootstrap`.
|
||||
* Install with [Bower](http://bower.io): `bower install jasny-bootstrap`.
|
||||
* Use [cdnjs](http://cdnjs.com/libraries/jasny-bootstrap).
|
||||
* Install with [Meteor](https://meteor.com): `meteor add jasny:bootstrap`.
|
||||
|
||||
Read the [Getting Started page](http://jasny.github.io/bootstrap/getting-started/) for information on the framework contents, templates and examples, and more.
|
||||
|
||||
@@ -38,14 +40,14 @@ jasny-bootstrap/
|
||||
|
||||
We provide compiled CSS and JS (`jasny-bootstrap.*`), as well as compiled and minified CSS and JS (`jasny-bootstrap.min.*`).
|
||||
|
||||
Jasny Bootstrap should be loaded after Twitter Bootstrap.
|
||||
Jasny Bootstrap should be loaded after vanilla Bootstrap.
|
||||
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
Have a bug or a feature request? [Please open a new issue](https://github.com/jasny/bootstrap/issues). Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).
|
||||
|
||||
You may use [this JS Bin](http://jsbin.com/iKumuWo/1/edit) as a template for your bug reports.
|
||||
You may use [this JSFiddle](http://jsfiddle.net/jasny/k9K5d/) as a template for your bug reports.
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +140,7 @@ And constructed with the following guidelines:
|
||||
|
||||
For more information on SemVer, please visit <http://semver.org/>.
|
||||
|
||||
__The major version will follow Twitter Bootstraps major version. This means backward compatibility will only be broken if Twitter Bootstrap does so.__
|
||||
__The major version will follow Bootstrap's major version. This means backward compatibility will only be broken if Bootstrap does so.__
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"name": "jasny-bootstrap",
|
||||
"version": "3.1.3",
|
||||
"main": [
|
||||
"./dist/css/jasny-bootstrap.css",
|
||||
"./dist/js/jasny-bootstrap.js"
|
||||
@@ -14,8 +13,8 @@
|
||||
"docs",
|
||||
"js/tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">= 1.9.0",
|
||||
"dependencies": { },
|
||||
"devDependencies": {
|
||||
"bootstrap": ">= 3.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
{
|
||||
"name": "jasny/bootstrap"
|
||||
, "description": "The missing bootstrap components"
|
||||
, "keywords": ["bootstrap", "css"]
|
||||
, "homepage": "http://jasny.github.io/bootstrap"
|
||||
, "authors": [
|
||||
"name": "jasny/bootstrap",
|
||||
"description": "The missing bootstrap components",
|
||||
"type": "component",
|
||||
"keywords": ["bootstrap", "css"],
|
||||
"homepage": "http://jasny.github.io/bootstrap",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arnold Daniels",
|
||||
"email": "arnold@jasny.net"
|
||||
}
|
||||
]
|
||||
, "support": {
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/jasny/bootstrap/issues"
|
||||
}
|
||||
, "license": "Apache-2.0"
|
||||
, "require": {
|
||||
"twitter/bootstrap" : ">=3.1.0"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"require": {
|
||||
"twbs/bootstrap" : ">=3.1.0"
|
||||
},
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"dist/js/jasny-bootstrap.js",
|
||||
"dist/js/jasny-bootstrap.min.js"
|
||||
],
|
||||
"styles": [
|
||||
"dist/css/jasny-bootstrap.css",
|
||||
"dist/css/jasny-bootstrap.min.css"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
dist/css/jasny-bootstrap.css
vendored
9
dist/css/jasny-bootstrap.css
vendored
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap)
|
||||
* Copyright 2012-2014 Arnold Daniels
|
||||
* Copyright 2012-2015 Arnold Daniels
|
||||
* Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
left: auto;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
.btn-group > .btn:last-child:not(:first-child) .btn-label,
|
||||
.btn-group > .dropdown-toggle:not(:first-child) .btn-label {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.nav-tabs-bottom {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 0;
|
||||
@@ -151,7 +156,7 @@
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1030;
|
||||
z-index: 1050;
|
||||
overflow-y: auto;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
2
dist/css/jasny-bootstrap.css.map
vendored
2
dist/css/jasny-bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
4
dist/css/jasny-bootstrap.min.css
vendored
4
dist/css/jasny-bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
64
dist/js/jasny-bootstrap.js
vendored
64
dist/js/jasny-bootstrap.js
vendored
@@ -108,7 +108,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
placement: 'auto',
|
||||
autohide: true,
|
||||
recalc: true,
|
||||
disableScrolling: true
|
||||
disableScrolling: true,
|
||||
modal: false
|
||||
}
|
||||
|
||||
OffCanvas.prototype.offset = function () {
|
||||
@@ -212,6 +213,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
$('body').css(prop, padding)
|
||||
}, 1)
|
||||
}
|
||||
//disable scrolling on mobiles (they ignore overflow:hidden)
|
||||
$('body').on('touchmove.bs', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
OffCanvas.prototype.enableScrolling = function() {
|
||||
$('body').off('touchmove.bs');
|
||||
}
|
||||
|
||||
OffCanvas.prototype.show = function () {
|
||||
@@ -245,6 +254,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
})
|
||||
|
||||
if (this.options.disableScrolling) this.disableScrolling()
|
||||
if (this.options.modal) this.toggleBackdrop()
|
||||
|
||||
var complete = function () {
|
||||
if (this.state != 'slide-in') return
|
||||
@@ -290,6 +300,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
this.$element.trigger('hidden.bs.offcanvas')
|
||||
}
|
||||
|
||||
if (this.options.disableScrolling) this.enableScrolling()
|
||||
if (this.options.modal) this.toggleBackdrop()
|
||||
|
||||
elements.removeClass('canvas-slid').addClass('canvas-sliding')
|
||||
|
||||
setTimeout($.proxy(function() {
|
||||
@@ -302,6 +315,45 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
this[this.state === 'slid' ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
OffCanvas.prototype.toggleBackdrop = function (callback) {
|
||||
callback = callback || $.noop;
|
||||
if (this.state == 'slide-in') {
|
||||
var doAnimate = $.support.transition;
|
||||
|
||||
this.$backdrop = $('<div class="modal-backdrop fade" />')
|
||||
.insertAfter(this.$element);
|
||||
|
||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||
|
||||
this.$backdrop.addClass('in')
|
||||
|
||||
doAnimate ?
|
||||
this.$backdrop
|
||||
.one($.support.transition.end, callback)
|
||||
.emulateTransitionEnd(150) :
|
||||
callback()
|
||||
} else if (this.state == 'slide-out' && this.$backdrop) {
|
||||
this.$backdrop.removeClass('in');
|
||||
$('body').off('touchmove.bs');
|
||||
var self = this;
|
||||
if ($.support.transition) {
|
||||
this.$backdrop
|
||||
.one($.support.transition.end, function() {
|
||||
self.$backdrop.remove();
|
||||
callback()
|
||||
self.$backdrop = null;
|
||||
})
|
||||
.emulateTransitionEnd(150);
|
||||
} else {
|
||||
this.$backdrop.remove();
|
||||
this.$backdrop = null;
|
||||
callback();
|
||||
}
|
||||
} else if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
OffCanvas.prototype.calcClone = function() {
|
||||
this.$calcClone = this.$element.clone()
|
||||
.html('')
|
||||
@@ -554,7 +606,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
Inputmask.prototype.listen = function() {
|
||||
if (this.$element.attr("readonly")) return
|
||||
|
||||
var pasteEventName = (isIE ? 'paste' : 'input') + ".mask"
|
||||
var pasteEventName = (isIE ? 'paste' : 'input') + ".bs.inputmask"
|
||||
|
||||
this.$element
|
||||
.on("unmask.bs.inputmask", $.proxy(this.unmask, this))
|
||||
@@ -650,8 +702,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
|
||||
Inputmask.prototype.unmask = function() {
|
||||
this.$element
|
||||
.unbind(".mask")
|
||||
.removeData("inputmask")
|
||||
.unbind(".bs.inputmask")
|
||||
.removeData("bs.inputmask")
|
||||
}
|
||||
|
||||
Inputmask.prototype.focusEvent = function() {
|
||||
@@ -674,8 +726,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
|
||||
|
||||
Inputmask.prototype.blurEvent = function() {
|
||||
this.checkVal()
|
||||
if (this.$element.val() !== this.focusText)
|
||||
if (this.$element.val() !== this.focusText) {
|
||||
this.$element.trigger('change')
|
||||
this.$element.trigger('input')
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.keydownEvent = function(e) {
|
||||
|
||||
2
dist/js/jasny-bootstrap.min.js
vendored
2
dist/js/jasny-bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<div id="aboutme-container">
|
||||
<!-- <div id="aboutme-container">
|
||||
<a href="mailto:arnold@jasny.net" class="aboutme">
|
||||
<img class="img-circle" src="http://0.gravatar.com/avatar/0bba82e8b2a9d2cf9645cb07ea54766f?s=100&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&r=G" alt="Arnold Daniels">
|
||||
<div class="aboutme-text">
|
||||
@@ -7,4 +7,10 @@
|
||||
<span class="aboutme-name">- Arnold Daniels</span>
|
||||
</div>
|
||||
</a>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div id="carbonads-container">
|
||||
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=jansy" id="_carbonads_js"></script>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="{{ page.base_url }}dist/js/jasny-bootstrap.min.js"></script>
|
||||
|
||||
<script src="http://platform.twitter.com/widgets.js"></script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{ page.base_url }}dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Documentation extras -->
|
||||
@@ -41,3 +41,14 @@
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
(function() {
|
||||
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
|
||||
s.type = 'text/javascript';
|
||||
s.async = true;
|
||||
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
|
||||
t.parentNode.insertBefore(s, t);
|
||||
})();
|
||||
/* ]]> */</script>
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
<li class="tweet-btn">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://jasny.github.io/bootstrap" data-count="horizontal" data-via="ArnoldDaniels">Tweet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://github.com/jasny/bootstrap">Flattr</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="container">
|
||||
{% include social-buttons.html %}
|
||||
|
||||
<p>Jasny Bootstrap is a fork of <a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a>. This fork is developed and maintained by <a href="http://twitter.com/ArnoldDaniels" target="_blank">Arnold Daniels</a>.</p>
|
||||
<p>Jasny Bootstrap is a fork of <a href="http://getbootstrap.com/" target="_blank">vanilla Bootstrap</a>. This fork is developed and maintained by <a href="http://twitter.com/ArnoldDaniels" target="_blank">Arnold Daniels</a>.</p>
|
||||
<p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="footer-links">
|
||||
<li>Currently v{{ site.current_version }}</li>
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
*
|
||||
* Update the basics of our documents to prep for docs content.
|
||||
*/
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative; /* For scrollyspy */
|
||||
@@ -193,12 +196,12 @@ span.hidden-sm {
|
||||
.bs-social-buttons li {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
padding: 5px 8px;
|
||||
padding: 5px 8px 5px 0;
|
||||
}
|
||||
.bs-social-buttons .twitter-follow-button {
|
||||
width: 225px !important;
|
||||
.bs-social-buttons .follow-btn {
|
||||
width: 240px !important;
|
||||
}
|
||||
.bs-social-buttons .twitter-share-button {
|
||||
.bs-social-buttons .tweet-btn {
|
||||
width: 98px !important;
|
||||
}
|
||||
/* Style the GitHub buttons via CSS instead of inline attributes */
|
||||
@@ -231,6 +234,8 @@ span.hidden-sm {
|
||||
background-image: url(../img/bg-1920x1200.jpg);
|
||||
}
|
||||
@media (min-width: 1921px), (min-height: 1201px) {
|
||||
.bs-docs-nav,
|
||||
.bs-docs-home,
|
||||
.bs-header {
|
||||
background-image: url(../img/bg-3500x2500.jpg);
|
||||
}
|
||||
@@ -351,6 +356,99 @@ span.hidden-sm {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Carbon ads
|
||||
*
|
||||
* Single display ad that shows on all pages (except homepage) in page headers.
|
||||
* The hella `!important` is required for any pre-set property.
|
||||
*/
|
||||
|
||||
#carbonads {
|
||||
width: auto !important;
|
||||
margin: 50px -30px -40px !important;
|
||||
padding: 20px !important;
|
||||
overflow: hidden; /* clearfix */
|
||||
height: auto !important;
|
||||
font-size: 13px !important;
|
||||
line-height: 16px !important;
|
||||
text-align: left;
|
||||
background: #63303A !important;
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
box-shadow: inset 0 3px 5px rgba(0,0,0,.075);
|
||||
border: 0 !important;
|
||||
}
|
||||
.carbon-img {
|
||||
margin: 0 !important;
|
||||
float: left;
|
||||
}
|
||||
.carbon-text {
|
||||
float: none !important;
|
||||
display: block !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
margin-left: 145px !important;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
|
||||
padding-top: 0 !important;
|
||||
color: #eee !important;
|
||||
}
|
||||
.carbon-poweredby {
|
||||
color: #ceb6b8 !important;
|
||||
margin-left: 145px;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
#carbonads a:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#carbonads {
|
||||
margin: 0 !important;
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 3px 5px rgba(0,0,0,.075), 0 1px 0 rgba(255,255,255,.1);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
#carbonads {
|
||||
position: absolute;
|
||||
top: 20px !important;
|
||||
right: 15px !important; /* 15px instead of 0 since box-sizing */
|
||||
width: 330px !important;
|
||||
padding: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Homepage variations */
|
||||
.bs-docs-home #carbonads {
|
||||
margin: 0 -15px 40px !important;
|
||||
}
|
||||
@media (min-width: 480px) {
|
||||
.bs-docs-home #carbonads {
|
||||
width: 330px !important;
|
||||
margin: 0 auto 40px !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.bs-docs-home #carbonads {
|
||||
float: left;
|
||||
width: 330px !important;
|
||||
margin: 0 0 30px !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.bs-docs-home #carbonads {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1170px) {
|
||||
.bs-docs-home #carbonads {
|
||||
margin-top: -25px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* About me
|
||||
*
|
||||
|
||||
2
docs/assets/css/docs.min.css
vendored
2
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/customize.min.js
vendored
2
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/raw-files.min.js
vendored
4
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -173,12 +173,12 @@ base_url: "../"
|
||||
<p>Add <code>.alert-fixed-top</code> top stick the alert on top of your page. Use <code>.alert-fixed-bottom</code> for the bottom.</p>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-success alert-fixed-top">
|
||||
<strong>Success!</strong> Your action has been completed succefully.
|
||||
<strong>Success!</strong> Your action has been completed successfully.
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="alert alert-success alert-fixed-top">
|
||||
<strong>Success!</strong> Your action has been completed succefully.
|
||||
<strong>Success!</strong> Your action has been completed successfully.
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ base_url: "../"
|
||||
</div><!-- /.row -->
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Twitter Bootstrap required</h4>
|
||||
<p>Jasny Bootstrap requires <a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a> to be included.</p>
|
||||
<h4>Vanilla Bootstrap required</h4>
|
||||
<p>Jasny Bootstrap requires <a href="http://getbootstrap.com/" target="_blank">vanilla Bootstrap</a> to be included.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
2
docs/dist/css/jasny-bootstrap.min.css
vendored
2
docs/dist/css/jasny-bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/js/jasny-bootstrap.min.js
vendored
2
docs/dist/js/jasny-bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
||||
<title>Navbar Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
@@ -81,7 +81,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<title>Off Canvas Push Menu Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
@@ -75,7 +75,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
|
||||
<script src="../../../js/offcanvas.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<title>Off Canvas Reveal Menu Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
@@ -80,7 +80,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<title>Navmenu Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
@@ -76,7 +76,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<title>Starter Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
@@ -63,7 +63,7 @@
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -12,12 +12,12 @@ base_url: "../"
|
||||
<div class="page-header">
|
||||
<h1 id="jasny-bootstrap">Jasny Bootstrap</h1>
|
||||
</div>
|
||||
<p class="lead">Jasny Bootstrap is an extension to <a href="http://getbootstrap.com">Twitter Bootstrap</a>, adding a number of features and components.</p>
|
||||
<p class="lead">Jasny Bootstrap is an extension to <a href="http://getbootstrap.com">vanilla Bootstrap</a>, adding a number of features and components.</p>
|
||||
<p>The aim of Jasny Bootstrap is to provide all the required features for building highly interactive web applications for desktop and mobile.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Delivered as extension only</h4>
|
||||
<p>As of version 3.1.0 Jasny Bootstrap is no longer bundeled with Twitter Bootstrap. You should load Twitter Bootstrap's CSS before this extension.</p>
|
||||
<p>As of version 3.1.0 Jasny Bootstrap is no longer bundled with vanilla Bootstrap. You should load vanilla Bootstrap's CSS before this extension.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,7 +91,7 @@ jasny-bootstrap/
|
||||
|
||||
<p>This is the most basic form of Jasny Bootstrap. We provide compiled CSS and JS (<code>jasny-bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>jasny-bootstrap.min.*</code>).</p>
|
||||
|
||||
<p>The <code>jasny-bootstrap.*</code> files should be loaded in conjunction with the original Twitter Bootstrap files.</p>
|
||||
<p>The <code>jasny-bootstrap.*</code> files should be loaded in conjunction with the original vanilla Bootstrap files.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger" id="jquery-required">
|
||||
<h4>jQuery required</h4>
|
||||
@@ -305,7 +305,7 @@ jasny-bootstrap/
|
||||
<p>Other changes in v3.0 are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our <em>mobile first</em> approach. Here's a partial list:</p>
|
||||
<ul>
|
||||
<li>The fileupload plugin has been renamed to fileinput. File upload was poorly chosen, since the plugin allows the creation of a styled file input element. It has nothing to do with how the file is uploaded.</li>
|
||||
<li class="bs-jasny-only">Tab alignments are still supported in this fork (while dropped in Twitter Bootstrap).</li>
|
||||
<li class="bs-jasny-only">Tab alignments are still supported in this fork (while dropped in vanilla Bootstrap).</li>
|
||||
<li>Typeahead has been dropped, in favor of using <a href="http://brianreavis.github.io/selectize.js/">Selectize.js</a>.</li>
|
||||
<li>Iconic icons are still available from <a href="http://www.somerandomdude.com/work/open-iconic/">P.J. Onori</a>.</li>
|
||||
</ul>
|
||||
|
||||
@@ -6,7 +6,7 @@ title: Jasny Bootstrap
|
||||
<main class="bs-masthead" id="content" role="main">
|
||||
<div class="container">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p class="lead">The missing components for you favorite front-end framework.</p>
|
||||
<p class="lead">The missing components for your favorite front-end framework.</p>
|
||||
<p>
|
||||
<a href="{{ site.download.dist }}" class="btn btn-outline-inverse btn-lg" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}']);">Download</a>
|
||||
or <a href="{{ site.download.source }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }} source']);">Download source</a>
|
||||
|
||||
@@ -15,8 +15,8 @@ base_url: "../"
|
||||
</div>
|
||||
|
||||
<h3 id="js-individual-compiled">Individual or compiled</h3>
|
||||
<p>Plugins can be included individually (using Jasny Bootstrap's individual <code>*.js</code> files), or all at once (using <code>jasny-bootstrap.js</code> or the minified <code>jasn-bootstrap.min.js</code>).</p>
|
||||
<p>The Jasny Bootstrap plugins work with or without loading Twitter Bootstrap's <code>bootstrap.js</code>.</p>
|
||||
<p>Plugins can be included individually (using Jasny Bootstrap's individual <code>*.js</code> files), or all at once (using <code>jasny-bootstrap.js</code> or the minified <code>jasny-bootstrap.min.js</code>).</p>
|
||||
<p>The Jasny Bootstrap plugins work with or without loading vanilla Bootstrap's <code>bootstrap.js</code>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Do not attempt to include both.</h4>
|
||||
@@ -78,7 +78,7 @@ $('#myMenu').on('show.bs.offcanvas', function (e) {
|
||||
</div>
|
||||
|
||||
<h2 id="offcanvas-examples">Example</h2>
|
||||
<p>The offcanvas plugin allows you to hide an element from sight and than show it by moving either that or any other element. It's intented to be used for off canvas navigation, like push menus.</p>
|
||||
<p>The offcanvas plugin allows you to hide an element from sight and than show it by moving either that or any other element. It's intended to be used for off canvas navigation, like push menus.</p>
|
||||
<div class="bs-example bs-navmenu-offcanvas-example">
|
||||
<div id="myNavmenuCanvas">
|
||||
<nav id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-left offcanvas" role="navigation">
|
||||
@@ -119,7 +119,7 @@ $('#myMenu').on('show.bs.offcanvas', function (e) {
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Examples</h4>
|
||||
<p>For better understanding, have a look at the <a href="../examples/navmenu/">off canvas slide in menu</a>, <a href="../examples/navmenu-push/">off canvas push menu</a> and <a href="../examples/navmenu-reveal/">off canvas reveal menu</a> exapmles.</p>
|
||||
<p>For better understanding, have a look at the <a href="../examples/navmenu/">off canvas slide in menu</a>, <a href="../examples/navmenu-push/">off canvas push menu</a> and <a href="../examples/navmenu-reveal/">off canvas reveal menu</a> examples.</p>
|
||||
</div>
|
||||
|
||||
<hr class="bs-docs-separator">
|
||||
|
||||
@@ -6,14 +6,15 @@
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var btoa = require('btoa');
|
||||
var fs = require('fs');
|
||||
|
||||
function getFiles(type, subdirs, exclude) {
|
||||
var files = {};
|
||||
exclude = exclude || [];
|
||||
|
||||
subdirs.forEach(function(subdir) {
|
||||
|
||||
subdirs.forEach(function (subdir) {
|
||||
var sub = subdir ? subdir + '/' : '';
|
||||
fs.readdirSync(type + '/' + sub)
|
||||
.filter(function (path) {
|
||||
@@ -24,6 +25,7 @@ function getFiles(type, subdirs, exclude) {
|
||||
files[sub + path] = fs.readFileSync(fullPath, 'utf8');
|
||||
});
|
||||
});
|
||||
|
||||
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as th
|
||||
This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var canonicallyJsonStringify = require('canonical-json');
|
||||
var NON_CANONICAL_FILE = 'npm-shrinkwrap.json';
|
||||
var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json';
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"disallowKeywords": ["with"],
|
||||
"requireLeftStickedOperators": [","],
|
||||
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
||||
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"requireRightStickedOperators": ["!"],
|
||||
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
||||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
||||
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"validateLineBreaks": "LF"
|
||||
}
|
||||
43
js/.jscsrc
Normal file
43
js/.jscsrc
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"disallowEmptyBlocks": true,
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMixedSpacesAndTabs": true,
|
||||
"disallowMultipleLineStrings": true,
|
||||
"disallowMultipleVarDecl": true,
|
||||
"disallowQuotedKeysInObjects": "allButReserved",
|
||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
||||
"disallowSpaceBeforeBinaryOperators": [","],
|
||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
|
||||
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
|
||||
"disallowSpacesInsideArrayBrackets": true,
|
||||
"disallowSpacesInsideParentheses": true,
|
||||
"disallowTrailingComma": true,
|
||||
"disallowTrailingWhitespace": true,
|
||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
||||
"requireCapitalizedConstructors": true,
|
||||
"requireCommaBeforeLineBreak": true,
|
||||
"requireDollarBeforejQueryAssignment": true,
|
||||
"requireDotNotation": true,
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"requirePaddingNewLinesAfterUseStrict": true,
|
||||
"requirePaddingNewLinesBeforeExport": true,
|
||||
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
||||
"requireSpaceAfterLineComment": true,
|
||||
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||
"requireSpaceBetweenArguments": true,
|
||||
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
|
||||
"requireSpacesInConditionalExpression": true,
|
||||
"requireSpacesInForStatement": true,
|
||||
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
||||
"validateAlignedFunctionParameters": true,
|
||||
"validateIndentation": 2,
|
||||
"validateLineBreaks": "LF",
|
||||
"validateNewlineAfterArrayElements": true,
|
||||
"validateQuoteMarks": "'"
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
var Fileinput = function (element, options) {
|
||||
this.$element = $(element)
|
||||
|
||||
|
||||
this.$input = this.$element.find(':file')
|
||||
if (this.$input.length === 0) return
|
||||
|
||||
@@ -42,31 +42,32 @@
|
||||
if (this.$preview.css('display') !== 'inline' && height !== '0px' && height !== 'none') {
|
||||
this.$preview.css('line-height', height)
|
||||
}
|
||||
|
||||
|
||||
this.original = {
|
||||
exists: this.$element.hasClass('fileinput-exists'),
|
||||
preview: this.$preview.html(),
|
||||
hiddenVal: this.$hidden.val()
|
||||
}
|
||||
|
||||
|
||||
this.listen()
|
||||
}
|
||||
|
||||
|
||||
Fileinput.prototype.listen = function() {
|
||||
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
|
||||
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
|
||||
|
||||
|
||||
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
|
||||
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
|
||||
},
|
||||
|
||||
Fileinput.prototype.change = function(e) {
|
||||
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files
|
||||
|
||||
|
||||
e.stopPropagation()
|
||||
|
||||
if (files.length === 0) {
|
||||
this.clear()
|
||||
this.$element.trigger('clear.bs.fileinput')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -85,12 +86,12 @@
|
||||
var $img = $('<img>')
|
||||
$img[0].src = re.target.result
|
||||
files[0].result = re.target.result
|
||||
|
||||
|
||||
element.find('.fileinput-filename').text(file.name)
|
||||
|
||||
|
||||
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
|
||||
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
|
||||
|
||||
|
||||
preview.html($img)
|
||||
element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
@@ -101,22 +102,22 @@
|
||||
} else {
|
||||
this.$element.find('.fileinput-filename').text(file.name)
|
||||
this.$preview.text(file.name)
|
||||
|
||||
|
||||
this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
|
||||
this.$element.trigger('change.bs.fileinput')
|
||||
}
|
||||
},
|
||||
|
||||
Fileinput.prototype.clear = function(e) {
|
||||
if (e) e.preventDefault()
|
||||
|
||||
|
||||
this.$hidden.val('')
|
||||
this.$hidden.attr('name', this.name)
|
||||
this.$input.attr('name', '')
|
||||
|
||||
//ie8+ doesn't support changing the value of input with type=file so clone instead
|
||||
if (isIE) {
|
||||
if (isIE) {
|
||||
var inputClone = this.$input.clone(true);
|
||||
this.$input.after(inputClone);
|
||||
this.$input.remove();
|
||||
@@ -128,7 +129,7 @@
|
||||
this.$preview.html('')
|
||||
this.$element.find('.fileinput-filename').text('')
|
||||
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
|
||||
if (e !== undefined) {
|
||||
this.$input.trigger('change')
|
||||
this.$element.trigger('clear.bs.fileinput')
|
||||
@@ -144,7 +145,7 @@
|
||||
|
||||
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
|
||||
this.$element.trigger('reset.bs.fileinput')
|
||||
},
|
||||
|
||||
@@ -153,12 +154,12 @@
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILEUPLOAD PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
var old = $.fn.fileinput
|
||||
|
||||
|
||||
$.fn.fileinput = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
@@ -187,7 +188,7 @@
|
||||
var $this = $(this)
|
||||
if ($this.data('bs.fileinput')) return
|
||||
$this.fileinput($this.data())
|
||||
|
||||
|
||||
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
|
||||
if ($target.length > 0) {
|
||||
e.preventDefault()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* ===========================================================
|
||||
* Bootstrap: inputmask.js v3.1.0
|
||||
* http://jasny.github.io/bootstrap/javascript/#inputmask
|
||||
*
|
||||
*
|
||||
* Based on Masked Input plugin by Josh Bush (digitalbush.com)
|
||||
* ===========================================================
|
||||
* Copyright 2012-2014 Arnold Daniels
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
var Inputmask = function (element, options) {
|
||||
if (isAndroid) return // No support because caret positioning doesn't work on Android
|
||||
|
||||
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, Inputmask.DEFAULTS, options)
|
||||
this.mask = String(this.options.mask)
|
||||
|
||||
|
||||
this.init()
|
||||
this.listen()
|
||||
|
||||
|
||||
this.checkVal() //Perform initial check for existing values
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var defs = this.options.definitions
|
||||
var len = this.mask.length
|
||||
|
||||
this.tests = []
|
||||
this.tests = []
|
||||
this.partialPosition = this.mask.length
|
||||
this.firstNonMaskPos = null
|
||||
|
||||
@@ -85,11 +85,11 @@
|
||||
}).join('')
|
||||
}, this))
|
||||
}
|
||||
|
||||
|
||||
Inputmask.prototype.listen = function() {
|
||||
if (this.$element.attr("readonly")) return
|
||||
|
||||
var pasteEventName = (isIE ? 'paste' : 'input') + ".mask"
|
||||
var pasteEventName = (isIE ? 'paste' : 'input') + ".bs.inputmask"
|
||||
|
||||
this.$element
|
||||
.on("unmask.bs.inputmask", $.proxy(this.unmask, this))
|
||||
@@ -129,19 +129,19 @@
|
||||
end = begin + range.text.length
|
||||
}
|
||||
return {
|
||||
begin: begin,
|
||||
begin: begin,
|
||||
end: end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Inputmask.prototype.seekNext = function(pos) {
|
||||
var len = this.mask.length
|
||||
while (++pos <= len && !this.tests[pos]);
|
||||
|
||||
return pos
|
||||
}
|
||||
|
||||
|
||||
Inputmask.prototype.seekPrev = function(pos) {
|
||||
while (--pos >= 0 && !this.tests[pos]);
|
||||
|
||||
@@ -185,13 +185,13 @@
|
||||
|
||||
Inputmask.prototype.unmask = function() {
|
||||
this.$element
|
||||
.unbind(".mask")
|
||||
.removeData("inputmask")
|
||||
.unbind(".bs.inputmask")
|
||||
.removeData("bs.inputmask")
|
||||
}
|
||||
|
||||
Inputmask.prototype.focusEvent = function() {
|
||||
this.focusText = this.$element.val()
|
||||
var len = this.mask.length
|
||||
var len = this.mask.length
|
||||
var pos = this.checkVal()
|
||||
this.writeBuffer()
|
||||
|
||||
@@ -209,8 +209,10 @@
|
||||
|
||||
Inputmask.prototype.blurEvent = function() {
|
||||
this.checkVal()
|
||||
if (this.$element.val() !== this.focusText)
|
||||
if (this.$element.val() !== this.focusText) {
|
||||
this.$element.trigger('change')
|
||||
this.$element.trigger('input')
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.keydownEvent = function(e) {
|
||||
@@ -321,17 +323,17 @@
|
||||
return (this.partialPosition ? i : this.firstNonMaskPos)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// INPUTMASK PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
var old = $.fn.inputmask
|
||||
|
||||
|
||||
$.fn.inputmask = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.inputmask')
|
||||
|
||||
|
||||
if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options)))
|
||||
})
|
||||
}
|
||||
|
||||
141
js/offcanvas.js
141
js/offcanvas.js
@@ -27,17 +27,19 @@
|
||||
this.options = $.extend({}, OffCanvas.DEFAULTS, options)
|
||||
this.state = null
|
||||
this.placement = null
|
||||
|
||||
|
||||
if (this.options.recalc) {
|
||||
this.calcClone()
|
||||
$(window).on('resize', $.proxy(this.recalc, this))
|
||||
}
|
||||
|
||||
if (this.options.autohide)
|
||||
$(document).on('click', $.proxy(this.autohide, this))
|
||||
|
||||
if (this.options.autohide && !this.options.modal) {
|
||||
var eventName = (navigator.userAgent.match(/(iPad|iPhone)/i) === null) ? 'click' : 'touchstart'
|
||||
$(document).on('click touchstart', $.proxy(this.autohide, this))
|
||||
}
|
||||
|
||||
if (this.options.toggle) this.toggle()
|
||||
|
||||
|
||||
if (this.options.disablescrolling) {
|
||||
this.options.disableScrolling = this.options.disablescrolling
|
||||
delete this.options.disablescrolling
|
||||
@@ -49,7 +51,8 @@
|
||||
placement: 'auto',
|
||||
autohide: true,
|
||||
recalc: true,
|
||||
disableScrolling: true
|
||||
disableScrolling: true,
|
||||
modal: false
|
||||
}
|
||||
|
||||
OffCanvas.prototype.offset = function () {
|
||||
@@ -60,38 +63,38 @@
|
||||
case 'bottom': return this.$element.outerHeight()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OffCanvas.prototype.calcPlacement = function () {
|
||||
if (this.options.placement !== 'auto') {
|
||||
this.placement = this.options.placement
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (!this.$element.hasClass('in')) {
|
||||
this.$element.css('visiblity', 'hidden !important').addClass('in')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var horizontal = $(window).width() / this.$element.width()
|
||||
var vertical = $(window).height() / this.$element.height()
|
||||
|
||||
|
||||
var element = this.$element
|
||||
function ab(a, b) {
|
||||
if (element.css(b) === 'auto') return a
|
||||
if (element.css(a) === 'auto') return b
|
||||
|
||||
|
||||
var size_a = parseInt(element.css(a), 10)
|
||||
var size_b = parseInt(element.css(b), 10)
|
||||
|
||||
|
||||
return size_a > size_b ? b : a
|
||||
}
|
||||
|
||||
|
||||
this.placement = horizontal >= vertical ? ab('left', 'right') : ab('top', 'bottom')
|
||||
|
||||
|
||||
if (this.$element.css('visibility') === 'hidden !important') {
|
||||
this.$element.removeClass('in').css('visiblity', '')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OffCanvas.prototype.opposite = function (placement) {
|
||||
switch (placement) {
|
||||
case 'top': return 'bottom'
|
||||
@@ -100,18 +103,18 @@
|
||||
case 'right': return 'left'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OffCanvas.prototype.getCanvasElements = function() {
|
||||
// Return a set containing the canvas plus all fixed elements
|
||||
var canvas = this.options.canvas ? $(this.options.canvas) : this.$element
|
||||
|
||||
|
||||
var fixed_elements = canvas.find('*').filter(function() {
|
||||
return $(this).css('position') === 'fixed'
|
||||
}).not(this.options.exclude)
|
||||
|
||||
|
||||
return canvas.add(fixed_elements)
|
||||
}
|
||||
|
||||
|
||||
OffCanvas.prototype.slide = function (elements, offset, callback) {
|
||||
// Use jQuery animation if CSS transitions aren't supported
|
||||
if (!$.support.transition) {
|
||||
@@ -122,15 +125,15 @@
|
||||
|
||||
var placement = this.placement
|
||||
var opposite = this.opposite(placement)
|
||||
|
||||
|
||||
elements.each(function() {
|
||||
if ($(this).css(placement) !== 'auto')
|
||||
$(this).css(placement, (parseInt($(this).css(placement), 10) || 0) + offset)
|
||||
|
||||
|
||||
if ($(this).css(opposite) !== 'auto')
|
||||
$(this).css(opposite, (parseInt($(this).css(opposite), 10) || 0) - offset)
|
||||
})
|
||||
|
||||
|
||||
this.$element
|
||||
.one($.support.transition.end, callback)
|
||||
.emulateTransitionEnd(350)
|
||||
@@ -138,33 +141,42 @@
|
||||
|
||||
OffCanvas.prototype.disableScrolling = function() {
|
||||
var bodyWidth = $('body').width()
|
||||
var prop = 'padding-' + this.opposite(this.placement)
|
||||
var prop = 'padding-right'
|
||||
|
||||
if ($('body').data('offcanvas-style') === undefined) {
|
||||
$('body').data('offcanvas-style', $('body').attr('style') || '')
|
||||
}
|
||||
|
||||
|
||||
$('body').css('overflow', 'hidden')
|
||||
|
||||
if ($('body').width() > bodyWidth) {
|
||||
var padding = parseInt($('body').css(prop), 10) + $('body').width() - bodyWidth
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
$('body').css(prop, padding)
|
||||
}, 1)
|
||||
}
|
||||
//disable scrolling on mobiles (they ignore overflow:hidden)
|
||||
$('body').on('touchmove.bs', function(e) {
|
||||
if (!$(event.target).closest('.offcanvas').length)
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
OffCanvas.prototype.enableScrolling = function() {
|
||||
$('body').off('touchmove.bs');
|
||||
}
|
||||
|
||||
OffCanvas.prototype.show = function () {
|
||||
if (this.state) return
|
||||
|
||||
|
||||
var startEvent = $.Event('show.bs.offcanvas')
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
this.state = 'slide-in'
|
||||
this.calcPlacement();
|
||||
|
||||
|
||||
var elements = this.getCanvasElements()
|
||||
var placement = this.placement
|
||||
var opposite = this.opposite(placement)
|
||||
@@ -184,12 +196,13 @@
|
||||
$(this).css(placement, 0)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if (this.options.disableScrolling) this.disableScrolling()
|
||||
|
||||
if (this.options.modal) this.toggleBackdrop()
|
||||
|
||||
var complete = function () {
|
||||
if (this.state != 'slide-in') return
|
||||
|
||||
|
||||
this.state = 'slid'
|
||||
|
||||
elements.removeClass('canvas-sliding').addClass('canvas-slid')
|
||||
@@ -217,22 +230,26 @@
|
||||
|
||||
var complete = function () {
|
||||
if (this.state != 'slide-out') return
|
||||
|
||||
|
||||
this.state = null
|
||||
this.placement = null
|
||||
|
||||
|
||||
this.$element.removeClass('in')
|
||||
|
||||
|
||||
elements.removeClass('canvas-sliding')
|
||||
elements.add(this.$element).add('body').each(function() {
|
||||
$(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style')
|
||||
$(this).style = $(this).data('offcanvas-style')
|
||||
$(this).removeData('offcanvas-style')
|
||||
})
|
||||
|
||||
this.$element.trigger('hidden.bs.offcanvas')
|
||||
}
|
||||
|
||||
if (this.options.disableScrolling) this.enableScrolling()
|
||||
if (this.options.modal) this.toggleBackdrop()
|
||||
|
||||
elements.removeClass('canvas-slid').addClass('canvas-sliding')
|
||||
|
||||
|
||||
setTimeout($.proxy(function() {
|
||||
this.slide(elements, offset, $.proxy(complete, this))
|
||||
}, this), 1)
|
||||
@@ -243,6 +260,46 @@
|
||||
this[this.state === 'slid' ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
OffCanvas.prototype.toggleBackdrop = function (callback) {
|
||||
callback = callback || $.noop;
|
||||
if (this.state == 'slide-in') {
|
||||
var doAnimate = $.support.transition;
|
||||
|
||||
this.$backdrop = $('<div class="modal-backdrop fade" />')
|
||||
.insertAfter(this.$element);
|
||||
|
||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||
|
||||
this.$backdrop.addClass('in')
|
||||
this.$backdrop.on('click.bs', $.proxy(this.autohide, this))
|
||||
|
||||
doAnimate ?
|
||||
this.$backdrop
|
||||
.one($.support.transition.end, callback)
|
||||
.emulateTransitionEnd(150) :
|
||||
callback()
|
||||
} else if (this.state == 'slide-out' && this.$backdrop) {
|
||||
this.$backdrop.removeClass('in');
|
||||
$('body').off('touchmove.bs');
|
||||
var self = this;
|
||||
if ($.support.transition) {
|
||||
this.$backdrop
|
||||
.one($.support.transition.end, function() {
|
||||
self.$backdrop.remove();
|
||||
callback()
|
||||
self.$backdrop = null;
|
||||
})
|
||||
.emulateTransitionEnd(150);
|
||||
} else {
|
||||
this.$backdrop.remove();
|
||||
this.$backdrop = null;
|
||||
callback();
|
||||
}
|
||||
} else if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
OffCanvas.prototype.calcClone = function() {
|
||||
this.$calcClone = this.$element.clone()
|
||||
.html('')
|
||||
@@ -252,21 +309,23 @@
|
||||
|
||||
OffCanvas.prototype.recalc = function () {
|
||||
if (this.$calcClone.css('display') === 'none' || (this.state !== 'slid' && this.state !== 'slide-in')) return
|
||||
|
||||
|
||||
this.state = null
|
||||
this.placement = null
|
||||
var elements = this.getCanvasElements()
|
||||
|
||||
|
||||
this.$element.removeClass('in')
|
||||
|
||||
|
||||
elements.removeClass('canvas-slid')
|
||||
elements.add(this.$element).add('body').each(function() {
|
||||
$(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
OffCanvas.prototype.autohide = function (e) {
|
||||
if ($(e.target).closest(this.$element).length === 0) this.hide()
|
||||
var target = $(e.target);
|
||||
if (!target.hasClass('dropdown-backdrop') && $(e.target).closest(this.$element).length === 0) this.hide()
|
||||
}
|
||||
|
||||
// OFFCANVAS PLUGIN DEFINITION
|
||||
@@ -303,12 +362,12 @@
|
||||
$(document).on('click.bs.offcanvas.data-api', '[data-toggle=offcanvas]', function (e) {
|
||||
var $this = $(this), href
|
||||
var target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
var $canvas = $(target)
|
||||
var data = $canvas.data('bs.offcanvas')
|
||||
var option = data ? 'toggle' : $this.data()
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
|
||||
if (data) data.toggle()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var Rowlink = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, Rowlink.DEFAULTS, options)
|
||||
|
||||
|
||||
this.$element.on('click.bs.rowlink', 'td:not(.rowlink-skip)', $.proxy(this.click, this))
|
||||
}
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
Rowlink.prototype.click = function(e) {
|
||||
var target = $(e.currentTarget).closest('tr').find(this.options.target)[0]
|
||||
if ($(e.target)[0] === target) return
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
if (target.click) {
|
||||
target.click()
|
||||
} else if (document.createEvent) {
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
target.dispatchEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ROWLINK PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
@@ -76,11 +76,11 @@
|
||||
|
||||
$(document).on('click.bs.rowlink.data-api', '[data-link="row"]', function (e) {
|
||||
if ($(e.target).closest('.rowlink-skip').length !== 0) return
|
||||
|
||||
|
||||
var $this = $(this)
|
||||
if ($this.data('bs.rowlink')) return
|
||||
$this.rowlink($this.data())
|
||||
$(e.target).trigger('click.bs.rowlink')
|
||||
})
|
||||
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
@@ -15,6 +15,6 @@ $(function () {
|
||||
test('should return element', function () {
|
||||
ok($(document.body).fileinput()[0] == document.body, 'document.body returned')
|
||||
})
|
||||
|
||||
|
||||
// TODO: add fileinput tests
|
||||
})
|
||||
|
||||
@@ -15,6 +15,6 @@ $(function () {
|
||||
test('should return element', function () {
|
||||
ok($(document.body).offcanvas()[0] == document.body, 'document.body returned')
|
||||
})
|
||||
|
||||
|
||||
// TODO: add offcanvas tests
|
||||
})
|
||||
|
||||
@@ -15,6 +15,6 @@ $(function () {
|
||||
test('should return element', function () {
|
||||
ok($(document.body).rowlink()[0] == document.body, 'document.body returned')
|
||||
})
|
||||
|
||||
|
||||
// TODO: add rowlink tests
|
||||
})
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return false // explicit for ie8 ( ._.)
|
||||
}
|
||||
|
||||
if ($.support.transition !== undefined) return // Prevent conflict with Twitter Bootstrap
|
||||
if ($.support.transition !== undefined) return // Prevent conflict with vanilla Bootstrap
|
||||
|
||||
// http://blog.alexmaccaw.com/css-transitions
|
||||
$.fn.emulateTransitionEnd = function (duration) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// These mixins are used when Jasny Bootstrap is
|
||||
// built without importing Twitter Bootstrap.
|
||||
// built without importing vanilla Bootstrap.
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// These variables are used when Jasny Bootstrap is built
|
||||
// without importing Twitter Bootstrap.
|
||||
// without importing vanilla Bootstrap.
|
||||
// --------------------------------------------------------
|
||||
|
||||
//-- Colors
|
||||
@@ -69,6 +69,8 @@
|
||||
@zindex-navmenu-fixed: 1030;
|
||||
@zindex-alert-fixed: 1035;
|
||||
|
||||
@zindex-modal: 1050;
|
||||
|
||||
|
||||
//== Media queries breakpoints
|
||||
//
|
||||
|
||||
@@ -36,3 +36,7 @@
|
||||
.btn-xs .btn-label {
|
||||
.button-label-size(1px; 5px; @border-radius-small);
|
||||
}
|
||||
.btn-group > .btn:last-child:not(:first-child) .btn-label, .btn-group > .dropdown-toggle:not(:first-child) .btn-label {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
.fileinput-new .fileinput-exists {
|
||||
display: none;
|
||||
}
|
||||
|
||||
//close X button alignment
|
||||
.fileinput-exists.close {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.fileinput-inline .fileinput-controls {
|
||||
display: inline;
|
||||
}
|
||||
@@ -65,7 +71,7 @@
|
||||
|
||||
.fileinput.input-group {
|
||||
display: table;
|
||||
|
||||
|
||||
> * {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Twitter Bootstrap's "variables.less" should already be imported
|
||||
// Vanilla Bootstrap's "variables.less" should already be imported
|
||||
|
||||
// Core variables and mixins
|
||||
@import "variables.less";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
// Either Twitter Bootstrap's "variables.less" or this package's
|
||||
// Either vanilla Bootstrap's "variables.less" or this package's
|
||||
// "default-variables.less" should be loaded before this file.
|
||||
// -------------------------------------------------------------
|
||||
|
||||
@zindex-navmenu-fixed: 1030;
|
||||
@zindex-navmenu-fixed: @zindex-modal;
|
||||
@zindex-alert-fixed: 1035;
|
||||
|
||||
@container-smooth: @container-lg;
|
||||
|
||||
20
package.js
Normal file
20
package.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// package metadata file for Meteor.js
|
||||
|
||||
Package.describe({
|
||||
name: 'jasny:bootstrap', // http://atmospherejs.com/jasny/bootstrap
|
||||
version: '3.1.3',
|
||||
summary: 'Jasny Bootstrap (official): The missing components for your favorite front-end framework.',
|
||||
git: 'https://github.com/jasny/bootstrap.git',
|
||||
documentation: 'README.md'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
api.versionsFrom('METEOR@1.0');
|
||||
|
||||
api.use('jquery', 'client');
|
||||
|
||||
api.addFiles([
|
||||
'dist/css/jasny-bootstrap.css',
|
||||
'dist/js/jasny-bootstrap.js'
|
||||
], 'client');
|
||||
});
|
||||
42
package.json
42
package.json
@@ -2,6 +2,7 @@
|
||||
"name": "jasny-bootstrap",
|
||||
"description": "Additional features and components for Bootstrap",
|
||||
"version": "3.1.3",
|
||||
"main": "dist/jasny-bootstrap.js",
|
||||
"keywords": [
|
||||
"bootstrap",
|
||||
"css"
|
||||
@@ -20,35 +21,32 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/jasny/bootstrap/issues"
|
||||
},
|
||||
"license": {
|
||||
"type": "Apache-2.0",
|
||||
"url": "https://github.com/jasny/bootstrap/blob/master/LICENSE"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"btoa": "~1.1.1",
|
||||
"canonical-json": "~0.0.3",
|
||||
"grunt": "~0.4.2",
|
||||
"grunt-banner": "~0.2.0",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-concat": "~0.4.0",
|
||||
"grunt-contrib-connect": "~0.7.0",
|
||||
"grunt-contrib-copy": "~0.5.0",
|
||||
"grunt-contrib-csslint": "~0.2.0",
|
||||
"grunt-contrib-cssmin": "~0.9.0",
|
||||
"grunt-contrib-jade": "~0.11.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-less": "~0.11.0",
|
||||
"grunt-contrib-qunit": "~0.4.0",
|
||||
"grunt-contrib-uglify": "~0.4.0",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-banner": "~0.4.0",
|
||||
"grunt-contrib-clean": "~0.6.0",
|
||||
"grunt-contrib-concat": "~0.5.0",
|
||||
"grunt-contrib-connect": "~0.11.0",
|
||||
"grunt-contrib-copy": "~0.8.0",
|
||||
"grunt-contrib-csslint": "~0.5.0",
|
||||
"grunt-contrib-cssmin": "~0.13.0",
|
||||
"grunt-contrib-jade": "~0.15.0",
|
||||
"grunt-contrib-jshint": "~0.11.0",
|
||||
"grunt-contrib-less": "~1.0",
|
||||
"grunt-contrib-qunit": "~0.7.0",
|
||||
"grunt-contrib-uglify": "~0.9.0",
|
||||
"grunt-contrib-watch": "~0.6.0",
|
||||
"grunt-csscomb": "~2.0.1",
|
||||
"grunt-csscomb": "~3.0.0",
|
||||
"grunt-exec": "~0.4.2",
|
||||
"grunt-html-validation": "~0.1.13",
|
||||
"grunt-jekyll": "~0.4.1",
|
||||
"grunt-jscs-checker": "~0.4.0",
|
||||
"grunt-saucelabs": "~5.1.0",
|
||||
"grunt-text-replace": "~0.3.0",
|
||||
"load-grunt-tasks": "~0.4.0",
|
||||
"grunt-jscs": "~2.0.0",
|
||||
"grunt-saucelabs": "~8.6.0",
|
||||
"grunt-text-replace": "~0.4.0",
|
||||
"load-grunt-tasks": "~3.2",
|
||||
"markdown": "~0.5.0"
|
||||
},
|
||||
"jspm": {
|
||||
|
||||
@@ -36,3 +36,7 @@
|
||||
.btn-xs .btn-label {
|
||||
@include button-label-size(1px, 5px, $border-radius-small);
|
||||
}
|
||||
.btn-group > .btn:last-child:not(:first-child) .btn-label, .btn-group > .dropdown-toggle:not(:first-child) .btn-label {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
.fileinput-new .fileinput-exists {
|
||||
display: none;
|
||||
}
|
||||
|
||||
//close X button alignment
|
||||
.fileinput-exists.close {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.fileinput-inline .fileinput-controls {
|
||||
display: inline;
|
||||
}
|
||||
@@ -58,6 +64,8 @@
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.form-control .fileinput-filename {
|
||||
vertical-align: bottom;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
z-index: $zindex-navmenu-fixed;
|
||||
top: 0;
|
||||
border-radius: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.navmenu-fixed-left,
|
||||
.navbar-offcanvas.navmenu-fixed-left {
|
||||
@@ -30,7 +31,6 @@
|
||||
right: auto;
|
||||
border-width: 0 1px 0 0;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.navmenu-fixed-right,
|
||||
.navbar-offcanvas {
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.offcanvas {
|
||||
@include offcanvas;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-max) {
|
||||
.offcanvas-xs {
|
||||
@include offcanvas;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
// Either Twitter Bootstrap's "variables.less" or this package's
|
||||
// Either vanilla Bootstrap's "variables.less" or this package's
|
||||
// "default-variables.less" should be loaded before this file.
|
||||
// -------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// Twitter Bootstrap's "variables.scss" should already be imported
|
||||
// Vanilla Bootstrap's "variables.scss" should already be imported
|
||||
|
||||
// Core variables and mixins
|
||||
// Core variables
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
// Core CSS
|
||||
@import "grid-container-smooth";
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
from __future__ import absolute_import, unicode_literals, print_function, division
|
||||
|
||||
from sys import argv
|
||||
from os import environ, stat, remove as _delete_file
|
||||
from os.path import isfile, dirname, basename, abspath
|
||||
from hashlib import sha256
|
||||
from subprocess import check_call as run
|
||||
|
||||
from boto.s3.connection import S3Connection
|
||||
from boto.s3.key import Key
|
||||
from boto.exception import S3ResponseError
|
||||
|
||||
|
||||
NEED_TO_UPLOAD_MARKER = '.need-to-upload'
|
||||
BYTES_PER_MB = 1024 * 1024
|
||||
try:
|
||||
BUCKET_NAME = environ['TWBS_S3_BUCKET']
|
||||
except KeyError:
|
||||
raise SystemExit("TWBS_S3_BUCKET environment variable not set!")
|
||||
|
||||
|
||||
def _sha256_of_file(filename):
|
||||
hasher = sha256()
|
||||
with open(filename, 'rb') as input_file:
|
||||
hasher.update(input_file.read())
|
||||
file_hash = hasher.hexdigest()
|
||||
print('sha256({}) = {}'.format(filename, file_hash))
|
||||
return file_hash
|
||||
|
||||
|
||||
def _delete_file_quietly(filename):
|
||||
try:
|
||||
_delete_file(filename)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
|
||||
|
||||
def _tarball_size(directory):
|
||||
kib = stat(_tarball_filename_for(directory)).st_size // BYTES_PER_MB
|
||||
return "{} MiB".format(kib)
|
||||
|
||||
|
||||
def _tarball_filename_for(directory):
|
||||
return abspath('./{}.tar.gz'.format(basename(directory)))
|
||||
|
||||
|
||||
def _create_tarball(directory):
|
||||
print("Creating tarball of {}...".format(directory))
|
||||
run(['tar', '-czf', _tarball_filename_for(directory), '-C', dirname(directory), basename(directory)])
|
||||
|
||||
|
||||
def _extract_tarball(directory):
|
||||
print("Extracting tarball of {}...".format(directory))
|
||||
run(['tar', '-xzf', _tarball_filename_for(directory), '-C', dirname(directory)])
|
||||
|
||||
|
||||
def download(directory):
|
||||
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
|
||||
try:
|
||||
print("Downloading {} tarball from S3...".format(friendly_name))
|
||||
key.get_contents_to_filename(_tarball_filename_for(directory))
|
||||
except S3ResponseError as err:
|
||||
open(NEED_TO_UPLOAD_MARKER, 'a').close()
|
||||
print(err)
|
||||
raise SystemExit("Cached {} download failed!".format(friendly_name))
|
||||
print("Downloaded {}.".format(_tarball_size(directory)))
|
||||
_extract_tarball(directory)
|
||||
print("{} successfully installed from cache.".format(friendly_name))
|
||||
|
||||
|
||||
def upload(directory):
|
||||
_create_tarball(directory)
|
||||
print("Uploading {} tarball to S3... ({})".format(friendly_name, _tarball_size(directory)))
|
||||
key.set_contents_from_filename(_tarball_filename_for(directory))
|
||||
print("{} cache successfully updated.".format(friendly_name))
|
||||
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Uses environment variables:
|
||||
# AWS_ACCESS_KEY_ID -- AWS Access Key ID
|
||||
# AWS_SECRET_ACCESS_KEY -- AWS Secret Access Key
|
||||
argv.pop(0)
|
||||
if len(argv) != 4:
|
||||
raise SystemExit("USAGE: s3_cache.py <download | upload> <friendly name> <dependencies file> <directory>")
|
||||
mode, friendly_name, dependencies_file, directory = argv
|
||||
|
||||
conn = S3Connection()
|
||||
bucket = conn.lookup(BUCKET_NAME, validate=False)
|
||||
if bucket is None:
|
||||
raise SystemExit("Could not access bucket!")
|
||||
|
||||
dependencies_file_hash = _sha256_of_file(dependencies_file)
|
||||
|
||||
key = Key(bucket, dependencies_file_hash)
|
||||
key.storage_class = 'REDUCED_REDUNDANCY'
|
||||
|
||||
if mode == 'download':
|
||||
download(directory)
|
||||
elif mode == 'upload':
|
||||
if isfile(NEED_TO_UPLOAD_MARKER): # FIXME
|
||||
upload(directory)
|
||||
else:
|
||||
print("No need to upload anything.")
|
||||
else:
|
||||
raise SystemExit("Unrecognized mode {!r}".format(mode))
|
||||
Reference in New Issue
Block a user