sass-twitter-bootstrap 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +14 -0
- data/LICENSE +176 -0
- data/Makefile +94 -0
- data/README.md +217 -0
- data/Rakefile +52 -0
- data/bootstrap-2.0.4.css +4661 -0
- data/bootstrap-2.0.4.min.css +9 -0
- data/bootstrap-responsive-2.0.4.css +932 -0
- data/bootstrap-responsive-2.0.4.min.css +9 -0
- data/docs/assets/css/bootstrap-responsive.css +932 -0
- data/docs/assets/css/bootstrap.css +4661 -0
- data/docs/assets/css/docs.css +846 -0
- data/docs/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
- data/docs/assets/ico/favicon.ico +0 -0
- data/docs/assets/img/bird.png +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
- data/docs/assets/img/browsers.png +0 -0
- data/docs/assets/img/example-sites/fleetio.png +0 -0
- data/docs/assets/img/example-sites/jshint.png +0 -0
- data/docs/assets/img/example-sites/kippt.png +0 -0
- data/docs/assets/img/example-sites/soundready.png +0 -0
- data/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
- data/docs/assets/img/github-16px.png +0 -0
- data/docs/assets/img/glyphicons-halflings-white.png +0 -0
- data/docs/assets/img/glyphicons-halflings.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/docs/assets/img/grid-18px-masked.png +0 -0
- data/docs/assets/img/icon-css3.png +0 -0
- data/docs/assets/img/icon-github.png +0 -0
- data/docs/assets/img/icon-html5.png +0 -0
- data/docs/assets/img/icon-twitter.png +0 -0
- data/docs/assets/img/less-logo-large.png +0 -0
- data/docs/assets/img/less-small.png +0 -0
- data/docs/assets/img/responsive-illustrations.png +0 -0
- data/docs/assets/js/README.md +106 -0
- data/docs/assets/js/application.js +184 -0
- data/docs/assets/js/bootstrap-alert.js +90 -0
- data/docs/assets/js/bootstrap-button.js +96 -0
- data/docs/assets/js/bootstrap-carousel.js +169 -0
- data/docs/assets/js/bootstrap-collapse.js +157 -0
- data/docs/assets/js/bootstrap-dropdown.js +100 -0
- data/docs/assets/js/bootstrap-modal.js +218 -0
- data/docs/assets/js/bootstrap-popover.js +98 -0
- data/docs/assets/js/bootstrap-scrollspy.js +151 -0
- data/docs/assets/js/bootstrap-tab.js +135 -0
- data/docs/assets/js/bootstrap-tooltip.js +275 -0
- data/docs/assets/js/bootstrap-transition.js +61 -0
- data/docs/assets/js/bootstrap-typeahead.js +285 -0
- data/docs/assets/js/bootstrap.js +1825 -0
- data/docs/assets/js/bootstrap.min.js +6 -0
- data/docs/assets/js/google-code-prettify/prettify.css +30 -0
- data/docs/assets/js/google-code-prettify/prettify.js +28 -0
- data/docs/assets/js/jquery.js +9252 -0
- data/docs/base-css.html +1710 -0
- data/docs/build/index.js +44 -0
- data/docs/build/node_modules/.bin/hulk +93 -0
- data/docs/build/node_modules/hogan.js/.git_ignore +1 -0
- data/docs/build/node_modules/hogan.js/.gitmodules +3 -0
- data/docs/build/node_modules/hogan.js/LICENSE +177 -0
- data/docs/build/node_modules/hogan.js/Makefile +62 -0
- data/docs/build/node_modules/hogan.js/README.md +93 -0
- data/docs/build/node_modules/hogan.js/bin/hulk +93 -0
- data/docs/build/node_modules/hogan.js/lib/compiler.js +348 -0
- data/docs/build/node_modules/hogan.js/lib/hogan.js +20 -0
- data/docs/build/node_modules/hogan.js/lib/template.js +233 -0
- data/docs/build/node_modules/hogan.js/package.json +20 -0
- data/docs/build/node_modules/hogan.js/test/html/list.html +8 -0
- data/docs/build/node_modules/hogan.js/test/index.html +13 -0
- data/docs/build/node_modules/hogan.js/test/index.js +848 -0
- data/docs/build/node_modules/hogan.js/test/mustache.js +90 -0
- data/docs/build/node_modules/hogan.js/test/spec.js +77 -0
- data/docs/build/node_modules/hogan.js/test/spec/Changes +31 -0
- data/docs/build/node_modules/hogan.js/test/spec/README.md +65 -0
- data/docs/build/node_modules/hogan.js/test/spec/Rakefile +27 -0
- data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +46 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +103 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +158 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +230 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +193 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +109 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +256 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +149 -0
- data/docs/build/node_modules/hogan.js/test/templates/list.mustache +8 -0
- data/docs/build/node_modules/hogan.js/tools/release.js +74 -0
- data/docs/build/node_modules/hogan.js/tools/web_templates.js +32 -0
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +500 -0
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +14 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +500 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +14 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +545 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +576 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +576 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +572 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +619 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +233 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
- data/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
- data/docs/build/node_modules/hogan.js/web/index.html.mustache +139 -0
- data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +206 -0
- data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +236 -0
- data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +21 -0
- data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +21 -0
- data/docs/build/node_modules/hogan.js/wrappers/js.mustache +17 -0
- data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +64 -0
- data/docs/build/package.json +6 -0
- data/docs/components.html +1931 -0
- data/docs/download.html +454 -0
- data/docs/examples.html +147 -0
- data/docs/examples/fluid.html +162 -0
- data/docs/examples/hero.html +109 -0
- data/docs/examples/starter-template.html +79 -0
- data/docs/index.html +259 -0
- data/docs/javascript.html +1520 -0
- data/docs/less.html +1060 -0
- data/docs/scaffolding.html +671 -0
- data/docs/templates/layout.mustache +146 -0
- data/docs/templates/pages/base-css.mustache +1594 -0
- data/docs/templates/pages/components.mustache +1815 -0
- data/docs/templates/pages/download.mustache +338 -0
- data/docs/templates/pages/examples.mustache +31 -0
- data/docs/templates/pages/index.mustache +144 -0
- data/docs/templates/pages/javascript.mustache +1405 -0
- data/docs/templates/pages/less.mustache +944 -0
- data/docs/templates/pages/scaffolding.mustache +555 -0
- data/docs/templates/pages/upgrading.mustache +194 -0
- data/docs/upgrading.html +310 -0
- data/js/tests/index.html +54 -0
- data/js/tests/phantom.js +63 -0
- data/js/tests/server.js +14 -0
- data/js/tests/unit/bootstrap-alert.js +56 -0
- data/js/tests/unit/bootstrap-button.js +77 -0
- data/js/tests/unit/bootstrap-carousel.js +28 -0
- data/js/tests/unit/bootstrap-collapse.js +54 -0
- data/js/tests/unit/bootstrap-dropdown.js +87 -0
- data/js/tests/unit/bootstrap-modal.js +114 -0
- data/js/tests/unit/bootstrap-phantom.js +21 -0
- data/js/tests/unit/bootstrap-popover.js +93 -0
- data/js/tests/unit/bootstrap-scrollspy.js +31 -0
- data/js/tests/unit/bootstrap-tab.js +61 -0
- data/js/tests/unit/bootstrap-tooltip.js +155 -0
- data/js/tests/unit/bootstrap-transition.js +13 -0
- data/js/tests/unit/bootstrap-typeahead.js +148 -0
- data/js/tests/vendor/jquery.js +9252 -0
- data/js/tests/vendor/qunit.css +232 -0
- data/js/tests/vendor/qunit.js +1510 -0
- data/lib/sass-twitter-bootstrap.rb +9 -0
- data/lib/sass/twitter/bootstrap/rails.rb +14 -0
- data/lib/sass/twitter/bootstrap/version.rb +7 -0
- data/package.json +25 -0
- data/sass-twitter-bootstrap.gemspec +19 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/README.md +112 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +90 -0
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +96 -0
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +169 -0
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +157 -0
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +100 -0
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +218 -0
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +151 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +275 -0
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +61 -0
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +285 -0
- data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
- data/vendor/assets/stylesheets/tests/css-tests.css +52 -0
- data/vendor/assets/stylesheets/tests/css-tests.html +917 -0
- data/vendor/assets/stylesheets/tests/forms.html +179 -0
- data/vendor/assets/stylesheets/tests/navbar.html +108 -0
- data/vendor/assets/stylesheets/twitter/_accordion.scss +33 -0
- data/vendor/assets/stylesheets/twitter/_alerts.scss +58 -0
- data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +24 -0
- data/vendor/assets/stylesheets/twitter/_button-groups.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_buttons.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/twitter/_close.scss +29 -0
- data/vendor/assets/stylesheets/twitter/_code.scss +57 -0
- data/vendor/assets/stylesheets/twitter/_component-animations.scss +20 -0
- data/vendor/assets/stylesheets/twitter/_dropdowns.scss +143 -0
- data/vendor/assets/stylesheets/twitter/_forms.scss +582 -0
- data/vendor/assets/stylesheets/twitter/_grid.scss +5 -0
- data/vendor/assets/stylesheets/twitter/_hero-unit.scss +22 -0
- data/vendor/assets/stylesheets/twitter/_labels-badges.scss +52 -0
- data/vendor/assets/stylesheets/twitter/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/twitter/_mixins.scss +643 -0
- data/vendor/assets/stylesheets/twitter/_modals.scss +90 -0
- data/vendor/assets/stylesheets/twitter/_navbar.scss +358 -0
- data/vendor/assets/stylesheets/twitter/_navs.scss +363 -0
- data/vendor/assets/stylesheets/twitter/_pager.scss +36 -0
- data/vendor/assets/stylesheets/twitter/_pagination.scss +56 -0
- data/vendor/assets/stylesheets/twitter/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/twitter/_progress-bars.scss +117 -0
- data/vendor/assets/stylesheets/twitter/_reset.scss +131 -0
- data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +26 -0
- data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +149 -0
- data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +17 -0
- data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +153 -0
- data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +41 -0
- data/vendor/assets/stylesheets/twitter/_scaffolding.scss +29 -0
- data/vendor/assets/stylesheets/twitter/_sprites.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_tables.scss +155 -0
- data/vendor/assets/stylesheets/twitter/_thumbnails.scss +47 -0
- data/vendor/assets/stylesheets/twitter/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/twitter/_type.scss +232 -0
- data/vendor/assets/stylesheets/twitter/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/twitter/_variables.scss +204 -0
- data/vendor/assets/stylesheets/twitter/_wells.scss +27 -0
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +62 -0
- data/vendor/assets/stylesheets/twitter/responsive.scss +48 -0
- metadata +304 -0
data/js/tests/index.html
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Bootstrap Plugin Test Suite</title>
|
5
|
+
|
6
|
+
<!-- jquery -->
|
7
|
+
<!--<script src="http://code.jquery.com/jquery-1.7.min.js"></script>-->
|
8
|
+
<script src="vendor/jquery.js"></script>
|
9
|
+
|
10
|
+
<!-- qunit -->
|
11
|
+
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
|
12
|
+
<script src="vendor/qunit.js"></script>
|
13
|
+
|
14
|
+
<!-- phantomjs logging script-->
|
15
|
+
<script src="unit/bootstrap-phantom.js"></script>
|
16
|
+
|
17
|
+
<!-- plugin sources -->
|
18
|
+
<script src="../../js/bootstrap-transition.js"></script>
|
19
|
+
<script src="../../js/bootstrap-alert.js"></script>
|
20
|
+
<script src="../../js/bootstrap-button.js"></script>
|
21
|
+
<script src="../../js/bootstrap-carousel.js"></script>
|
22
|
+
<script src="../../js/bootstrap-collapse.js"></script>
|
23
|
+
<script src="../../js/bootstrap-dropdown.js"></script>
|
24
|
+
<script src="../../js/bootstrap-modal.js"></script>
|
25
|
+
<script src="../../js/bootstrap-scrollspy.js"></script>
|
26
|
+
<script src="../../js/bootstrap-tab.js"></script>
|
27
|
+
<script src="../../js/bootstrap-tooltip.js"></script>
|
28
|
+
<script src="../../js/bootstrap-popover.js"></script>
|
29
|
+
<script src="../../js/bootstrap-typeahead.js"></script>
|
30
|
+
|
31
|
+
<!-- unit tests -->
|
32
|
+
<script src="unit/bootstrap-transition.js"></script>
|
33
|
+
<script src="unit/bootstrap-alert.js"></script>
|
34
|
+
<script src="unit/bootstrap-button.js"></script>
|
35
|
+
<script src="unit/bootstrap-carousel.js"></script>
|
36
|
+
<script src="unit/bootstrap-collapse.js"></script>
|
37
|
+
<script src="unit/bootstrap-dropdown.js"></script>
|
38
|
+
<script src="unit/bootstrap-modal.js"></script>
|
39
|
+
<script src="unit/bootstrap-scrollspy.js"></script>
|
40
|
+
<script src="unit/bootstrap-tab.js"></script>
|
41
|
+
<script src="unit/bootstrap-tooltip.js"></script>
|
42
|
+
<script src="unit/bootstrap-popover.js"></script>
|
43
|
+
<script src="unit/bootstrap-typeahead.js"></script>
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
<div>
|
47
|
+
<h1 id="qunit-header">Bootstrap Plugin Test Suite</h1>
|
48
|
+
<h2 id="qunit-banner"></h2>
|
49
|
+
<h2 id="qunit-userAgent"></h2>
|
50
|
+
<ol id="qunit-tests"></ol>
|
51
|
+
<div id="qunit-fixture"></div>
|
52
|
+
</div>
|
53
|
+
</body>
|
54
|
+
</html>
|
data/js/tests/phantom.js
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
// Simple phantom.js integration script
|
2
|
+
// Adapted from Modernizr
|
3
|
+
|
4
|
+
function waitFor(testFx, onReady, timeOutMillis) {
|
5
|
+
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s
|
6
|
+
, start = new Date().getTime()
|
7
|
+
, condition = false
|
8
|
+
, interval = setInterval(function () {
|
9
|
+
if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) {
|
10
|
+
// If not time-out yet and condition not yet fulfilled
|
11
|
+
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code
|
12
|
+
} else {
|
13
|
+
if (!condition) {
|
14
|
+
// If condition still not fulfilled (timeout but condition is 'false')
|
15
|
+
console.log("'waitFor()' timeout")
|
16
|
+
phantom.exit(1)
|
17
|
+
} else {
|
18
|
+
// Condition fulfilled (timeout and/or condition is 'true')
|
19
|
+
typeof(onReady) === "string" ? eval(onReady) : onReady() //< Do what it's supposed to do once the condition is fulfilled
|
20
|
+
clearInterval(interval) //< Stop this interval
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}, 100) //< repeat check every 100ms
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
if (phantom.args.length === 0 || phantom.args.length > 2) {
|
28
|
+
console.log('Usage: phantom.js URL')
|
29
|
+
phantom.exit()
|
30
|
+
}
|
31
|
+
|
32
|
+
var page = new WebPage()
|
33
|
+
|
34
|
+
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
|
35
|
+
page.onConsoleMessage = function(msg) {
|
36
|
+
console.log(msg)
|
37
|
+
};
|
38
|
+
|
39
|
+
page.open(phantom.args[0], function(status){
|
40
|
+
if (status !== "success") {
|
41
|
+
console.log("Unable to access network")
|
42
|
+
phantom.exit()
|
43
|
+
} else {
|
44
|
+
waitFor(function(){
|
45
|
+
return page.evaluate(function(){
|
46
|
+
var el = document.getElementById('qunit-testresult')
|
47
|
+
if (el && el.innerText.match('completed')) {
|
48
|
+
return true
|
49
|
+
}
|
50
|
+
return false
|
51
|
+
})
|
52
|
+
}, function(){
|
53
|
+
var failedNum = page.evaluate(function(){
|
54
|
+
var el = document.getElementById('qunit-testresult')
|
55
|
+
try {
|
56
|
+
return el.getElementsByClassName('failed')[0].innerHTML
|
57
|
+
} catch (e) { }
|
58
|
+
return 10000
|
59
|
+
});
|
60
|
+
phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0)
|
61
|
+
})
|
62
|
+
}
|
63
|
+
})
|
data/js/tests/server.js
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* Simple connect server for phantom.js
|
3
|
+
* Adapted from Modernizr
|
4
|
+
*/
|
5
|
+
|
6
|
+
var connect = require('connect')
|
7
|
+
, http = require('http')
|
8
|
+
, fs = require('fs')
|
9
|
+
, app = connect()
|
10
|
+
.use(connect.static(__dirname + '/../../'));
|
11
|
+
|
12
|
+
http.createServer(app).listen(3000);
|
13
|
+
|
14
|
+
fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8')
|
@@ -0,0 +1,56 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-alerts")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
ok($(document.body).alert, 'alert method is defined')
|
7
|
+
})
|
8
|
+
|
9
|
+
test("should return element", function () {
|
10
|
+
ok($(document.body).alert()[0] == document.body, 'document.body returned')
|
11
|
+
})
|
12
|
+
|
13
|
+
test("should fade element out on clicking .close", function () {
|
14
|
+
var alertHTML = '<div class="alert-message warning fade in">'
|
15
|
+
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
|
16
|
+
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
|
17
|
+
+ '</div>'
|
18
|
+
, alert = $(alertHTML).alert()
|
19
|
+
|
20
|
+
alert.find('.close').click()
|
21
|
+
|
22
|
+
ok(!alert.hasClass('in'), 'remove .in class on .close click')
|
23
|
+
})
|
24
|
+
|
25
|
+
test("should remove element when clicking .close", function () {
|
26
|
+
$.support.transition = false
|
27
|
+
|
28
|
+
var alertHTML = '<div class="alert-message warning fade in">'
|
29
|
+
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
|
30
|
+
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
|
31
|
+
+ '</div>'
|
32
|
+
, alert = $(alertHTML).appendTo('#qunit-fixture').alert()
|
33
|
+
|
34
|
+
ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')
|
35
|
+
|
36
|
+
alert.find('.close').click()
|
37
|
+
|
38
|
+
ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
|
39
|
+
})
|
40
|
+
|
41
|
+
test("should not fire closed when close is prevented", function () {
|
42
|
+
$.support.transition = false
|
43
|
+
stop();
|
44
|
+
$('<div class="alert"/>')
|
45
|
+
.bind('close', function (e) {
|
46
|
+
e.preventDefault();
|
47
|
+
ok(true);
|
48
|
+
start();
|
49
|
+
})
|
50
|
+
.bind('closed', function () {
|
51
|
+
ok(false);
|
52
|
+
})
|
53
|
+
.alert('close')
|
54
|
+
})
|
55
|
+
|
56
|
+
})
|
@@ -0,0 +1,77 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-buttons")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
ok($(document.body).button, 'button method is defined')
|
7
|
+
})
|
8
|
+
|
9
|
+
test("should return element", function () {
|
10
|
+
ok($(document.body).button()[0] == document.body, 'document.body returned')
|
11
|
+
})
|
12
|
+
|
13
|
+
test("should return set state to loading", function () {
|
14
|
+
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
|
15
|
+
equals(btn.html(), 'mdo', 'btn text equals mdo')
|
16
|
+
btn.button('loading')
|
17
|
+
equals(btn.html(), 'fat', 'btn text equals fat')
|
18
|
+
stop()
|
19
|
+
setTimeout(function () {
|
20
|
+
ok(btn.attr('disabled'), 'btn is disabled')
|
21
|
+
ok(btn.hasClass('disabled'), 'btn has disabled class')
|
22
|
+
start()
|
23
|
+
}, 0)
|
24
|
+
})
|
25
|
+
|
26
|
+
test("should return reset state", function () {
|
27
|
+
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
|
28
|
+
equals(btn.html(), 'mdo', 'btn text equals mdo')
|
29
|
+
btn.button('loading')
|
30
|
+
equals(btn.html(), 'fat', 'btn text equals fat')
|
31
|
+
stop()
|
32
|
+
setTimeout(function () {
|
33
|
+
ok(btn.attr('disabled'), 'btn is disabled')
|
34
|
+
ok(btn.hasClass('disabled'), 'btn has disabled class')
|
35
|
+
start()
|
36
|
+
stop()
|
37
|
+
}, 0)
|
38
|
+
btn.button('reset')
|
39
|
+
equals(btn.html(), 'mdo', 'btn text equals mdo')
|
40
|
+
setTimeout(function () {
|
41
|
+
ok(!btn.attr('disabled'), 'btn is not disabled')
|
42
|
+
ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
|
43
|
+
start()
|
44
|
+
}, 0)
|
45
|
+
})
|
46
|
+
|
47
|
+
test("should toggle active", function () {
|
48
|
+
var btn = $('<button class="btn">mdo</button>')
|
49
|
+
ok(!btn.hasClass('active'), 'btn does not have active class')
|
50
|
+
btn.button('toggle')
|
51
|
+
ok(btn.hasClass('active'), 'btn has class active')
|
52
|
+
})
|
53
|
+
|
54
|
+
test("should toggle active when btn children are clicked", function () {
|
55
|
+
var btn = $('<button class="btn" data-toggle="button">mdo</button>')
|
56
|
+
, inner = $('<i></i>')
|
57
|
+
btn
|
58
|
+
.append(inner)
|
59
|
+
.appendTo($('#qunit-fixture'))
|
60
|
+
ok(!btn.hasClass('active'), 'btn does not have active class')
|
61
|
+
inner.click()
|
62
|
+
ok(btn.hasClass('active'), 'btn has class active')
|
63
|
+
})
|
64
|
+
|
65
|
+
test("should toggle active when btn children are clicked within btn-group", function () {
|
66
|
+
var btngroup = $('<div class="btn-group" data-toggle="buttons-checkbox"></div>')
|
67
|
+
, btn = $('<button class="btn">fat</button>')
|
68
|
+
, inner = $('<i></i>')
|
69
|
+
btngroup
|
70
|
+
.append(btn.append(inner))
|
71
|
+
.appendTo($('#qunit-fixture'))
|
72
|
+
ok(!btn.hasClass('active'), 'btn does not have active class')
|
73
|
+
inner.click()
|
74
|
+
ok(btn.hasClass('active'), 'btn has class active')
|
75
|
+
})
|
76
|
+
|
77
|
+
})
|
@@ -0,0 +1,28 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-carousel")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
ok($(document.body).carousel, 'carousel method is defined')
|
7
|
+
})
|
8
|
+
|
9
|
+
test("should return element", function () {
|
10
|
+
ok($(document.body).carousel()[0] == document.body, 'document.body returned')
|
11
|
+
})
|
12
|
+
|
13
|
+
test("should not fire sliden when slide is prevented", function () {
|
14
|
+
$.support.transition = false
|
15
|
+
stop();
|
16
|
+
$('<div class="carousel"/>')
|
17
|
+
.bind('slide', function (e) {
|
18
|
+
e.preventDefault();
|
19
|
+
ok(true);
|
20
|
+
start();
|
21
|
+
})
|
22
|
+
.bind('slid', function () {
|
23
|
+
ok(false);
|
24
|
+
})
|
25
|
+
.carousel('next')
|
26
|
+
})
|
27
|
+
|
28
|
+
})
|
@@ -0,0 +1,54 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-collapse")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
ok($(document.body).collapse, 'collapse method is defined')
|
7
|
+
})
|
8
|
+
|
9
|
+
test("should return element", function () {
|
10
|
+
ok($(document.body).collapse()[0] == document.body, 'document.body returned')
|
11
|
+
})
|
12
|
+
|
13
|
+
test("should show a collapsed element", function () {
|
14
|
+
var el = $('<div class="collapse"></div>').collapse('show')
|
15
|
+
ok(el.hasClass('in'), 'has class in')
|
16
|
+
ok(/height/.test(el.attr('style')), 'has height set')
|
17
|
+
})
|
18
|
+
|
19
|
+
test("should hide a collapsed element", function () {
|
20
|
+
var el = $('<div class="collapse"></div>').collapse('hide')
|
21
|
+
ok(!el.hasClass('in'), 'does not have class in')
|
22
|
+
ok(/height/.test(el.attr('style')), 'has height set')
|
23
|
+
})
|
24
|
+
|
25
|
+
test("should not fire shown when show is prevented", function () {
|
26
|
+
$.support.transition = false
|
27
|
+
stop();
|
28
|
+
$('<div class="collapse"/>')
|
29
|
+
.bind('show', function (e) {
|
30
|
+
e.preventDefault();
|
31
|
+
ok(true);
|
32
|
+
start();
|
33
|
+
})
|
34
|
+
.bind('shown', function () {
|
35
|
+
ok(false);
|
36
|
+
})
|
37
|
+
.collapse('show')
|
38
|
+
})
|
39
|
+
|
40
|
+
test("should reset style to auto after finishing opening collapse", function () {
|
41
|
+
$.support.transition = false
|
42
|
+
stop();
|
43
|
+
$('<div class="collapse" style="height: 0px"/>')
|
44
|
+
.bind('show', function () {
|
45
|
+
ok(this.style.height == '0px')
|
46
|
+
})
|
47
|
+
.bind('shown', function () {
|
48
|
+
ok(this.style.height == 'auto')
|
49
|
+
start()
|
50
|
+
})
|
51
|
+
.collapse('show')
|
52
|
+
})
|
53
|
+
|
54
|
+
})
|
@@ -0,0 +1,87 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-dropdowns")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
ok($(document.body).dropdown, 'dropdown method is defined')
|
7
|
+
})
|
8
|
+
|
9
|
+
test("should return element", function () {
|
10
|
+
ok($(document.body).dropdown()[0] == document.body, 'document.body returned')
|
11
|
+
})
|
12
|
+
|
13
|
+
test("should not open dropdown if target is disabled", function () {
|
14
|
+
var dropdownHTML = '<ul class="tabs">'
|
15
|
+
+ '<li class="dropdown">'
|
16
|
+
+ '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>'
|
17
|
+
+ '<ul class="dropdown-menu">'
|
18
|
+
+ '<li><a href="#">Secondary link</a></li>'
|
19
|
+
+ '<li><a href="#">Something else here</a></li>'
|
20
|
+
+ '<li class="divider"></li>'
|
21
|
+
+ '<li><a href="#">Another link</a></li>'
|
22
|
+
+ '</ul>'
|
23
|
+
+ '</li>'
|
24
|
+
+ '</ul>'
|
25
|
+
, dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
|
26
|
+
|
27
|
+
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
|
28
|
+
})
|
29
|
+
|
30
|
+
test("should not open dropdown if target is disabled", function () {
|
31
|
+
var dropdownHTML = '<ul class="tabs">'
|
32
|
+
+ '<li class="dropdown">'
|
33
|
+
+ '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>'
|
34
|
+
+ '<ul class="dropdown-menu">'
|
35
|
+
+ '<li><a href="#">Secondary link</a></li>'
|
36
|
+
+ '<li><a href="#">Something else here</a></li>'
|
37
|
+
+ '<li class="divider"></li>'
|
38
|
+
+ '<li><a href="#">Another link</a></li>'
|
39
|
+
+ '</ul>'
|
40
|
+
+ '</li>'
|
41
|
+
+ '</ul>'
|
42
|
+
, dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
|
43
|
+
|
44
|
+
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
|
45
|
+
})
|
46
|
+
|
47
|
+
test("should add class open to menu if clicked", function () {
|
48
|
+
var dropdownHTML = '<ul class="tabs">'
|
49
|
+
+ '<li class="dropdown">'
|
50
|
+
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
|
51
|
+
+ '<ul class="dropdown-menu">'
|
52
|
+
+ '<li><a href="#">Secondary link</a></li>'
|
53
|
+
+ '<li><a href="#">Something else here</a></li>'
|
54
|
+
+ '<li class="divider"></li>'
|
55
|
+
+ '<li><a href="#">Another link</a></li>'
|
56
|
+
+ '</ul>'
|
57
|
+
+ '</li>'
|
58
|
+
+ '</ul>'
|
59
|
+
, dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
|
60
|
+
|
61
|
+
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
|
62
|
+
})
|
63
|
+
|
64
|
+
test("should remove open class if body clicked", function () {
|
65
|
+
var dropdownHTML = '<ul class="tabs">'
|
66
|
+
+ '<li class="dropdown">'
|
67
|
+
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
|
68
|
+
+ '<ul class="dropdown-menu">'
|
69
|
+
+ '<li><a href="#">Secondary link</a></li>'
|
70
|
+
+ '<li><a href="#">Something else here</a></li>'
|
71
|
+
+ '<li class="divider"></li>'
|
72
|
+
+ '<li><a href="#">Another link</a></li>'
|
73
|
+
+ '</ul>'
|
74
|
+
+ '</li>'
|
75
|
+
+ '</ul>'
|
76
|
+
, dropdown = $(dropdownHTML)
|
77
|
+
.appendTo('#qunit-fixture')
|
78
|
+
.find('[data-toggle="dropdown"]')
|
79
|
+
.dropdown()
|
80
|
+
.click()
|
81
|
+
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
|
82
|
+
$('body').click()
|
83
|
+
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
|
84
|
+
dropdown.remove()
|
85
|
+
})
|
86
|
+
|
87
|
+
})
|
@@ -0,0 +1,114 @@
|
|
1
|
+
$(function () {
|
2
|
+
|
3
|
+
module("bootstrap-modal")
|
4
|
+
|
5
|
+
test("should be defined on jquery object", function () {
|
6
|
+
var div = $("<div id='modal-test'></div>")
|
7
|
+
ok(div.modal, 'modal method is defined')
|
8
|
+
})
|
9
|
+
|
10
|
+
test("should return element", function () {
|
11
|
+
var div = $("<div id='modal-test'></div>")
|
12
|
+
ok(div.modal() == div, 'document.body returned')
|
13
|
+
$('#modal-test').remove()
|
14
|
+
})
|
15
|
+
|
16
|
+
test("should expose defaults var for settings", function () {
|
17
|
+
ok($.fn.modal.defaults, 'default object exposed')
|
18
|
+
})
|
19
|
+
|
20
|
+
test("should insert into dom when show method is called", function () {
|
21
|
+
stop()
|
22
|
+
$.support.transition = false
|
23
|
+
$("<div id='modal-test'></div>")
|
24
|
+
.bind("shown", function () {
|
25
|
+
ok($('#modal-test').length, 'modal insterted into dom')
|
26
|
+
$(this).remove()
|
27
|
+
start()
|
28
|
+
})
|
29
|
+
.modal("show")
|
30
|
+
})
|
31
|
+
|
32
|
+
test("should fire show event", function () {
|
33
|
+
stop()
|
34
|
+
$.support.transition = false
|
35
|
+
$("<div id='modal-test'></div>")
|
36
|
+
.bind("show", function () {
|
37
|
+
ok(true, "show was called")
|
38
|
+
})
|
39
|
+
.bind("shown", function () {
|
40
|
+
$(this).remove()
|
41
|
+
start()
|
42
|
+
})
|
43
|
+
.modal("show")
|
44
|
+
})
|
45
|
+
|
46
|
+
test("should not fire shown when default prevented", function () {
|
47
|
+
stop()
|
48
|
+
$.support.transition = false
|
49
|
+
$("<div id='modal-test'></div>")
|
50
|
+
.bind("show", function (e) {
|
51
|
+
e.preventDefault()
|
52
|
+
ok(true, "show was called")
|
53
|
+
start()
|
54
|
+
})
|
55
|
+
.bind("shown", function () {
|
56
|
+
ok(false, "shown was called")
|
57
|
+
})
|
58
|
+
.modal("show")
|
59
|
+
})
|
60
|
+
|
61
|
+
test("should hide modal when hide is called", function () {
|
62
|
+
stop()
|
63
|
+
$.support.transition = false
|
64
|
+
|
65
|
+
$("<div id='modal-test'></div>")
|
66
|
+
.bind("shown", function () {
|
67
|
+
ok($('#modal-test').is(":visible"), 'modal visible')
|
68
|
+
ok($('#modal-test').length, 'modal insterted into dom')
|
69
|
+
$(this).modal("hide")
|
70
|
+
})
|
71
|
+
.bind("hidden", function() {
|
72
|
+
ok(!$('#modal-test').is(":visible"), 'modal hidden')
|
73
|
+
$('#modal-test').remove()
|
74
|
+
start()
|
75
|
+
})
|
76
|
+
.modal("show")
|
77
|
+
})
|
78
|
+
|
79
|
+
test("should toggle when toggle is called", function () {
|
80
|
+
stop()
|
81
|
+
$.support.transition = false
|
82
|
+
var div = $("<div id='modal-test'></div>")
|
83
|
+
div
|
84
|
+
.bind("shown", function () {
|
85
|
+
ok($('#modal-test').is(":visible"), 'modal visible')
|
86
|
+
ok($('#modal-test').length, 'modal insterted into dom')
|
87
|
+
div.modal("toggle")
|
88
|
+
})
|
89
|
+
.bind("hidden", function() {
|
90
|
+
ok(!$('#modal-test').is(":visible"), 'modal hidden')
|
91
|
+
div.remove()
|
92
|
+
start()
|
93
|
+
})
|
94
|
+
.modal("toggle")
|
95
|
+
})
|
96
|
+
|
97
|
+
test("should remove from dom when click [data-dismiss=modal]", function () {
|
98
|
+
stop()
|
99
|
+
$.support.transition = false
|
100
|
+
var div = $("<div id='modal-test'><span class='close' data-dismiss='modal'></span></div>")
|
101
|
+
div
|
102
|
+
.bind("shown", function () {
|
103
|
+
ok($('#modal-test').is(":visible"), 'modal visible')
|
104
|
+
ok($('#modal-test').length, 'modal insterted into dom')
|
105
|
+
div.find('.close').click()
|
106
|
+
})
|
107
|
+
.bind("hidden", function() {
|
108
|
+
ok(!$('#modal-test').is(":visible"), 'modal hidden')
|
109
|
+
div.remove()
|
110
|
+
start()
|
111
|
+
})
|
112
|
+
.modal("toggle")
|
113
|
+
})
|
114
|
+
})
|