Compare commits

..

116 Commits

Author SHA1 Message Date
Arnold Daniels
b2f72ebb89 Update README.md
Added badges
[skip ci]
2015-12-29 11:28:50 -04:00
Arnold Daniels
9b943de3f4 Merge pull request #426 from hisie/master
Modified composer to install as component when using symfony
2015-12-29 11:12:29 -04:00
Diego Cebrian
57ddc36d3e Modified composer to install as component when using symfony 2015-12-17 14:51:45 +01:00
Arnold Daniels
ade9f4826b Merge pull request #405 from mikezielonka/master
fixes issues #309
2015-12-05 16:57:56 -04:00
Arnold Daniels
4e27c63ca4 Merge pull request #409 from mkoryak/patch-1
add a main file to package.json
2015-12-05 16:55:10 -04:00
Arnold Daniels
92f54b29d6 Merge branch 'master' of github.com:jasny/bootstrap 2015-12-05 16:53:53 -04:00
Misha Koryak
c3e9a12870 add a main file to package.json
without a main, this lib does not work without shimming if you get it from npm
2015-09-15 16:59:45 -04:00
Mike Zielonka
e9505f2909 fixes issues #309
Full credit to @Akkuzin for the fix.
2015-08-20 00:02:18 -05:00
Arnold Daniels
2dc9cb4917 Merge pull request #393 from pbatey/master
fix csp warning about unsafe-inline style-src
2015-08-10 08:14:54 +02:00
Arnold Daniels
1684271a76 Merge pull request #330 from jesperronn/master
Fileinput: Close button should not have inline styles
2015-08-10 08:12:12 +02:00
Arnold Daniels
a0c9b1591d Merge pull request #401 from ShinyChang/master
Support iOS device
2015-08-10 08:10:32 +02:00
Shiny
b5bd1b1714 Support iOS device
1. iOS device does not fire click event if A without href.
2. iOS device does not fire click event if Element cursor is not
pointer.
2015-08-10 13:28:58 +08:00
Arnold Daniels
bafef3dcd9 Merge pull request #368 from dvc94ch/meteor-integration
Meteor integration.
2015-08-07 17:17:14 +02:00
Arnold Daniels
1c2fde09a0 Merge pull request #342 from brandoncc/patch-1
Fix typo
2015-08-07 17:16:13 +02:00
Arnold Daniels
71f8cbce12 Merge branch 'master' of github.com:jasny/bootstrap 2015-08-07 17:07:54 +02:00
Arnold Daniels
20aabdde44 Simplify travis build
Remove s3 cache from travis build
2015-08-07 17:07:15 +02:00
Arnold Daniels
12c88aaa00 Merge pull request #354 from Dehalion/master
trigger clear.bs.fileinput event if user cancels
2015-08-07 16:48:30 +02:00
Arnold Daniels
5779e70db7 Merge remote-tracking branch 'origin/master'
Conflicts:
	js/wizard.js
2015-08-07 16:45:40 +02:00
Arnold Daniels
4408405009 Merge pull request #346 from ipoval/whitespace-gardening
[whitespace gardening] - rm trailing whitespaces
2015-08-07 16:43:47 +02:00
Arnold Daniels
51f8c89ac8 Using latest packages for grunt
Renamed jscs.json to jscsrc
Fixed styling errors in build js files
2015-08-07 16:41:05 +02:00
Arnold Daniels
61c769a626 Revert "Added Wizard component (not yet documented)"
This reverts commit f96d55965a.
2015-08-07 16:22:53 +02:00
Arnold Daniels
e8b4cca929 Removed bower dependencies.
Fixes #394

Added bootstrap as dev-dependency
Removed jQuery dependency

People might use the SASS instead of LESS and/or might use the CSS only and not the JavaScript
2015-08-07 16:21:30 +02:00
Arnold Daniels
0efdeef8d4 Merge pull request #397 from asessa/patch-1
Fix fileinput-filename
2015-08-07 16:09:12 +02:00
Arnold Daniels
8a3ffced0b Merge pull request #376 from kkirsche/patch-1
Remove moot `version` property from bower.json
2015-08-07 16:08:24 +02:00
Arnold Daniels
843c8241e7 Travis Run npm install 2015-08-07 15:34:51 +02:00
Arnold Daniels
49a7ece11e Ignore bower_components 2015-08-07 15:34:51 +02:00
Bas Bosman
b02b71c0e6 Update javascript.html 2015-08-07 15:34:51 +02:00
hinnerk
dd49087566 silent html5 validation problems
- deprecation notice of w3 service causes build to fail (upstream issue: https://github.com/praveenvijayan/grunt-html-validation/issues/76)
- should ampersand be escaped in url parameters? opinions differ; current practice in docs is not to escape URL parameter ampersands, and this need not cause the build to fail
2015-08-07 15:34:51 +02:00
hinnerk
95da80b103 remove duplicate box-shadow from docs #carbonads 2015-08-07 15:34:51 +02:00
Andrea Sessa
a79b8f14d3 Fix fileinput-filename 2015-07-16 16:22:00 +02:00
pbatey
c8523caf13 fix csp warning about unsafe-inline style-src
Showing and hiding an off-canvas menu with content-security-policy enabled (via ember-cli) results in the following~

    [Report Only] Refused to apply inline style because it violates the following Content Security Policy directive~

Changing the way that OffCanvas.hide() restors the style addresses this warning. e.g., `$(this).attr('style', ...)`~

For more information about content-security-policy, see http://content-security-policy.com/.
2015-07-10 14:07:57 -06:00
Kevin Kirsche
7e5ab5d7f5 Remove moot version property from bower.json
Per bower/bower.json-spec@a325da3

Also their maintainer says they probably won't ever use it: http://stackoverflow.com/questions/24844901/bowers-bower-json-file-version-property
2015-06-11 21:18:51 -04:00
David Craven
0628cee6d7 Meteor integration. 2015-05-16 15:22:56 +02:00
Dehalion
cb97fb59be trigger clear.bs.fileinput event if user cancels
this.clear() expects the event object as parameter otherwise it won't trigger the 'clear.bs.fileinput' event
so we have to trigger it ourselves
2015-03-23 15:23:42 +01:00
Dehalion
ff935c396c give e as parameter for this.clear()
this.clear() expects the event object as parameter if it is triggered by the user
otherwise it won't trigger the 'clear.bs.fileinput' event
2015-03-23 15:10:21 +01:00
Ivan Povalyukhin
283e237cee [whitespace gardening] - rm trailing whitespaces 2015-03-01 13:45:55 -08:00
Brandon Conway
3e0aefdf90 Fix typo 2015-02-16 01:46:54 -08:00
Arnold Daniels
f96d55965a Added Wizard component (not yet documented) 2015-02-11 18:10:21 +01:00
Arnold Daniels
7b28b14c80 Docs: Replaced AboutMe with carbonads
CSS fix docs home page
2015-01-23 11:24:07 +01:00
Arnold Daniels
75b0c88693 Merge pull request #332 from eneveu/master
Fix small typo in the website
2015-01-15 15:48:01 +01:00
Etienne Neveu
1a2bb62b5f Fix small typo
"jasn-bootstrap.min.js" --> "jasny-bootstrap.min.js"
2015-01-15 14:59:29 +01:00
Jesper Rønn-Jensen
d79f5c17bc Fileinput: Close button should not have inline styles
This addition to the `.fileinput.close` element makes it
possible to remove inline style as seen in the documentation.

Specifically, I could remove `style="float:none"` based on this change.
2015-01-12 11:28:14 +01:00
Arnold Daniels
5925040bf2 Merge pull request #329 from samuelscheid/master
Fix jasny/bootstrap#279
2014-12-31 17:43:36 +01:00
samuelscheid
30b22685cd Fix jasny/bootstrap#279
Sass port turned declaration into mixin, without leaving the declaration. Added the declaration back in.
2014-12-31 11:34:58 -05:00
Arnold Daniels
828bdbf4d2 Merge pull request #322 from Kronuz/patch-1
Navmenu on the right with scrollbar
2014-12-27 11:59:40 +01:00
Germán M. Bravo
f37278b371 Navmenu on the right with scrollbar
Offcanvas navmenu fixed to the right had no overflow-y, so no scrollbars where shown
2014-12-01 08:44:14 -06:00
Arnold Daniels
02c281bbf0 Merge pull request #303 from jodytate/patch-1
typo: spelling fix for 'intended'
2014-10-09 00:38:30 +02:00
jody tate
9dc14167d1 typo: spelling fix for 'intended' 2014-10-07 10:30:55 -07:00
Arnold Daniels
72d948a8eb Merge pull request #286 from cvrebert/master
"Twitter Bootstrap" is now simply "Bootstrap"
2014-08-11 21:01:31 +02:00
Chris Rebert
6c47ebecf6 "Twitter Bootstrap" is now simply "Bootstrap"
See http://getbootstrap.com/about/#brand
Changed references to "Twitter Bootstrap" to "vanilla Bootstrap" or just "Bootstrap".
2014-08-11 10:04:50 -07:00
Chris Rebert
9e1d6be08e update requirement in composer.json
twitter/bootstrap => twbs/bootstrap
2014-08-11 09:57:34 -07:00
Arnold Daniels
1dc7d44daf Merge pull request #285 from daftspunk/patch-1
Allow touching in the offcanvas area
2014-08-07 23:21:52 +02:00
Samuel Georges
54a950138d Allow touching in the offcanvas area 2014-08-07 20:37:43 +10:00
Arnold Daniels
45fbc321e9 Improved README
Added CDNJS
Replace JS Bin with JSFiddle
2014-07-24 03:44:51 +02:00
Arnold Daniels
c5a39941e0 Fixed download link and bower instructions in README 2014-07-24 03:37:28 +02:00
Arnold Daniels
31c575c568 Merge branch 'master' of github.com:jasny/bootstrap 2014-07-24 01:20:50 +02:00
Arnold Daniels
071b04b16f Merge pull request #276 from arekkas/patch-3
Sass: Solves an issue with groups and rounded borders
2014-07-20 21:51:47 +02:00
Arnold Daniels
758d5f2a06 Merge pull request #277 from arekkas/patch-2
Less: Solves an issue with groups and rounded borders
2014-07-20 21:50:43 +02:00
Arnold Daniels
1d5a7589b8 Merge pull request #274 from arekkas/patch-1
Removed scss import of non existing mixin
2014-07-20 21:48:45 +02:00
arekkas
ca19e02b17 Sass: Solves an issue with groups and rounded borders 2014-07-20 16:20:10 +02:00
arekkas
b000850500 Less: Solves an issue with groups and rounded borders 2014-07-20 16:20:04 +02:00
arekkas
2bc3e6f3dc See #231 2014-07-17 11:35:00 +02:00
Arnold Daniels
574034791d Merge pull request #269 from mente/modal
Offcanvas: prevent scrolling on mobiles + modal option
2014-07-03 09:10:00 +02:00
Alex Vasilenko
dded81671a hide menu on backdrop click 2014-07-02 16:44:22 +03:00
Alex Vasilenko
473a741ede prevent scrolling on mobiles
modal backdrop option for offcanvas
2014-07-02 14:22:46 +03:00
Arnold Daniels
02d43b36d0 Merge pull request #261 from tjagusz/master
fix for #252 - input with input maske doesn't get updated
2014-06-27 12:58:03 +02:00
Tomek
fe25e85e40 Update inputmask.js
input event to support bootstrapvalidator
2014-06-24 12:56:23 +02:00
Arnold Daniels
0b812a49f8 Merge pull request #259 from voidmain02/master
Fixed event namespace naming issue in inputmask
2014-06-20 14:03:43 +02:00
Alexander Zheltov
ea757e46e9 Fixed event namespace naming issue in inputmask 2014-06-20 12:06:53 +06:00
Arnold Daniels
a5fd93a7e2 Merge pull request #258 from voidmain02/master
Fixed Inputmask.unmask
2014-06-18 10:34:19 +02:00
Alexander Zheltov
fb643bdb6f Fixed Inputmask.unmask
`inputmask` was replaced by `bs.inputmask`
2014-06-18 12:01:27 +06:00
Arnold Daniels
912f10f1cf Added flattr buttons.
Show your love, give some flattr!
2014-05-30 00:42:34 +02:00
Arnold Daniels
27f6a5b3f9 Typo fix in docs 2014-05-10 15:17:09 +02:00
Arnold Daniels
c3948a744b Always add padding to the right for body offcanvas.disableScrolling 2014-05-06 08:20:39 +02:00
Arnold Daniels
f4705f17fc Rebuild customize.min.js 2014-05-06 05:57:04 +02:00
Arnold Daniels
c12018a0bd Fixed unit test for inputmask 2014-05-06 05:33:31 +02:00
Arnold Daniels
1dfd002bba Fixed jshint 2014-05-06 05:09:07 +02:00
Arnold Daniels
04e4586372 Build new release 2014-05-06 04:58:34 +02:00
Arnold Daniels
c6541bfe45 Merge remote-tracking branch 'origin/master' 2014-05-06 04:58:01 +02:00
Arnold Daniels
73f80614b6 Fixed customizer. Fixes #233
Bump version to 3.1.3
2014-05-06 04:56:26 +02:00
Arnold Daniels
1e90ae4779 Change input mask character for alphanumeric to w.
Change docs for inputmask.
Fixes #237
2014-05-06 03:23:08 +02:00
Arnold Daniels
a088dad1c7 Handle undefined body style in OffCanvas.disableScrolling(). Fixes #214 2014-05-06 03:16:44 +02:00
Arnold Daniels
2712c97e85 Removed mixins.less from jasny-bootstrap.less 2014-05-06 03:06:09 +02:00
Arnold Daniels
d7c2eb8c91 Merge pull request #239 from phaseOne/patch-2
.navmenu height fix
2014-05-05 00:14:20 +02:00
Arnold Daniels
3c3274093a Minor changes 2014-05-04 03:31:02 +02:00
Evan Bovie
662c5e2b3a .navmenu height fix
The `.navmenu` height needs to be set to `auto` in order to allow the `top` and `bottom` values to properly work. The `top` value works fine, but the `bottom` value is rendered inert because the `height: 100%` causes the `.navmenu` to overflow down through the viewport.
2014-05-03 09:34:13 -04:00
Arnold Daniels
e86f72dd03 Merge pull request #232 from phaseOne/patch-2
Scrolling for both navmenu-fixed-left and navmenu-fixed-right
2014-04-23 00:51:06 +02:00
Evan Bovie
46c665f161 Scrolling for both navmenu-fixed-left and navmenu-fixed-right 2014-04-22 18:14:30 -04:00
Arnold Daniels
9fd67af87c Removed import mixins.less. Fixed #231 2014-04-22 15:56:32 +02:00
Arnold Daniels
10b81be776 Fixed incorrect version number specified for required Twitter Bootstrap 2014-04-19 19:05:33 +02:00
Arnold Daniels
e822b1b3bf Build v3.1.2 2014-04-19 18:25:38 +02:00
Arnold Daniels
285689081d Use window.jQuery in transition.js 2014-04-19 16:43:27 +02:00
Arnold Daniels
1001ad214d Fixed broken rowlink caused by check on .rowlink-skip. Fixed #221
Thanks @cervengoc
2014-04-19 16:42:25 +02:00
Arnold Daniels
249cb84f6b Updated npm packages 2014-04-19 16:38:06 +02:00
Arnold Daniels
660e376b96 Replace grunt-sed with grunt-text-replace
Set version to 3.1.2
2014-04-19 16:31:53 +02:00
Arnold Daniels
e919330916 Added transitions support check. Fixes #213
This is required to run Jasny Bootrstap standalone.
2014-04-19 16:09:41 +02:00
Arnold Daniels
24f8bffbaf Offcanvas option disablescrolling (lowercase) as alias of disableScrolling (camel cased). Fixes #219 2014-04-19 15:15:46 +02:00
Arnold Daniels
e5b9930599 Don't trigger fileinput.change when fileinput.clear is called manually. Fixes #216
Insert fileinput <input type="hidden"> right before <input type="file">. Fixes #215
Clean up less and scss comment
2014-04-19 15:10:23 +02:00
Arnold Daniels
8fd9aca993 Updated scss for earlier changes
- Move mixins taken from Twitter Bootstrap to build dir.
 - Removed the transformation for file input altogether.
2014-04-16 14:32:12 +02:00
Arnold Daniels
0038dd8c9f Merge origin/master 2014-04-16 13:37:21 +02:00
Arnold Daniels
27794ba4e3 Removed the transformation for file input al together. Should test of this works correctly for IE and Opera. 2014-04-16 13:37:08 +02:00
Arnold Daniels
9e28a9b2bc Move mixins taken from Twitter Bootstrap to build dir. Fixed #221
Move button-label mixin to button-labels.less.
2014-04-13 16:36:59 +02:00
Arnold Daniels
18116c5cd3 Merge pull request #218 from joshjb84/master
Fix to naming in inputmask.js and added some inputmask tests
2014-04-06 22:10:54 +02:00
joshjb84
2336197e3a Fix to naming in inputmask.js and tests
Changed the name of Input.DEFAULS to Input.DEFAULTS and added unit tests
around how the options are set up.
2014-04-05 19:10:24 +08:00
Arnold Daniels
ee5a80a6c3 Merge pull request #208 from inbep/master
adding scss files
2014-03-30 14:15:56 +02:00
Sergio
4dc46204b4 adding scss files 2014-03-28 12:40:26 -03:00
Arnold Daniels
d5d4c5bd62 Build Bootstrap v3.1.1 2014-03-28 03:46:35 +01:00
Arnold Daniels
626d773366 stop propagation for file input, input element. Fixes #182 2014-03-28 03:25:36 +01:00
Arnold Daniels
a8a87b1958 Use var files instead of setting e.target.files for file input. Fixes #163 (thanks to @ducman) 2014-03-28 02:50:53 +01:00
Arnold Daniels
3769a8a8fc Don't transform .btn-file > input for Firefox and do set width and height to 100%. Fixes #157 2014-03-28 02:39:14 +01:00
Arnold Daniels
1640650604 Only preview gif, png and jpeg images. Fixes #181 2014-03-28 01:04:48 +01:00
Arnold Daniels
4c53740597 Merge origin/master 2014-03-28 00:24:56 +01:00
Arnold Daniels
ca1145ca0b Don't trigger rowlink initiasation when a element within .rowlink-skip is clicked. Fixes #162 2014-03-28 00:22:10 +01:00
Arnold Daniels
d87bea51c2 Added docs task to gruntfile 2014-03-27 22:40:54 +01:00
Arnold Daniels
e9a6df2cbd Merge pull request #206 from wardley/master
allow vertical scroll for navmenu-fixed-left.
2014-03-27 11:32:22 +01:00
Wardley Pogijanto
90b09cb3f8 allow vertical scroll for navmenu-fixed-left.
[jasny/boostrap#202]
2014-03-27 14:01:13 +11:00
77 changed files with 1677 additions and 899 deletions

1
.gitignore vendored
View File

@@ -38,4 +38,5 @@ validation-status.json
validation-report.json
# Folders to ignore
bower_components
node_modules

View File

@@ -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

View File

@@ -1,8 +1,8 @@
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Jasny Bootstrap's Gruntfile
* http://jasny.github.io/bootstrap
* Copyright 2013-2014 Arnold Daniels.
* Licensed under Apache License 2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
*/
module.exports = function (grunt) {
@@ -64,7 +64,7 @@ module.exports = function (grunt) {
jscs: {
options: {
config: 'js/.jscs.json',
config: 'js/.jscsrc'
},
grunt: {
src: ['Gruntfile.js', 'grunt/*.js']
@@ -98,6 +98,7 @@ module.exports = function (grunt) {
},
bootstrap: {
src: [
'js/transition.js',
'js/offcanvas.js',
'js/rowlink.js',
'js/inputmask.js',
@@ -255,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: {
@@ -275,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 \\&amp;.\\)'
]
},
files: {
@@ -298,14 +301,16 @@ module.exports = function (grunt) {
}
},
sed: {
replace: {
versionNumber: {
pattern: (function () {
var old = grunt.option('oldver');
return old ? RegExp.quote(old) : old;
})(),
replacement: grunt.option('newver'),
recursive: true
src: ['*.js', '*.md', '*.json', '*.yml', 'js/*.js'],
overwrite: true,
replacements: [
{
from: grunt.option('oldver'),
to: grunt.option('newver')
}
]
}
},
@@ -332,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']);
@@ -373,11 +378,11 @@ 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!
grunt.registerTask('change-version-number', 'sed');
grunt.registerTask('change-version-number', 'replace');
// task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
@@ -388,6 +393,6 @@ module.exports = function (grunt) {
});
// Task for updating the npm packages used by the Travis build.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']);
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', 'update-shrinkwrap']);
grunt.registerTask('∆update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); });
};

View File

@@ -1,6 +1,6 @@
# [Jasny Bootstrap](http://jasny.github.io/bootstrap/) [![Build Status](https://secure.travis-ci.org/jasny/bootstrap.png)](http://travis-ci.org/jasny/bootstrap)[![devDependency Status](https://david-dm.org/jasny/bootstrap/dev-status.png)](https://david-dm.org/jasny/bootstrap#info=devDependencies)
# [Jasny Bootstrap](http://jasny.github.io/bootstrap/) ![Bower](https://img.shields.io/bower/v/jasny-bootstrap.svg) [![Build Status](https://secure.travis-ci.org/jasny/bootstrap.png)](http://travis-ci.org/jasny/bootstrap) [![Join the chat at https://gitter.im/jasny/bootstrap](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](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.__

View File

@@ -19,13 +19,13 @@ exclude:
- "vendor"
# Custom vars
current_version: 3.1.0
current_version: 3.1.3
repo: https://github.com/jasny/bootstrap
download:
source: https://github.com/jasny/bootstrap/archive/v3.1.0.zip
dist: https://github.com/jasny/bootstrap/releases/download/v3.1.0/jasny-bootstrap-3.1.0-dist.zip
source: https://github.com/jasny/bootstrap/archive/v3.1.3.zip
dist: https://github.com/jasny/bootstrap/releases/download/v3.1.3/jasny-bootstrap-3.1.3-dist.zip
cdn:
css: //cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.0/css/jasny-bootstrap.min.css
js: //cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.0/js/jasny-bootstrap.min.js
css: //cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css
js: //cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js

View File

@@ -1,6 +1,5 @@
{
"name": "jasny-bootstrap",
"version": "3.1.0",
"main": [
"./dist/css/jasny-bootstrap.css",
"./dist/js/jasny-bootstrap.js"
@@ -14,8 +13,8 @@
"docs",
"js/tests"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
"dependencies": { },
"devDependencies": {
"bootstrap": ">= 3.1.0"
}
}

View File

@@ -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.0.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"
]
}
}
}

View File

@@ -1,6 +1,6 @@
/*!
* Jasny Bootstrap v3.1.1 (http://jasny.github.io/bootstrap)
* Copyright 2012-2014 Arnold Daniels
* Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap)
* Copyright 2012-2015 Arnold Daniels
* Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
*/
@@ -60,42 +60,10 @@
left: auto;
border-radius: 0 2px 2px 0;
}
.dropdown-menu .dropdown {
position: relative;
}
.dropdown-menu .dropdown > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
}
.dropdown-menu .dropdown > a:after {
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
content: " ";
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
}
.dropdown-menu .dropdown.pull-left {
float: none;
}
.dropdown-menu .dropdown.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
.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;
@@ -177,7 +145,7 @@
.navmenu,
.navbar-offcanvas {
width: 300px;
height: 100%;
height: auto;
border-style: solid;
border-width: 1px;
border-radius: 4px;
@@ -187,7 +155,9 @@
.navbar-offcanvas {
position: fixed;
top: 0;
z-index: 1030;
bottom: 0;
z-index: 1050;
overflow-y: auto;
border-radius: 0;
}
.navmenu-fixed-left,
@@ -558,14 +528,13 @@
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
margin: 0;
font-size: 23px;
cursor: pointer;
filter: alpha(opacity=0);
opacity: 0;
-webkit-transform: translate(-300px, 0) scale(4);
transform: translate(-300px, 0) scale(4);
direction: ltr;
}
@@ -612,6 +581,13 @@
.fileinput.input-group {
display: table;
}
.fileinput.input-group > * {
position: relative;
z-index: 2;
}
.fileinput.input-group > .btn-file {
z-index: 1;
}
.fileinput-new.input-group .btn-file,
.fileinput-new .input-group .btn-file {
border-radius: 0 4px 4px 0;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
/*!
* Jasny Bootstrap v3.1.1 (http://jasny.github.io/bootstrap)
* Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap)
* Copyright 2012-2014 Arnold Daniels
* Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
*/
@@ -7,7 +7,58 @@
if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScript requires jQuery') }
/* ========================================================================
* Bootstrap: offcanvas.js v3.1.1
* Bootstrap: transition.js v3.1.3
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
if ($.support.transition !== undefined) return // Prevent conflict with Twitter Bootstrap
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
})
}(window.jQuery);
/* ========================================================================
* Bootstrap: offcanvas.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#offcanvas
* ========================================================================
* Copyright 2013-2014 Arnold Daniels
@@ -45,6 +96,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$(document).on('click', $.proxy(this.autohide, this))
if (this.options.toggle) this.toggle()
if (this.options.disablescrolling) {
this.options.disableScrolling = this.options.disablescrolling
delete this.options.disablescrolling
}
}
OffCanvas.DEFAULTS = {
@@ -52,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 () {
@@ -143,8 +200,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
var bodyWidth = $('body').width()
var prop = 'padding-' + this.opposite(this.placement)
if ($('body').data('offcanvas-style') === undefined) $('body').data('offcanvas-style', $('body').attr('style'))
if ($('body').data('offcanvas-style') === undefined) {
$('body').data('offcanvas-style', $('body').attr('style') || '')
}
$('body').css('overflow', 'hidden')
if ($('body').width() > bodyWidth) {
@@ -154,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 () {
@@ -187,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
@@ -232,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() {
@@ -244,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('')
@@ -319,7 +429,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
}(window.jQuery);
/* ============================================================
* Bootstrap: rowlink.js v3.1.0
* Bootstrap: rowlink.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#rowlink
* ============================================================
* Copyright 2012-2014 Arnold Daniels
@@ -374,8 +484,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$.fn.rowlink = function (options) {
return this.each(function () {
var $this = $(this)
var data = $this.data('rowlink')
if (!data) $this.data('rowlink', (data = new Rowlink(this, options)))
var data = $this.data('bs.rowlink')
if (!data) $this.data('bs.rowlink', (data = new Rowlink(this, options)))
})
}
@@ -395,8 +505,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
// ==================
$(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('rowlink')) return
if ($this.data('bs.rowlink')) return
$this.rowlink($this.data())
$(e.target).trigger('click.bs.rowlink')
})
@@ -437,7 +549,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
if (isAndroid) return // No support because caret positioning doesn't work on Android
this.$element = $(element)
this.options = $.extend({}, Inputmask.DEFAULS, options)
this.options = $.extend({}, Inputmask.DEFAULTS, options)
this.mask = String(this.options.mask)
this.init()
@@ -446,13 +558,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
this.checkVal() //Perform initial check for existing values
}
Inputmask.DEFAULS = {
Inputmask.DEFAULTS = {
mask: "",
placeholder: "_",
definitions: {
'9': "[0-9]",
'a': "[A-Za-z]",
'?': "[A-Za-z0-9]",
'w': "[A-Za-z0-9]",
'*': "."
}
}
@@ -494,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))
@@ -590,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() {
@@ -614,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) {
@@ -735,9 +849,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$.fn.inputmask = function (options) {
return this.each(function () {
var $this = $(this)
var data = $this.data('inputmask')
var data = $this.data('bs.inputmask')
if (!data) $this.data('inputmask', (data = new Inputmask(this, options)))
if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options)))
})
}
@@ -758,14 +872,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) {
var $this = $(this)
if ($this.data('inputmask')) return
if ($this.data('bs.inputmask')) return
$this.inputmask($this.data())
})
}(window.jQuery);
/* ===========================================================
* Bootstrap: fileinput.js v3.1.1
* Bootstrap: fileinput.js v3.1.3
* http://jasny.github.com/bootstrap/javascript/#fileinput
* ===========================================================
* Copyright 2012-2014 Arnold Daniels
@@ -800,14 +914,15 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]')
if (this.$hidden.length === 0) {
this.$hidden = $('<input type="hidden" />')
this.$element.prepend(this.$hidden)
this.$hidden = $('<input type="hidden">').insertBefore(this.$input)
}
this.$preview = this.$element.find('.fileinput-preview')
var height = this.$preview.css('height')
if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height)
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(),
@@ -826,9 +941,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
},
Fileinput.prototype.change = function(e) {
if (e.target.files === undefined) e.target.files = e.target && e.target.value ? [ {name: e.target.value.replace(/^.+\\/, '')} ] : []
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files
e.stopPropagation()
if (e.target.files.length === 0) {
if (files.length === 0) {
this.clear()
return
}
@@ -837,17 +954,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
this.$hidden.attr('name', '')
this.$input.attr('name', this.name)
var file = e.target.files[0]
var file = files[0]
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
var reader = new FileReader()
var preview = this.$preview
var element = this.$element
reader.onload = function(re) {
var $img = $('<img>') // .attr('src', re.target.result)
var $img = $('<img>')
$img[0].src = re.target.result
e.target.files[0].result = re.target.result
files[0].result = re.target.result
element.find('.fileinput-filename').text(file.name)
@@ -857,7 +974,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
preview.html($img)
element.addClass('fileinput-exists').removeClass('fileinput-new')
element.trigger('change.bs.fileinput', e.target.files)
element.trigger('change.bs.fileinput', files)
}
reader.readAsDataURL(file)
@@ -892,14 +1009,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
this.$element.find('.fileinput-filename').text('')
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
if (e !== false) {
if (e !== undefined) {
this.$input.trigger('change')
this.$element.trigger('clear.bs.fileinput')
}
},
Fileinput.prototype.reset = function() {
this.clear(false)
this.clear()
this.$hidden.val(this.original.hiddenVal)
this.$preview.html(this.original.preview)
@@ -925,8 +1042,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$.fn.fileinput = function (options) {
return this.each(function () {
var $this = $(this),
data = $this.data('fileinput')
if (!data) $this.data('fileinput', (data = new Fileinput(this, options)))
data = $this.data('bs.fileinput')
if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options)))
if (typeof options == 'string') data[options]()
})
}
@@ -948,7 +1065,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScr
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var $this = $(this)
if ($this.data('fileinput')) return
if ($this.data('bs.fileinput')) return
$this.fileinput($this.data())
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');

File diff suppressed because one or more lines are too long

View File

@@ -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&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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
*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -183,9 +183,14 @@ window.onload = function () { // wait for load in a dumb way because B-0
return imports
}
function generateLESS(lessFilename, lessFileIncludes, vars) {
function generateLESS(lessFilename, lessFileIncludes, vars, additionalLessFiles) {
var lessSource = __less[lessFilename]
// Additional imports files, not present in less file, but required to build
$.each(additionalLessFiles || [], function(index, filename) {
lessSource += __less[filename]
})
$.each(includedLessFilenames(lessFilename), function(index, filename) {
var fileInclude = lessFileIncludes[filename]
@@ -197,7 +202,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
if (('build/default-variables.less' === filename) && vars) lessSource += generateCustomCSS(vars)
if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars)
})
lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports
@@ -206,7 +211,6 @@ window.onload = function () { // wait for load in a dumb way because B-0
function compileLESS(lessSource, baseFilename, intoResult) {
var parser = new less.Parser({
paths: ['build/default-variables.less', 'mixins.less'],
optimization: 0,
filename: baseFilename + '.css'
}).parse(lessSource, function (err, tree) {
@@ -239,7 +243,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
$(this).val() && (vars[$(this).prev().text()] = $(this).val())
})
var bsLessSource = generateLESS('jasny-bootstrap.less', lessFileIncludes, vars)
var bsLessSource = generateLESS('jasny-bootstrap.less', lessFileIncludes, vars,
['build/variables.less', 'build/mixins.less'])
try {
compileLESS(bsLessSource, 'jasny-bootstrap', result)

File diff suppressed because one or more lines are too long

View File

@@ -7,68 +7,6 @@ base_url: "../"
---
<!-- Multi level dropdowns
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="navmenu">Multi level dropdowns</h1>
</div>
<p>Use multiple levels with <a href="http://getbootstrap.com/components/#dropdowns" target="_blank">Bootstrap's dropdown component</a> by adding a <code>.dropdown</code> a <code>.dropdown-menu</code>.</p>
<div class="bs-example">
<div class="dropdown clearfix">
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu1" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a href="#">Some action</a></li>
<li><a href="#">Some other action</a></li>
<li class="divider"></li>
<li class="dropdown" data-toggle="dropdown">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level</a></li>
<li class="dropdown" data-toggle="dropdown">
<a href="#">Even more options</a>
<ul class="dropdown-menu">
<li><a href="#">3rd level</a></li>
<li><a href="#">Yet another action</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
{% highlight html %}
<div class="dropdown">
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu1" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a href="#">Some action</a></li>
<li><a href="#">Some other action</a></li>
<li class="divider"></li>
<li class="dropdown" data-toggle="dropdown">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level</a></li>
<li class="dropdown" data-toggle="dropdown">
<a href="#">Even more options</a>
<ul class="dropdown-menu">
<li><a href="#">3rd level</a></li>
<li><a href="#">Yet another action</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
{% endhighlight %}
</div>
<!-- Navmenu
================================================== -->
<div class="bs-docs-section">
@@ -235,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 %}

View File

@@ -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>
@@ -123,6 +123,12 @@ base_url: "../"
Off canvas
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="transition.js">
Transitions <small>(required for any kind of animation)</small>
</label>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,95 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.png">
<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="../../dist/css/jasny-bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="dropdown clearfix">
<button class="btn dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a href="#">Some action</a></li>
<li><a href="#">Some other action</a></li>
<li class="divider"></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown">More options</a>
<ul class="dropdown-menu">
<li><a href="#">Second level</a></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown">Even more options</a>
<ul class="dropdown-menu">
<li><a href="#">3rd level</a></li>
<li><a href="#">Yet another action</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="dropdown clearfix">
<button class="btn dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
Dropdown 2
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a href="#">Some action</a></li>
<li><a href="#">Some other action</a></li>
<li class="divider"></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown">More options</a>
<ul class="dropdown-menu">
<li><a href="#">Second level</a></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown">Even more options</a>
<ul class="dropdown-menu">
<li><a href="#">3rd level</a></li>
<li><a href="#">Yet another action</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- 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="../../../js/dropdown.js"></script>
<script src="../../dist/js/jasny-bootstrap.min.js"></script>
<script type="text/javascript">
$(document).on('hidden.bs.dropdown', '.dropdown', function(e) {
$(this).parents('[toggle=dropdown]').addClass('open')
});
</script>
</body>
</html>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 -->
@@ -41,7 +41,7 @@
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<ul class="dropdown-menu navmenu-nav">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
@@ -49,13 +49,6 @@
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">2nd level dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Subaction</a></li>
<li><a href="#">Another subaction</a></li>
</ul>
</li>
</ul>
</li>
</ul>
@@ -83,13 +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>
<script type="text/javascript">
$('.dropdown').on('hidden', function(e) {
alert(1);
});
</script>
</body>
</html>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>
@@ -60,7 +60,7 @@ $.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Boot
<h3 id="js-events">Events</h3>
<p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
<p>As of 3.0.0, all Bootstrap events are namespaced.</p>
<p>As of 3.1.2, all Bootstrap events are namespaced.</p>
<p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
{% highlight js %}
$('#myMenu').on('show.bs.offcanvas', function (e) {
@@ -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">
@@ -396,8 +396,9 @@ $('.inputmask').inputmask({
<tbody>
<tr><td>9</td><td>Number</td></tr>
<tr><td>a</td><td>Letter</td></tr>
<tr><td>?</td><td>Alphanumeric</td></tr>
<tr><td>w</td><td>Alphanumeric</td></tr>
<tr><td>*</td><td>Any character</td></tr>
<tr><td>?</td><td>Optional - any characters following will become optional</td></tr>
</tbody>
</table>
</div>

View File

@@ -6,19 +6,26 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var btoa = require('btoa');
var fs = require('fs');
function getFiles(type) {
function getFiles(type, subdirs, exclude) {
var files = {};
fs.readdirSync(type)
.filter(function (path) {
return new RegExp('\\.' + type + '$').test(path);
})
.forEach(function (path) {
var fullPath = type + (path === 'variables.less' ? '/build/' : '/') + path;
files[path] = fs.readFileSync(fullPath, 'utf8');
});
exclude = exclude || [];
subdirs.forEach(function (subdir) {
var sub = subdir ? subdir + '/' : '';
fs.readdirSync(type + '/' + sub)
.filter(function (path) {
return new RegExp('\\.' + type + '$').test(path) && exclude.indexOf(sub + path) === -1;
})
.forEach(function (path) {
var fullPath = type + '/' + sub + path;
files[sub + path] = fs.readFileSync(fullPath, 'utf8');
});
});
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
}
@@ -26,6 +33,6 @@ module.exports = function generateRawFilesJs(banner) {
if (!banner) {
banner = '';
}
var files = banner + getFiles('js') + getFiles('less');
var files = banner + getFiles('js', ['']) + getFiles('less', ['', 'build'], ['build/jasny-bootstrap.less']);
fs.writeFileSync('docs/assets/js/raw-files.min.js', files);
};

View File

@@ -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';

View File

@@ -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
View 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": "'"
}

View File

@@ -1,147 +0,0 @@
/* ========================================================================
* Bootstrap: dropdown.js v3.1.1
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle="dropdown"]'
var Dropdown = function (element) {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$parent
.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
$this.trigger('focus')
}
return false
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27)/.test(e.keyCode)) return
var $this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc = ' li:not(.divider):visible a'
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
if (!$items.length) return
var index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus')
}
function clearMenus(e) {
$(backdrop).remove()
$(toggle).each(function () {
var $parent = getParent($(this))
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
// DROPDOWN PLUGIN DEFINITION
// ==========================
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.dropdown')
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
}(jQuery);

View File

@@ -1,5 +1,5 @@
/* ===========================================================
* Bootstrap: fileinput.js v3.1.1
* Bootstrap: fileinput.js v3.1.3
* http://jasny.github.com/bootstrap/javascript/#fileinput
* ===========================================================
* Copyright 2012-2014 Arnold Daniels
@@ -26,7 +26,7 @@
var Fileinput = function (element, options) {
this.$element = $(element)
this.$input = this.$element.find(':file')
if (this.$input.length === 0) return
@@ -34,36 +34,40 @@
this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]')
if (this.$hidden.length === 0) {
this.$hidden = $('<input type="hidden" />')
this.$element.prepend(this.$hidden)
this.$hidden = $('<input type="hidden">').insertBefore(this.$input)
}
this.$preview = this.$element.find('.fileinput-preview')
var height = this.$preview.css('height')
if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height)
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) {
if (e.target.files === undefined) e.target.files = e.target && e.target.value ? [ {name: e.target.value.replace(/^.+\\/, '')} ] : []
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files
if (e.target.files.length === 0) {
e.stopPropagation()
if (files.length === 0) {
this.clear()
this.$element.trigger('clear.bs.fileinput')
return
}
@@ -71,49 +75,49 @@
this.$hidden.attr('name', '')
this.$input.attr('name', this.name)
var file = e.target.files[0]
var file = files[0]
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
var reader = new FileReader()
var preview = this.$preview
var element = this.$element
reader.onload = function(re) {
var $img = $('<img>') // .attr('src', re.target.result)
var $img = $('<img>')
$img[0].src = re.target.result
e.target.files[0].result = 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')
element.trigger('change.bs.fileinput', e.target.files)
element.trigger('change.bs.fileinput', files)
}
reader.readAsDataURL(file)
} 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();
@@ -125,15 +129,15 @@
this.$preview.html('')
this.$element.find('.fileinput-filename').text('')
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
if (e !== false) {
if (e !== undefined) {
this.$input.trigger('change')
this.$element.trigger('clear.bs.fileinput')
}
},
Fileinput.prototype.reset = function() {
this.clear(false)
this.clear()
this.$hidden.val(this.original.hiddenVal)
this.$preview.html(this.original.preview)
@@ -141,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')
},
@@ -150,17 +154,17 @@
e.preventDefault()
}
// FILEUPLOAD PLUGIN DEFINITION
// ===========================
var old = $.fn.fileinput
$.fn.fileinput = function (options) {
return this.each(function () {
var $this = $(this),
data = $this.data('fileinput')
if (!data) $this.data('fileinput', (data = new Fileinput(this, options)))
data = $this.data('bs.fileinput')
if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options)))
if (typeof options == 'string') data[options]()
})
}
@@ -182,9 +186,9 @@
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var $this = $(this)
if ($this.data('fileinput')) return
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()

View File

@@ -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,24 +30,24 @@
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.DEFAULS, options)
this.options = $.extend({}, Inputmask.DEFAULTS, options)
this.mask = String(this.options.mask)
this.init()
this.listen()
this.checkVal() //Perform initial check for existing values
}
Inputmask.DEFAULS = {
Inputmask.DEFAULTS = {
mask: "",
placeholder: "_",
definitions: {
'9': "[0-9]",
'a': "[A-Za-z]",
'?': "[A-Za-z0-9]",
'w': "[A-Za-z0-9]",
'*': "."
}
}
@@ -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,18 +323,18 @@
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('inputmask')
if (!data) $this.data('inputmask', (data = new Inputmask(this, options)))
var data = $this.data('bs.inputmask')
if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options)))
})
}
@@ -353,7 +355,7 @@
$(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) {
var $this = $(this)
if ($this.data('inputmask')) return
if ($this.data('bs.inputmask')) return
$this.inputmask($this.data())
})

View File

@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: offcanvas.js v3.1.1
* Bootstrap: offcanvas.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#offcanvas
* ========================================================================
* Copyright 2013-2014 Arnold Daniels
@@ -27,16 +27,23 @@
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
}
}
OffCanvas.DEFAULTS = {
@@ -44,7 +51,8 @@
placement: 'auto',
autohide: true,
recalc: true,
disableScrolling: true
disableScrolling: true,
modal: false
}
OffCanvas.prototype.offset = function () {
@@ -55,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'
@@ -95,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) {
@@ -117,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)
@@ -133,31 +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') || '')
}
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)
@@ -177,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')
@@ -210,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)
@@ -236,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('')
@@ -245,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
@@ -296,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()

View File

@@ -1,5 +1,5 @@
/* ============================================================
* Bootstrap: rowlink.js v3.1.0
* Bootstrap: rowlink.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#rowlink
* ============================================================
* Copyright 2012-2014 Arnold Daniels
@@ -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
// ===========================
@@ -54,8 +54,8 @@
$.fn.rowlink = function (options) {
return this.each(function () {
var $this = $(this)
var data = $this.data('rowlink')
if (!data) $this.data('rowlink', (data = new Rowlink(this, options)))
var data = $this.data('bs.rowlink')
if (!data) $this.data('bs.rowlink', (data = new Rowlink(this, options)))
})
}
@@ -75,10 +75,12 @@
// ==================
$(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('rowlink')) return
if ($this.data('bs.rowlink')) return
$this.rowlink($this.data())
$(e.target).trigger('click.bs.rowlink')
})
}(window.jQuery);

View File

@@ -15,6 +15,6 @@ $(function () {
test('should return element', function () {
ok($(document.body).fileinput()[0] == document.body, 'document.body returned')
})
// TODO: add fileinput tests
})

View File

@@ -1,6 +1,13 @@
$(function () {
module('inputmask')
var $input;
module('inputmask', {
setup : function() {
$input = $('<input type="text">').appendTo(document.body);
$input.removeData('inputmask');
}
})
test('should provide no conflict', function () {
var inputmask = $.fn.inputmask.noConflict()
@@ -9,12 +16,66 @@ $(function () {
})
test('should be defined on jquery object', function () {
ok($(document.body).inputmask, 'inputmask method is defined')
ok($input.inputmask, 'inputmask method is defined')
})
test('should return element', function () {
ok($(document.body).inputmask()[0] == document.body, 'document.body returned')
ok($input.inputmask()[0] == $input[0], 'input returned')
})
test('should use default mask', function() {
var expected = ""
$.fn.inputmask.Constructor.DEFAULTS.mask = expected
$input.inputmask()
equal(expected, $input.data('bs.inputmask').options.mask)
})
test('should use default placeholder', function() {
var expected = "_"
$.fn.inputmask.Constructor.DEFAULTS.placeholder = expected
$input.inputmask()
equal(expected, $input.data('bs.inputmask').options.placeholder)
})
test('should use default definitions', function() {
var expected = {
'0': "[0-9]",
'A': "[A-Za-z]"
}
$.fn.inputmask.Constructor.DEFAULTS.definitions = expected
$input.inputmask()
deepEqual(expected, $input.data('bs.inputmask').options.definitions)
})
test('should override mask when options.mask provided', function() {
var expected = '99-99';
$input.inputmask({ mask: expected})
equal(expected, $input.data('bs.inputmask').options.mask)
})
test('should override placeholder when options.placeholder provided', function() {
var expected = '-';
$input.inputmask({ placeholder: expected})
equal(expected, $input.data('bs.inputmask').options.placeholder)
})
test('should override definitions when options.definitions provided', function() {
var expected = {
'0': "[0-9]",
'A': "[A-Za-z]"
}
$input.inputmask({definitions: expected})
deepEqual(expected, $input.data('bs.inputmask').options.definitions)
})
// TODO: add inputmask tests
})

View File

@@ -15,6 +15,6 @@ $(function () {
test('should return element', function () {
ok($(document.body).offcanvas()[0] == document.body, 'document.body returned')
})
// TODO: add offcanvas tests
})

View File

@@ -15,6 +15,6 @@ $(function () {
test('should return element', function () {
ok($(document.body).rowlink()[0] == document.body, 'document.body returned')
})
// TODO: add rowlink tests
})

50
js/transition.js Normal file
View File

@@ -0,0 +1,50 @@
/* ========================================================================
* Bootstrap: transition.js v3.1.3
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
if ($.support.transition !== undefined) return // Prevent conflict with vanilla Bootstrap
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
})
}(window.jQuery);

View File

@@ -1,6 +1,6 @@
// Fixed alerts
//
// Position to the top or bottom.
// ------------------------------------------------
.alert-fixed-top,
.alert-fixed-bottom {

View File

@@ -1,4 +1,5 @@
// Jasny Bootstrap with default variables
@import "variables.less";
@import "mixins.less";
@import "../jasny-bootstrap.less";

61
less/build/mixins.less Normal file
View File

@@ -0,0 +1,61 @@
//
// These mixins are used when Jasny Bootstrap is
// built without importing vanilla Bootstrap.
// --------------------------------------------------
// CSS3 PROPERTIES
// --------------------------------------------------
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
// Drop shadows
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
.transition(@transition) {
-webkit-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
// Transition
.transition-property(@transition-property) {
-webkit-transition-property: @transition-property;
transition-property: @transition-property;
}
.transition-delay(@transition-delay) {
-webkit-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
.transition-duration(@transition-duration) {
-webkit-transition-duration: @transition-duration;
transition-duration: @transition-duration;
}
.transition-timing-function(@timing-function) {
-webkit-transition-timing-function: @timing-function;
transition-timing-function: @timing-function;
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}

View File

@@ -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
//

View File

@@ -1,6 +1,19 @@
// Labels for buttons
// --------------------------------------------------
.button-label-size(@padding-vertical; @padding-horizontal; @border-radius) {
padding: @padding-vertical @padding-horizontal;
left: (-1 * @padding-horizontal);
border-radius: (@border-radius - 1px) 0 0 (@border-radius - 1px);
&.btn-label-right {
left: auto;
right: (-1 * @padding-horizontal);
border-radius: 0 (@border-radius - 1px) (@border-radius - 1px) 0;
}
}
.btn-labeled {
padding-top: 0;
padding-bottom: 0;
@@ -23,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;
}

View File

@@ -1,54 +0,0 @@
// Dropdown-submenu.less
// Multi level dropdowns
//
// Based on work by Maks Surguy (https://twitter.com/msurguy)
// http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3
// ------------------------------------------------
.dropdown-menu .dropdown {
position: relative;
> .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
&.open > .dropdown-menu {
display: block;
}
> a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
&.open > a:after {
border-left-color: #fff;
}
&.pull-left {
float: none;
> .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
}
}

View File

@@ -13,10 +13,9 @@
margin: 0;
opacity: 0;
filter: alpha(opacity=0);
transform: translate(-300px, 0) scale(4);
-webkit-transform: translate(-300px, 0) scale(4);
font-size: 23px;
height: 100%;
width: 100%;
direction: ltr;
cursor: pointer;
}
@@ -51,6 +50,12 @@
.fileinput-new .fileinput-exists {
display: none;
}
//close X button alignment
.fileinput-exists.close {
float: none;
}
.fileinput-inline .fileinput-controls {
display: inline;
}
@@ -66,6 +71,14 @@
.fileinput.input-group {
display: table;
> * {
position: relative;
z-index: 2;
}
> .btn-file {
z-index: 1;
}
}
// Not 100% correct, but helps in typical use case

View File

@@ -1,15 +1,13 @@
// 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";
@import "mixins.less";
// Core CSS
@import "grid-container-smooth.less";
@import "button-labels.less";
// Components
@import "dropdown-submenu.less";
@import "nav-tab-alignment.less";
@import "navmenu.less";
@import "alerts-fixed.less";

View File

@@ -1,47 +0,0 @@
//
// Mixins
// --------------------------------------------------
// CSS3 PROPERTIES
// --------------------------------------------------
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
// Drop shadows
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
// BUTTONS
// --------------------------------------------------
.button-label-size(@padding-vertical; @padding-horizontal; @border-radius) {
padding: @padding-vertical @padding-horizontal;
left: (-1 * @padding-horizontal);
border-radius: (@border-radius - 1px) 0 0 (@border-radius - 1px);
&.btn-label-right {
left: auto;
right: (-1 * @padding-horizontal);
border-radius: 0 (@border-radius - 1px) (@border-radius - 1px) 0;
}
}

View File

@@ -1,4 +1,3 @@
//
// Navmenu and offcanvas navbar
// --------------------------------------------------
@@ -11,7 +10,7 @@
.navmenu,
.navbar-offcanvas {
width: @navmenu-width;
height: 100%;
height: auto;
border-width: 1px;
border-style: solid;
border-radius: @border-radius-base;
@@ -23,6 +22,8 @@
position: fixed;
z-index: @zindex-navmenu-fixed;
top: 0;
bottom: 0;
overflow-y: auto;
border-radius: 0;
}
.navmenu-fixed-left,

View File

@@ -1,4 +1,3 @@
//
// Off canvas navigation
// --------------------------------------------------

View File

@@ -1,4 +1,3 @@
//
// Rowlink
// --------------------------------------------------

View File

@@ -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
View 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');
});

View File

@@ -1,7 +1,8 @@
{
"name": "jasny-bootstrap",
"description": "Additional features and components for Bootstrap",
"version": "3.1.1",
"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.3.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.8.0",
"grunt-contrib-less": "~0.10.0",
"grunt-contrib-qunit": "~0.4.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-csscomb": "~2.0.1",
"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": "~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.0.0",
"grunt-sed": "~0.1.1",
"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": {

39
scss/_alerts-fixed.scss Normal file
View File

@@ -0,0 +1,39 @@
// Fixed alerts
// Position to the top or bottom.
// ------------------------------------------------
.alert-fixed-top,
.alert-fixed-bottom {
position: fixed;
width: 100%;
z-index: $zindex-alert-fixed;
border-radius: 0;
margin: 0;
left: 0;
@media (min-width: $alert-fixed-width) {
width: $alert-fixed-width;
left: 50%;
margin-left: (-1 * ($alert-fixed-width / 2));
}
}
.alert-fixed-top {
top: 0;
border-width: 0 0 1px 0;
@media (min-width: $alert-fixed-width) {
@include border-bottom-radius($alert-border-radius);
border-width: 0 1px 1px 1px;
}
}
.alert-fixed-bottom {
bottom: 0;
border-width: 1px 0 0 0;
@media (min-width: $alert-fixed-width) {
@include border-top-radius($alert-border-radius);
border-width: 1px 1px 0 1px;
}
}

42
scss/_button-labels.scss Normal file
View File

@@ -0,0 +1,42 @@
// Labels for buttons
// --------------------------------------------------
@mixin button-label-size($padding-vertical, $padding-horizontal, $border-radius) {
padding: $padding-vertical $padding-horizontal;
left: (-1 * $padding-horizontal);
border-radius: ($border-radius - 1px) 0 0 ($border-radius - 1px);
&.btn-label-right {
left: auto;
right: (-1 * $padding-horizontal);
border-radius: 0 ($border-radius - 1px) ($border-radius - 1px) 0;
}
}
.btn-labeled {
padding-top: 0;
padding-bottom: 0;
}
.btn-label {
position: relative;
background: transparent;
background: rgba(0, 0, 0, 0.15);
display: inline-block;
@include button-label-size($padding-base-vertical, $padding-base-horizontal, $border-radius-base);
}
.btn-lg .btn-label {
@include button-label-size($padding-large-vertical, $padding-large-horizontal, $border-radius-large);
}
.btn-sm .btn-label {
@include button-label-size($padding-small-vertical, $padding-small-horizontal, $border-radius-small);
}
.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;
}

122
scss/_fileinput.scss Normal file
View File

@@ -0,0 +1,122 @@
// Fileinput
// CSS for file upload button and fileinput widget
// ------------------------------------------------
.btn-file {
overflow: hidden;
position: relative;
vertical-align: middle;
> input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
filter: alpha(opacity=0);
font-size: 23px;
height: 100%;
width: 100%;
direction: ltr;
cursor: pointer;
}
}
.fileinput {
margin-bottom: 9px;
display: inline-block;
.form-control {
padding-top: 7px;
padding-bottom: 5px;
display: inline-block;
margin-bottom: 0px;
vertical-align: middle;
cursor: text;
}
.thumbnail {
overflow: hidden;
display: inline-block;
margin-bottom: 5px;
vertical-align: middle;
text-align: center;
> img {
max-height: 100%;
}
}
.btn {
vertical-align: middle;
}
}
.fileinput-exists .fileinput-new,
.fileinput-new .fileinput-exists {
display: none;
}
//close X button alignment
.fileinput-exists.close {
float: none;
}
.fileinput-inline .fileinput-controls {
display: inline;
}
.fileinput-filename {
vertical-align: middle;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.form-control .fileinput-filename {
vertical-align: bottom;
}
.fileinput.input-group {
display: table;
}
// Not 100% correct, but helps in typical use case
.fileinput-new.input-group .btn-file,
.fileinput-new .input-group .btn-file {
border-radius: 0 $border-radius-base $border-radius-base 0;
&.btn-xs,
&.btn-sm {
border-radius: 0 $border-radius-small $border-radius-small 0;
}
&.btn-lg {
border-radius: 0 $border-radius-large $border-radius-large 0;
}
}
.form-group.has-warning .fileinput {
.fileinput-preview {
color: $state-warning-text;
}
.thumbnail {
border-color: $state-warning-border;
}
}
.form-group.has-error .fileinput {
.fileinput-preview {
color: $state-danger-text;
}
.thumbnail {
border-color: $state-danger-border;
}
}
.form-group.has-success .fileinput {
.fileinput-preview {
color: $state-success-text;
}
.thumbnail {
border-color: $state-success-border;
}
}
// Input group fixes
.input-group-addon:not(:first-child) {
border-left: 0;
}

View File

@@ -0,0 +1,10 @@
// Smooth sizing container
// -------------------------
.container-smooth {
max-width: $container-lg;
@media (min-width: 1px) {
width: auto;
}
}

View File

@@ -0,0 +1,97 @@
// Alignment options
// -------------------------
// bottom
.nav-tabs-bottom {
border-bottom: 0;
border-top: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-top: -1px;
> a {
border-radius: 0 0 $border-radius-base $border-radius-base;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-top-color: transparent;
}
}
}
// left
.nav-tabs-left {
border-bottom: 0;
border-right: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-right: -1px;
float: none;
> a {
border-radius: $border-radius-base 0 0 $border-radius-base;
margin-right: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-right-color: transparent;
}
}
.row > & {
padding-right: 0;
padding-left: ($grid-gutter-width / 2);
margin-right: -1px;
position: relative;
z-index: 1;
& + .tab-content {
border-left: 1px solid $nav-tabs-active-link-hover-border-color;
}
}
}
// right
.nav-tabs-right {
border-bottom: 0;
border-left: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-left: -1px;
float: none;
> a {
border-radius: 0 $border-radius-base $border-radius-base 0;
margin-left: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-left-color: transparent;
}
}
.row > & {
padding-left: 0;
padding-right: ($grid-gutter-width / 2);
}
}

273
scss/_navmenu.scss Normal file
View File

@@ -0,0 +1,273 @@
// Navmenu and offcanvas navbar
// --------------------------------------------------
// Wrapper and base class
//
// Provide a static navmenu from which we expand to create the fixed navmenu
// variations.
.navmenu,
.navbar-offcanvas {
width: $navmenu-width;
height: 100%;
border-width: 1px;
border-style: solid;
border-radius: $border-radius-base;
}
.navmenu-fixed-left,
.navmenu-fixed-right,
.navbar-offcanvas {
position: fixed;
z-index: $zindex-navmenu-fixed;
top: 0;
border-radius: 0;
overflow-y: auto;
}
.navmenu-fixed-left,
.navbar-offcanvas.navmenu-fixed-left {
left: 0;
right: auto;
border-width: 0 1px 0 0;
bottom: 0;
}
.navmenu-fixed-right,
.navbar-offcanvas {
left: auto;
right: 0;
border-width: 0 0 0 1px;
}
.navmenu-nav {
margin-bottom: $navmenu-margin-vertical;
&.dropdown-menu {
position: static;
margin: 0;
padding-top: 0;
float: none;
border: none;
@include box-shadow(none);
border-radius: 0;
}
}
.navbar-offcanvas {
.navbar-nav {
margin: 0;
}
@media (min-width: $grid-float-breakpoint) {
width: auto;
border-top: 0;
box-shadow: none;
&.offcanvas {
position: static;
display: block !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
}
// Account for first and last children spacing
.navbar-nav.navbar-left:first-child {
margin-left: -$navbar-padding-horizontal;
}
.navbar-nav.navbar-right:last-child {
margin-right: -$navbar-padding-horizontal;
}
.navmenu-brand {
display: none;
}
}
}
// Brand/project name
.navmenu-brand {
display: block;
font-size: $font-size-large;
line-height: $line-height-computed;
padding: $nav-link-padding;
&:hover,
&:focus {
text-decoration: none;
}
margin: $navmenu-margin-vertical 0;
}
// Alternate navmenus
// --------------------------------------------------
// Default navmenu
.navmenu-default,
.navbar-default .navbar-offcanvas {
background-color: $navmenu-default-bg;
border-color: $navmenu-default-border;
.navmenu-brand {
color: $navmenu-default-brand-color;
&:hover,
&:focus {
color: $navmenu-default-brand-hover-color;
background-color: $navmenu-default-brand-hover-bg;
}
}
.navmenu-text {
color: $navmenu-default-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: $navmenu-default-link-hover-color;
border-bottom-color: $navmenu-default-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: $navmenu-default-link-active-bg;
color: $navmenu-default-link-active-color;
.caret {
border-top-color: $navmenu-default-link-active-color;
border-bottom-color: $navmenu-default-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: $navmenu-default-link-color;
border-bottom-color: $navmenu-default-link-color;
}
&.dropdown-menu {
background-color: $navmenu-default-link-active-bg;
& > .divider {
background-color: $navmenu-default-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken($navmenu-default-link-active-bg, 6.5%);
}
}
}
> li > a {
color: $navmenu-default-link-color;
&:hover,
&:focus {
color: $navmenu-default-link-hover-color;
background-color: $navmenu-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: $navmenu-default-link-active-color;
background-color: $navmenu-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: $navmenu-default-link-disabled-color;
background-color: $navmenu-default-link-disabled-bg;
}
}
}
}
// Inverse navmenu
.navmenu-inverse,
.navbar-inverse .navbar-offcanvas {
background-color: $navmenu-inverse-bg;
border-color: $navmenu-inverse-border;
.navmenu-brand {
color: $navmenu-inverse-brand-color;
&:hover,
&:focus {
color: $navmenu-inverse-brand-hover-color;
background-color: $navmenu-inverse-brand-hover-bg;
}
}
.navmenu-text {
color: $navmenu-inverse-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: $navmenu-inverse-link-hover-color;
border-bottom-color: $navmenu-inverse-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: $navmenu-inverse-link-active-bg;
color: $navmenu-inverse-link-active-color;
.caret {
border-top-color: $navmenu-inverse-link-active-color;
border-bottom-color: $navmenu-inverse-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: $navmenu-inverse-link-color;
border-bottom-color: $navmenu-inverse-link-color;
}
&.dropdown-menu {
background-color: $navmenu-inverse-link-active-bg;
& > .divider {
background-color: $navmenu-inverse-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken($navmenu-inverse-link-active-bg, 6.5%);
}
}
}
> li > a {
color: $navmenu-inverse-link-color;
&:hover,
&:focus {
color: $navmenu-inverse-link-hover-color;
background-color: $navmenu-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: $navmenu-inverse-link-active-color;
background-color: $navmenu-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: $navmenu-inverse-link-disabled-color;
background-color: $navmenu-inverse-link-disabled-bg;
}
}
}
}

52
scss/_offcanvas.scss Normal file
View File

@@ -0,0 +1,52 @@
// Off canvas navigation
// --------------------------------------------------
@mixin offcanvas {
display: none;
&.in {
display: block;
}
}
.offcanvas {
@include offcanvas;
}
@media (max-width: $screen-xs-max) {
.offcanvas-xs {
@include offcanvas;
}
}
@media (max-width: $screen-sm-max) {
.offcanvas-sm {
@include offcanvas;
}
}
@media (max-width: $screen-md-max) {
.offcanvas-md {
@include offcanvas;
}
}
.offcanvas-lg {
@include offcanvas;
}
.canvas-sliding {
-webkit-transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
}
.offcanvas-clone {
height: 0px !important;
width: 0px !important;
overflow: hidden !important;
border: none !important;
margin: 0px !important;
padding: 0px !important;
position: absolute !important;
top: auto !important;
left: auto !important;
bottom: 0px !important;
right: 0px !important;
opacity: 0 !important;
}

22
scss/_rowlink.scss Normal file
View File

@@ -0,0 +1,22 @@
// Rowlink
// --------------------------------------------------
.table.rowlink,
.table .rowlink {
td:not(.rowlink-skip) {
cursor: pointer;
a {
color: inherit;
font: inherit;
text-decoration: inherit;
}
}
}
.table-hover.rowlink,
.table-hover .rowlink {
tr:hover td {
background-color: darken($table-bg-hover, 15%);
}
}

66
scss/_variables.scss Normal file
View File

@@ -0,0 +1,66 @@
//
// Variables
//
// Either vanilla Bootstrap's "variables.less" or this package's
// "default-variables.less" should be loaded before this file.
// -------------------------------------------------------------
$zindex-navmenu-fixed: 1030 !default;
$zindex-alert-fixed: 1035 !default;
$container-smooth: $container-lg !default;
$alert-fixed-width: $screen-md-min !default;
//== Navmenu
// Basics of a navmenu
$navmenu-width: 300px !default;
$navmenu-margin-vertical: (0.5 * $line-height-computed) !default;
$navmenu-default-color: #777 !default;
$navmenu-default-bg: #f8f8f8 !default;
$navmenu-default-border: darken($navmenu-default-bg, 6.5%) !default;
// Navmenu links
$navmenu-default-link-color: #777 !default;
$navmenu-default-link-hover-color: #333 !default;
$navmenu-default-link-hover-bg: transparent !default;
$navmenu-default-link-active-color: #555 !default;
$navmenu-default-link-active-bg: darken($navmenu-default-bg, 6.5%) !default;
$navmenu-default-link-disabled-color: #ccc !default;
$navmenu-default-link-disabled-bg: transparent !default;
// Navmenu brand label
$navmenu-default-brand-color: $navmenu-default-link-color !default;
$navmenu-default-brand-hover-color: darken($navmenu-default-link-color, 10%) !default;
$navmenu-default-brand-hover-bg: transparent !default;
// Inverted navmenu
//
// Reset inverted navmenu basics
$navmenu-inverse-color: $gray-light !default;
$navmenu-inverse-bg: #222 !default;
$navmenu-inverse-border: darken($navmenu-inverse-bg, 10%) !default;
// Inverted navmenu links
$navmenu-inverse-link-color: $gray-light !default;
$navmenu-inverse-link-hover-color: #fff !default;
$navmenu-inverse-link-hover-bg: transparent !default;
$navmenu-inverse-link-active-color: $navmenu-inverse-link-hover-color !default;
$navmenu-inverse-link-active-bg: darken($navmenu-inverse-bg, 10%) !default;
$navmenu-inverse-link-disabled-color: #444 !default;
$navmenu-inverse-link-disabled-bg: transparent !default;
// Inverted navmenu brand label
$navmenu-inverse-brand-color: $navmenu-inverse-link-color !default;
$navmenu-inverse-brand-hover-color: #fff !default;
$navmenu-inverse-brand-hover-bg: transparent !default;
// Inverted navmenu search
// Normal navmenu needs no special styles or vars
$navmenu-inverse-search-bg: lighten($navmenu-inverse-bg, 25%) !default;
$navmenu-inverse-search-bg-focus: #fff !default;
$navmenu-inverse-search-border: $navmenu-inverse-bg !default;
$navmenu-inverse-search-placeholder-color: #ccc !default;

18
scss/jasny-bootstrap.scss Normal file
View File

@@ -0,0 +1,18 @@
// Vanilla Bootstrap's "variables.scss" should already be imported
// Core variables
@import "variables";
// Core CSS
@import "grid-container-smooth";
@import "button-labels";
// Components
@import "nav-tab-alignment";
@import "navmenu";
@import "alerts-fixed";
// Components w/ JavaScript
@import "offcanvas";
@import "rowlink";
@import "fileinput";

File diff suppressed because one or more lines are too long

View File

@@ -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))