sass-twitter-bootstrap 0.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/{sass-twitter-bootstrap.rb → sass/twitter/bootstrap.rb} +1 -1
- data/lib/sass/twitter/bootstrap/rails.rb +1 -5
- data/lib/sass/twitter/bootstrap/rails/engine.rb +12 -0
- data/lib/sass/twitter/bootstrap/version.rb +1 -1
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +32 -28
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +33 -29
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +21 -33
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +26 -47
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +10 -18
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +17 -25
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +10 -13
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +18 -44
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +7 -12
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +35 -40
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +20 -30
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +15 -29
- data/vendor/assets/stylesheets/tests/buttons.html +139 -0
- data/vendor/assets/stylesheets/tests/css-tests.css +99 -1
- data/vendor/assets/stylesheets/tests/css-tests.html +519 -37
- data/vendor/assets/stylesheets/tests/forms-responsive.html +71 -0
- data/vendor/assets/stylesheets/tests/navbar-fixed-top.html +104 -0
- data/vendor/assets/stylesheets/tests/navbar-static-top.html +107 -0
- data/vendor/assets/stylesheets/tests/navbar.html +38 -39
- data/vendor/assets/stylesheets/twitter/_accordion.scss +0 -5
- data/vendor/assets/stylesheets/twitter/_alerts.scss +15 -3
- data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +0 -2
- data/vendor/assets/stylesheets/twitter/_button-groups.scss +32 -76
- data/vendor/assets/stylesheets/twitter/_buttons.scss +25 -33
- data/vendor/assets/stylesheets/twitter/_close.scss +1 -12
- data/vendor/assets/stylesheets/twitter/_code.scss +8 -8
- data/vendor/assets/stylesheets/twitter/_component-animations.scss +7 -9
- data/vendor/assets/stylesheets/twitter/_dropdowns.scss +45 -58
- data/vendor/assets/stylesheets/twitter/_forms.scss +146 -206
- data/vendor/assets/stylesheets/twitter/_grid.scss +5 -2
- data/vendor/assets/stylesheets/twitter/_hero-unit.scss +1 -3
- data/vendor/assets/stylesheets/twitter/_labels.scss +32 -0
- data/vendor/assets/stylesheets/twitter/_layouts.scss +2 -2
- data/vendor/assets/stylesheets/twitter/_mixins.scss +208 -273
- data/vendor/assets/stylesheets/twitter/_modals.scss +8 -14
- data/vendor/assets/stylesheets/twitter/_navbar.scss +73 -132
- data/vendor/assets/stylesheets/twitter/_navs.scss +43 -53
- data/vendor/assets/stylesheets/twitter/_pager.scss +0 -6
- data/vendor/assets/stylesheets/twitter/_pagination.scss +0 -1
- data/vendor/assets/stylesheets/twitter/_progress-bars.scss +6 -28
- data/vendor/assets/stylesheets/twitter/_reset.scss +4 -9
- data/vendor/assets/stylesheets/twitter/_scaffolding.scss +8 -4
- data/vendor/assets/stylesheets/twitter/_sprites.scss +7 -40
- data/vendor/assets/stylesheets/twitter/_tables.scss +33 -38
- data/vendor/assets/stylesheets/twitter/_thumbnails.scss +2 -14
- data/vendor/assets/stylesheets/twitter/_tooltip.scss +1 -1
- data/vendor/assets/stylesheets/twitter/_type.scss +14 -28
- data/vendor/assets/stylesheets/twitter/_variables.scss +19 -116
- data/vendor/assets/stylesheets/twitter/_wells.scss +0 -10
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +7 -3
- data/vendor/assets/stylesheets/twitter/responsive.scss +301 -15
- metadata +25 -190
- data/.gitignore +0 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -14
- data/LICENSE +0 -176
- data/Makefile +0 -94
- data/README.md +0 -217
- data/Rakefile +0 -52
- data/bootstrap-2.0.4.css +0 -4661
- data/bootstrap-2.0.4.min.css +0 -9
- data/bootstrap-responsive-2.0.4.css +0 -932
- data/bootstrap-responsive-2.0.4.min.css +0 -9
- data/docs/assets/css/bootstrap-responsive.css +0 -932
- data/docs/assets/css/bootstrap.css +0 -4661
- data/docs/assets/css/docs.css +0 -846
- 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 +0 -106
- data/docs/assets/js/application.js +0 -184
- data/docs/assets/js/bootstrap-alert.js +0 -90
- data/docs/assets/js/bootstrap-button.js +0 -96
- data/docs/assets/js/bootstrap-carousel.js +0 -169
- data/docs/assets/js/bootstrap-collapse.js +0 -157
- data/docs/assets/js/bootstrap-dropdown.js +0 -100
- data/docs/assets/js/bootstrap-modal.js +0 -218
- data/docs/assets/js/bootstrap-popover.js +0 -98
- data/docs/assets/js/bootstrap-scrollspy.js +0 -151
- data/docs/assets/js/bootstrap-tab.js +0 -135
- data/docs/assets/js/bootstrap-tooltip.js +0 -275
- data/docs/assets/js/bootstrap-transition.js +0 -61
- data/docs/assets/js/bootstrap-typeahead.js +0 -285
- data/docs/assets/js/bootstrap.js +0 -1825
- data/docs/assets/js/bootstrap.min.js +0 -6
- data/docs/assets/js/google-code-prettify/prettify.css +0 -30
- data/docs/assets/js/google-code-prettify/prettify.js +0 -28
- data/docs/assets/js/jquery.js +0 -9252
- data/docs/base-css.html +0 -1710
- data/docs/build/index.js +0 -44
- data/docs/build/node_modules/.bin/hulk +0 -93
- data/docs/build/node_modules/hogan.js/.git_ignore +0 -1
- data/docs/build/node_modules/hogan.js/.gitmodules +0 -3
- data/docs/build/node_modules/hogan.js/LICENSE +0 -177
- data/docs/build/node_modules/hogan.js/Makefile +0 -62
- data/docs/build/node_modules/hogan.js/README.md +0 -93
- data/docs/build/node_modules/hogan.js/bin/hulk +0 -93
- data/docs/build/node_modules/hogan.js/lib/compiler.js +0 -348
- data/docs/build/node_modules/hogan.js/lib/hogan.js +0 -20
- data/docs/build/node_modules/hogan.js/lib/template.js +0 -233
- data/docs/build/node_modules/hogan.js/package.json +0 -20
- data/docs/build/node_modules/hogan.js/test/html/list.html +0 -8
- data/docs/build/node_modules/hogan.js/test/index.html +0 -13
- data/docs/build/node_modules/hogan.js/test/index.js +0 -848
- data/docs/build/node_modules/hogan.js/test/mustache.js +0 -90
- data/docs/build/node_modules/hogan.js/test/spec.js +0 -77
- data/docs/build/node_modules/hogan.js/test/spec/Changes +0 -31
- data/docs/build/node_modules/hogan.js/test/spec/README.md +0 -65
- data/docs/build/node_modules/hogan.js/test/spec/Rakefile +0 -27
- data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +0 -46
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +0 -103
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +0 -158
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +0 -230
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +0 -193
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +0 -109
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +0 -256
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +0 -149
- data/docs/build/node_modules/hogan.js/test/templates/list.mustache +0 -8
- data/docs/build/node_modules/hogan.js/tools/release.js +0 -74
- data/docs/build/node_modules/hogan.js/tools/web_templates.js +0 -32
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +0 -500
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +0 -14
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +0 -500
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +0 -14
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +0 -545
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +0 -576
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +0 -576
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +0 -572
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +0 -619
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +0 -233
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +0 -5
- 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 +0 -139
- data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +0 -206
- data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +0 -236
- data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +0 -21
- data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +0 -21
- data/docs/build/node_modules/hogan.js/wrappers/js.mustache +0 -17
- data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +0 -64
- data/docs/build/package.json +0 -6
- data/docs/components.html +0 -1931
- data/docs/download.html +0 -454
- data/docs/examples.html +0 -147
- data/docs/examples/fluid.html +0 -162
- data/docs/examples/hero.html +0 -109
- data/docs/examples/starter-template.html +0 -79
- data/docs/index.html +0 -259
- data/docs/javascript.html +0 -1520
- data/docs/less.html +0 -1060
- data/docs/scaffolding.html +0 -671
- data/docs/templates/layout.mustache +0 -146
- data/docs/templates/pages/base-css.mustache +0 -1594
- data/docs/templates/pages/components.mustache +0 -1815
- data/docs/templates/pages/download.mustache +0 -338
- data/docs/templates/pages/examples.mustache +0 -31
- data/docs/templates/pages/index.mustache +0 -144
- data/docs/templates/pages/javascript.mustache +0 -1405
- data/docs/templates/pages/less.mustache +0 -944
- data/docs/templates/pages/scaffolding.mustache +0 -555
- data/docs/templates/pages/upgrading.mustache +0 -194
- data/docs/upgrading.html +0 -310
- data/js/tests/index.html +0 -54
- data/js/tests/phantom.js +0 -63
- data/js/tests/server.js +0 -14
- data/js/tests/unit/bootstrap-alert.js +0 -56
- data/js/tests/unit/bootstrap-button.js +0 -77
- data/js/tests/unit/bootstrap-carousel.js +0 -28
- data/js/tests/unit/bootstrap-collapse.js +0 -54
- data/js/tests/unit/bootstrap-dropdown.js +0 -87
- data/js/tests/unit/bootstrap-modal.js +0 -114
- data/js/tests/unit/bootstrap-phantom.js +0 -21
- data/js/tests/unit/bootstrap-popover.js +0 -93
- data/js/tests/unit/bootstrap-scrollspy.js +0 -31
- data/js/tests/unit/bootstrap-tab.js +0 -61
- data/js/tests/unit/bootstrap-tooltip.js +0 -155
- data/js/tests/unit/bootstrap-transition.js +0 -13
- data/js/tests/unit/bootstrap-typeahead.js +0 -148
- data/js/tests/vendor/jquery.js +0 -9252
- data/js/tests/vendor/qunit.css +0 -232
- data/js/tests/vendor/qunit.js +0 -1510
- data/package.json +0 -25
- data/sass-twitter-bootstrap.gemspec +0 -19
- data/vendor/assets/javascripts/README.md +0 -112
- data/vendor/assets/javascripts/twitter/bootstrap.js +0 -12
- data/vendor/assets/stylesheets/twitter/_labels-badges.scss +0 -52
- data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +0 -26
- data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +0 -149
- data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +0 -17
- data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +0 -153
- data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +0 -41
@@ -1,21 +0,0 @@
|
|
1
|
-
// Logging setup for phantom integration
|
2
|
-
// adapted from Modernizr
|
3
|
-
|
4
|
-
QUnit.begin = function () {
|
5
|
-
console.log("Starting test suite")
|
6
|
-
console.log("================================================\n")
|
7
|
-
}
|
8
|
-
|
9
|
-
QUnit.moduleDone = function (opts) {
|
10
|
-
if (opts.failed === 0) {
|
11
|
-
console.log("\u2714 All tests passed in '" + opts.name + "' module")
|
12
|
-
} else {
|
13
|
-
console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
QUnit.done = function (opts) {
|
18
|
-
console.log("\n================================================")
|
19
|
-
console.log("Tests completed in " + opts.runtime + " milliseconds")
|
20
|
-
console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.")
|
21
|
-
}
|
@@ -1,93 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-popover")
|
4
|
-
|
5
|
-
test("should be defined on jquery object", function () {
|
6
|
-
var div = $('<div></div>')
|
7
|
-
ok(div.popover, 'popover method is defined')
|
8
|
-
})
|
9
|
-
|
10
|
-
test("should return element", function () {
|
11
|
-
var div = $('<div></div>')
|
12
|
-
ok(div.popover() == div, 'document.body returned')
|
13
|
-
})
|
14
|
-
|
15
|
-
test("should render popover element", function () {
|
16
|
-
$.support.transition = false
|
17
|
-
var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>')
|
18
|
-
.appendTo('#qunit-fixture')
|
19
|
-
.popover('show')
|
20
|
-
|
21
|
-
ok($('.popover').length, 'popover was inserted')
|
22
|
-
popover.popover('hide')
|
23
|
-
ok(!$(".popover").length, 'popover removed')
|
24
|
-
})
|
25
|
-
|
26
|
-
test("should store popover instance in popover data object", function () {
|
27
|
-
$.support.transition = false
|
28
|
-
var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>')
|
29
|
-
.popover()
|
30
|
-
|
31
|
-
ok(!!popover.data('popover'), 'popover instance exists')
|
32
|
-
})
|
33
|
-
|
34
|
-
test("should get title and content from options", function () {
|
35
|
-
$.support.transition = false
|
36
|
-
var popover = $('<a href="#">@fat</a>')
|
37
|
-
.appendTo('#qunit-fixture')
|
38
|
-
.popover({
|
39
|
-
title: function () {
|
40
|
-
return '@fat'
|
41
|
-
}
|
42
|
-
, content: function () {
|
43
|
-
return 'loves writing tests (╯°□°)╯︵ ┻━┻'
|
44
|
-
}
|
45
|
-
})
|
46
|
-
|
47
|
-
popover.popover('show')
|
48
|
-
|
49
|
-
ok($('.popover').length, 'popover was inserted')
|
50
|
-
equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted')
|
51
|
-
equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
|
52
|
-
|
53
|
-
popover.popover('hide')
|
54
|
-
ok(!$('.popover').length, 'popover was removed')
|
55
|
-
$('#qunit-fixture').empty()
|
56
|
-
})
|
57
|
-
|
58
|
-
test("should get title and content from attributes", function () {
|
59
|
-
$.support.transition = false
|
60
|
-
var popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>')
|
61
|
-
.appendTo('#qunit-fixture')
|
62
|
-
.popover()
|
63
|
-
.popover('show')
|
64
|
-
|
65
|
-
ok($('.popover').length, 'popover was inserted')
|
66
|
-
equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
|
67
|
-
equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted')
|
68
|
-
|
69
|
-
popover.popover('hide')
|
70
|
-
ok(!$('.popover').length, 'popover was removed')
|
71
|
-
$('#qunit-fixture').empty()
|
72
|
-
})
|
73
|
-
|
74
|
-
test("should respect custom classes", function() {
|
75
|
-
$.support.transition = false
|
76
|
-
var popover = $('<a href="#">@fat</a>')
|
77
|
-
.appendTo('#qunit-fixture')
|
78
|
-
.popover({
|
79
|
-
title: 'Test'
|
80
|
-
, content: 'Test'
|
81
|
-
, template: '<div class="popover foobar"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>'
|
82
|
-
})
|
83
|
-
|
84
|
-
popover.popover('show')
|
85
|
-
|
86
|
-
ok($('.popover').length, 'popover was inserted')
|
87
|
-
ok($('.popover').hasClass('foobar'), 'custom class is present')
|
88
|
-
|
89
|
-
popover.popover('hide')
|
90
|
-
ok(!$('.popover').length, 'popover was removed')
|
91
|
-
$('#qunit-fixture').empty()
|
92
|
-
})
|
93
|
-
})
|
@@ -1,31 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-scrollspy")
|
4
|
-
|
5
|
-
test("should be defined on jquery object", function () {
|
6
|
-
ok($(document.body).scrollspy, 'scrollspy method is defined')
|
7
|
-
})
|
8
|
-
|
9
|
-
test("should return element", function () {
|
10
|
-
ok($(document.body).scrollspy()[0] == document.body, 'document.body returned')
|
11
|
-
})
|
12
|
-
|
13
|
-
test("should switch active class on scroll", function () {
|
14
|
-
var sectionHTML = '<div id="masthead"></div>'
|
15
|
-
, $section = $(sectionHTML).append('#qunit-fixture')
|
16
|
-
, topbarHTML ='<div class="topbar">'
|
17
|
-
+ '<div class="topbar-inner">'
|
18
|
-
+ '<div class="container">'
|
19
|
-
+ '<h3><a href="#">Bootstrap</a></h3>'
|
20
|
-
+ '<ul class="nav">'
|
21
|
-
+ '<li><a href="#masthead">Overview</a></li>'
|
22
|
-
+ '</ul>'
|
23
|
-
+ '</div>'
|
24
|
-
+ '</div>'
|
25
|
-
+ '</div>'
|
26
|
-
, $topbar = $(topbarHTML).scrollspy()
|
27
|
-
|
28
|
-
ok($topbar.find('.active', true))
|
29
|
-
})
|
30
|
-
|
31
|
-
})
|
@@ -1,61 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-tabs")
|
4
|
-
|
5
|
-
test("should be defined on jquery object", function () {
|
6
|
-
ok($(document.body).tab, 'tabs method is defined')
|
7
|
-
})
|
8
|
-
|
9
|
-
test("should return element", function () {
|
10
|
-
ok($(document.body).tab()[0] == document.body, 'document.body returned')
|
11
|
-
})
|
12
|
-
|
13
|
-
test("should activate element by tab id", function () {
|
14
|
-
var tabsHTML =
|
15
|
-
'<ul class="tabs">'
|
16
|
-
+ '<li><a href="#home">Home</a></li>'
|
17
|
-
+ '<li><a href="#profile">Profile</a></li>'
|
18
|
-
+ '</ul>'
|
19
|
-
|
20
|
-
$('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture")
|
21
|
-
|
22
|
-
$(tabsHTML).find('li:last a').tab('show')
|
23
|
-
equals($("#qunit-fixture").find('.active').attr('id'), "profile")
|
24
|
-
|
25
|
-
$(tabsHTML).find('li:first a').tab('show')
|
26
|
-
equals($("#qunit-fixture").find('.active').attr('id'), "home")
|
27
|
-
})
|
28
|
-
|
29
|
-
test("should activate element by tab id", function () {
|
30
|
-
var pillsHTML =
|
31
|
-
'<ul class="pills">'
|
32
|
-
+ '<li><a href="#home">Home</a></li>'
|
33
|
-
+ '<li><a href="#profile">Profile</a></li>'
|
34
|
-
+ '</ul>'
|
35
|
-
|
36
|
-
$('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture")
|
37
|
-
|
38
|
-
$(pillsHTML).find('li:last a').tab('show')
|
39
|
-
equals($("#qunit-fixture").find('.active').attr('id'), "profile")
|
40
|
-
|
41
|
-
$(pillsHTML).find('li:first a').tab('show')
|
42
|
-
equals($("#qunit-fixture").find('.active').attr('id'), "home")
|
43
|
-
})
|
44
|
-
|
45
|
-
|
46
|
-
test("should not fire closed when close is prevented", function () {
|
47
|
-
$.support.transition = false
|
48
|
-
stop();
|
49
|
-
$('<div class="tab"/>')
|
50
|
-
.bind('show', function (e) {
|
51
|
-
e.preventDefault();
|
52
|
-
ok(true);
|
53
|
-
start();
|
54
|
-
})
|
55
|
-
.bind('shown', function () {
|
56
|
-
ok(false);
|
57
|
-
})
|
58
|
-
.tab('show')
|
59
|
-
})
|
60
|
-
|
61
|
-
})
|
@@ -1,155 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-tooltip")
|
4
|
-
|
5
|
-
test("should be defined on jquery object", function () {
|
6
|
-
var div = $("<div></div>")
|
7
|
-
ok(div.tooltip, 'popover method is defined')
|
8
|
-
})
|
9
|
-
|
10
|
-
test("should return element", function () {
|
11
|
-
var div = $("<div></div>")
|
12
|
-
ok(div.tooltip() == div, 'document.body returned')
|
13
|
-
})
|
14
|
-
|
15
|
-
test("should expose default settings", function () {
|
16
|
-
ok(!!$.fn.tooltip.defaults, 'defaults is defined')
|
17
|
-
})
|
18
|
-
|
19
|
-
test("should remove title attribute", function () {
|
20
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
|
21
|
-
ok(!tooltip.attr('title'), 'title tag was removed')
|
22
|
-
})
|
23
|
-
|
24
|
-
test("should add data attribute for referencing original title", function () {
|
25
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
|
26
|
-
equals(tooltip.attr('data-original-title'), 'Another tooltip', 'original title preserved in data attribute')
|
27
|
-
})
|
28
|
-
|
29
|
-
test("should place tooltips relative to placement option", function () {
|
30
|
-
$.support.transition = false
|
31
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
32
|
-
.appendTo('#qunit-fixture')
|
33
|
-
.tooltip({placement: 'bottom'})
|
34
|
-
.tooltip('show')
|
35
|
-
|
36
|
-
ok($(".tooltip").is('.fade.bottom.in'), 'has correct classes applied')
|
37
|
-
tooltip.tooltip('hide')
|
38
|
-
})
|
39
|
-
|
40
|
-
test("should always allow html entities", function () {
|
41
|
-
$.support.transition = false
|
42
|
-
var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>')
|
43
|
-
.appendTo('#qunit-fixture')
|
44
|
-
.tooltip('show')
|
45
|
-
|
46
|
-
ok($('.tooltip b').length, 'b tag was inserted')
|
47
|
-
tooltip.tooltip('hide')
|
48
|
-
ok(!$(".tooltip").length, 'tooltip removed')
|
49
|
-
})
|
50
|
-
|
51
|
-
test("should respect custom classes", function () {
|
52
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
53
|
-
.appendTo('#qunit-fixture')
|
54
|
-
.tooltip({ template: '<div class="tooltip some-class"><div class="tooltip-arrow"/><div class="tooltip-inner"/></div>'})
|
55
|
-
.tooltip('show')
|
56
|
-
|
57
|
-
ok($('.tooltip').hasClass('some-class'), 'custom class is present')
|
58
|
-
tooltip.tooltip('hide')
|
59
|
-
ok(!$(".tooltip").length, 'tooltip removed')
|
60
|
-
})
|
61
|
-
|
62
|
-
test("should not show tooltip if leave event occurs before delay expires", function () {
|
63
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
64
|
-
.appendTo('#qunit-fixture')
|
65
|
-
.tooltip({ delay: 200 })
|
66
|
-
|
67
|
-
stop()
|
68
|
-
|
69
|
-
tooltip.trigger('mouseenter')
|
70
|
-
|
71
|
-
setTimeout(function () {
|
72
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
73
|
-
tooltip.trigger('mouseout')
|
74
|
-
setTimeout(function () {
|
75
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
76
|
-
start()
|
77
|
-
}, 200)
|
78
|
-
}, 100)
|
79
|
-
})
|
80
|
-
|
81
|
-
test("should not show tooltip if leave event occurs before delay expires, even if hide delay is 0", function () {
|
82
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
83
|
-
.appendTo('#qunit-fixture')
|
84
|
-
.tooltip({ delay: { show: 200, hide: 0} })
|
85
|
-
|
86
|
-
stop()
|
87
|
-
|
88
|
-
tooltip.trigger('mouseenter')
|
89
|
-
|
90
|
-
setTimeout(function () {
|
91
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
92
|
-
tooltip.trigger('mouseout')
|
93
|
-
setTimeout(function () {
|
94
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
95
|
-
start()
|
96
|
-
}, 200)
|
97
|
-
}, 100)
|
98
|
-
})
|
99
|
-
|
100
|
-
test("should not show tooltip if leave event occurs before delay expires", function () {
|
101
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
102
|
-
.appendTo('#qunit-fixture')
|
103
|
-
.tooltip({ delay: 100 })
|
104
|
-
stop()
|
105
|
-
tooltip.trigger('mouseenter')
|
106
|
-
setTimeout(function () {
|
107
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
108
|
-
tooltip.trigger('mouseout')
|
109
|
-
setTimeout(function () {
|
110
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
111
|
-
start()
|
112
|
-
}, 100)
|
113
|
-
}, 50)
|
114
|
-
})
|
115
|
-
|
116
|
-
test("should show tooltip if leave event hasn't occured before delay expires", function () {
|
117
|
-
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
118
|
-
.appendTo('#qunit-fixture')
|
119
|
-
.tooltip({ delay: 150 })
|
120
|
-
stop()
|
121
|
-
tooltip.trigger('mouseenter')
|
122
|
-
setTimeout(function () {
|
123
|
-
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
124
|
-
}, 100)
|
125
|
-
setTimeout(function () {
|
126
|
-
ok($(".tooltip").is('.fade.in'), 'tooltip has faded in')
|
127
|
-
start()
|
128
|
-
}, 200)
|
129
|
-
})
|
130
|
-
|
131
|
-
test("should detect if title string is html or text: foo", function () {
|
132
|
-
ok(!$.fn.tooltip.Constructor.prototype.isHTML('foo'), 'correctly detected html')
|
133
|
-
})
|
134
|
-
|
135
|
-
test("should detect if title string is html or text: &lt;foo&gt;", function () {
|
136
|
-
ok(!$.fn.tooltip.Constructor.prototype.isHTML('<foo>'), 'correctly detected html')
|
137
|
-
})
|
138
|
-
|
139
|
-
test("should detect if title string is html or text: <div>foo</div>", function () {
|
140
|
-
ok($.fn.tooltip.Constructor.prototype.isHTML('<div>foo</div>'), 'correctly detected html')
|
141
|
-
})
|
142
|
-
|
143
|
-
test("should detect if title string is html or text: asdfa<div>foo</div>asdfasdf", function () {
|
144
|
-
ok($.fn.tooltip.Constructor.prototype.isHTML('asdfa<div>foo</div>asdfasdf'), 'correctly detected html')
|
145
|
-
})
|
146
|
-
|
147
|
-
test("should detect if title string is html or text: document.createElement('div')", function () {
|
148
|
-
ok($.fn.tooltip.Constructor.prototype.isHTML(document.createElement('div')), 'correctly detected html')
|
149
|
-
})
|
150
|
-
|
151
|
-
test("should detect if title string is html or text: $('<div />)", function () {
|
152
|
-
ok($.fn.tooltip.Constructor.prototype.isHTML($('<div></div>')), 'correctly detected html')
|
153
|
-
})
|
154
|
-
|
155
|
-
})
|
@@ -1,13 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-transition")
|
4
|
-
|
5
|
-
test("should be defined on jquery support object", function () {
|
6
|
-
ok($.support.transition !== undefined, 'transition object is defined')
|
7
|
-
})
|
8
|
-
|
9
|
-
test("should provide an end object", function () {
|
10
|
-
ok($.support.transition ? $.support.transition.end : true, 'end string is defined')
|
11
|
-
})
|
12
|
-
|
13
|
-
})
|
@@ -1,148 +0,0 @@
|
|
1
|
-
$(function () {
|
2
|
-
|
3
|
-
module("bootstrap-typeahead")
|
4
|
-
|
5
|
-
test("should be defined on jquery object", function () {
|
6
|
-
ok($(document.body).typeahead, 'alert method is defined')
|
7
|
-
})
|
8
|
-
|
9
|
-
test("should return element", function () {
|
10
|
-
ok($(document.body).typeahead()[0] == document.body, 'document.body returned')
|
11
|
-
})
|
12
|
-
|
13
|
-
test("should listen to an input", function () {
|
14
|
-
var $input = $('<input />')
|
15
|
-
$input.typeahead()
|
16
|
-
ok($input.data('events').blur, 'has a blur event')
|
17
|
-
ok($input.data('events').keypress, 'has a keypress event')
|
18
|
-
ok($input.data('events').keyup, 'has a keyup event')
|
19
|
-
if ($.browser.webkit || $.browser.msie) {
|
20
|
-
ok($input.data('events').keydown, 'has a keydown event')
|
21
|
-
} else {
|
22
|
-
ok($input.data('events').keydown, 'does not have a keydown event')
|
23
|
-
}
|
24
|
-
})
|
25
|
-
|
26
|
-
test("should create a menu", function () {
|
27
|
-
var $input = $('<input />')
|
28
|
-
ok($input.typeahead().data('typeahead').$menu, 'has a menu')
|
29
|
-
})
|
30
|
-
|
31
|
-
test("should listen to the menu", function () {
|
32
|
-
var $input = $('<input />')
|
33
|
-
, $menu = $input.typeahead().data('typeahead').$menu
|
34
|
-
|
35
|
-
ok($menu.data('events').mouseover, 'has a mouseover(pseudo: mouseenter)')
|
36
|
-
ok($menu.data('events').click, 'has a click')
|
37
|
-
})
|
38
|
-
|
39
|
-
test("should show menu when query entered", function () {
|
40
|
-
var $input = $('<input />').typeahead({
|
41
|
-
source: ['aa', 'ab', 'ac']
|
42
|
-
})
|
43
|
-
, typeahead = $input.data('typeahead')
|
44
|
-
|
45
|
-
$input.val('a')
|
46
|
-
typeahead.lookup()
|
47
|
-
|
48
|
-
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
|
49
|
-
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
|
50
|
-
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
|
51
|
-
|
52
|
-
typeahead.$menu.remove()
|
53
|
-
})
|
54
|
-
|
55
|
-
test("should not explode when regex chars are entered", function () {
|
56
|
-
var $input = $('<input />').typeahead({
|
57
|
-
source: ['aa', 'ab', 'ac', 'mdo*', 'fat+']
|
58
|
-
})
|
59
|
-
, typeahead = $input.data('typeahead')
|
60
|
-
|
61
|
-
$input.val('+')
|
62
|
-
typeahead.lookup()
|
63
|
-
|
64
|
-
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
|
65
|
-
equals(typeahead.$menu.find('li').length, 1, 'has 1 item in menu')
|
66
|
-
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
|
67
|
-
|
68
|
-
typeahead.$menu.remove()
|
69
|
-
})
|
70
|
-
|
71
|
-
test("should hide menu when query entered", function () {
|
72
|
-
stop()
|
73
|
-
var $input = $('<input />').typeahead({
|
74
|
-
source: ['aa', 'ab', 'ac']
|
75
|
-
})
|
76
|
-
, typeahead = $input.data('typeahead')
|
77
|
-
|
78
|
-
$input.val('a')
|
79
|
-
typeahead.lookup()
|
80
|
-
|
81
|
-
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
|
82
|
-
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
|
83
|
-
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
|
84
|
-
|
85
|
-
$input.blur()
|
86
|
-
|
87
|
-
setTimeout(function () {
|
88
|
-
ok(!typeahead.$menu.is(":visible"), "typeahead is no longer visible")
|
89
|
-
start()
|
90
|
-
}, 200)
|
91
|
-
|
92
|
-
typeahead.$menu.remove()
|
93
|
-
})
|
94
|
-
|
95
|
-
test("should set next item when down arrow is pressed", function () {
|
96
|
-
var $input = $('<input />').typeahead({
|
97
|
-
source: ['aa', 'ab', 'ac']
|
98
|
-
})
|
99
|
-
, typeahead = $input.data('typeahead')
|
100
|
-
|
101
|
-
$input.val('a')
|
102
|
-
typeahead.lookup()
|
103
|
-
|
104
|
-
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
|
105
|
-
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
|
106
|
-
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
|
107
|
-
ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
|
108
|
-
|
109
|
-
$input.trigger({
|
110
|
-
type: 'keydown'
|
111
|
-
, keyCode: 40
|
112
|
-
})
|
113
|
-
|
114
|
-
ok(typeahead.$menu.find('li').first().next().hasClass('active'), "second item is active")
|
115
|
-
|
116
|
-
|
117
|
-
$input.trigger({
|
118
|
-
type: 'keydown'
|
119
|
-
, keyCode: 38
|
120
|
-
})
|
121
|
-
|
122
|
-
ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
|
123
|
-
|
124
|
-
typeahead.$menu.remove()
|
125
|
-
})
|
126
|
-
|
127
|
-
|
128
|
-
test("should set input value to selected item", function () {
|
129
|
-
var $input = $('<input />').typeahead({
|
130
|
-
source: ['aa', 'ab', 'ac']
|
131
|
-
})
|
132
|
-
, typeahead = $input.data('typeahead')
|
133
|
-
, changed = false
|
134
|
-
|
135
|
-
$input.val('a')
|
136
|
-
typeahead.lookup()
|
137
|
-
|
138
|
-
$input.change(function() { changed = true });
|
139
|
-
|
140
|
-
$(typeahead.$menu.find('li')[2]).mouseover().click()
|
141
|
-
|
142
|
-
equals($input.val(), 'ac', 'input value was correctly set')
|
143
|
-
ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
|
144
|
-
ok(changed, 'a change event was fired')
|
145
|
-
|
146
|
-
typeahead.$menu.remove()
|
147
|
-
})
|
148
|
-
})
|