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
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/docs/assets/ico/favicon.ico
DELETED
Binary file
|
data/docs/assets/img/bird.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/docs/assets/js/README.md
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
## 2.0 BOOTSTRAP JS PHILOSOPHY
|
2
|
-
These are the high-level design rules which guide the development of Bootstrap's plugin apis.
|
3
|
-
|
4
|
-
---
|
5
|
-
|
6
|
-
### DATA-ATTRIBUTE API
|
7
|
-
|
8
|
-
We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
|
9
|
-
|
10
|
-
We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
|
11
|
-
|
12
|
-
$('body').off('.data-api')
|
13
|
-
|
14
|
-
To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
|
15
|
-
|
16
|
-
$('body').off('.alert.data-api')
|
17
|
-
|
18
|
-
---
|
19
|
-
|
20
|
-
### PROGRAMATIC API
|
21
|
-
|
22
|
-
We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
|
23
|
-
|
24
|
-
All public APIs should be single, chainable methods, and return the collection acted upon.
|
25
|
-
|
26
|
-
$(".btn.danger").button("toggle").addClass("fat")
|
27
|
-
|
28
|
-
All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
|
29
|
-
|
30
|
-
$("#myModal").modal() // initialized with defaults
|
31
|
-
$("#myModal").modal({ keyboard: false }) // initialized with now keyboard
|
32
|
-
$("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
|
33
|
-
|
34
|
-
---
|
35
|
-
|
36
|
-
### OPTIONS
|
37
|
-
|
38
|
-
Options should be sparse and add universal value. We should pick the right defaults.
|
39
|
-
|
40
|
-
All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
|
41
|
-
|
42
|
-
$.fn.modal.defaults = { … }
|
43
|
-
|
44
|
-
An options definition should take the following form:
|
45
|
-
|
46
|
-
*noun*: *adjective* - describes or modifies a quality of an instance
|
47
|
-
|
48
|
-
examples:
|
49
|
-
|
50
|
-
backdrop: true
|
51
|
-
keyboard: false
|
52
|
-
placement: 'top'
|
53
|
-
|
54
|
-
---
|
55
|
-
|
56
|
-
### EVENTS
|
57
|
-
|
58
|
-
All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
|
59
|
-
|
60
|
-
show | shown
|
61
|
-
hide | hidden
|
62
|
-
|
63
|
-
---
|
64
|
-
|
65
|
-
### CONSTRUCTORS
|
66
|
-
|
67
|
-
Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
|
68
|
-
|
69
|
-
|
70
|
-
$.fn.popover.Constructor
|
71
|
-
|
72
|
-
---
|
73
|
-
|
74
|
-
### DATA ACCESSOR
|
75
|
-
|
76
|
-
Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
|
77
|
-
|
78
|
-
$('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
|
79
|
-
|
80
|
-
---
|
81
|
-
|
82
|
-
### DATA ATTRIBUTES
|
83
|
-
|
84
|
-
Data attributes should take the following form:
|
85
|
-
|
86
|
-
- data-{{verb}}={{plugin}} - defines main interaction
|
87
|
-
- data-target || href^=# - defined on "control" element (if element controls an element other than self)
|
88
|
-
- data-{{noun}} - defines class instance options
|
89
|
-
|
90
|
-
examples:
|
91
|
-
|
92
|
-
// control other targets
|
93
|
-
data-toggle="modal" data-target="#foo"
|
94
|
-
data-toggle="collapse" data-target="#foo" data-parent="#bar"
|
95
|
-
|
96
|
-
// defined on element they control
|
97
|
-
data-spy="scroll"
|
98
|
-
|
99
|
-
data-dismiss="modal"
|
100
|
-
data-dismiss="alert"
|
101
|
-
|
102
|
-
data-toggle="dropdown"
|
103
|
-
|
104
|
-
data-toggle="button"
|
105
|
-
data-toggle="buttons-checkbox"
|
106
|
-
data-toggle="buttons-radio"
|
@@ -1,184 +0,0 @@
|
|
1
|
-
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
2
|
-
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
3
|
-
// ++++++++++++++++++++++++++++++++++++++++++
|
4
|
-
|
5
|
-
!function ($) {
|
6
|
-
|
7
|
-
$(function(){
|
8
|
-
|
9
|
-
// Disable certain links in docs
|
10
|
-
$('section [href^=#]').click(function (e) {
|
11
|
-
e.preventDefault()
|
12
|
-
})
|
13
|
-
|
14
|
-
// make code pretty
|
15
|
-
window.prettyPrint && prettyPrint()
|
16
|
-
|
17
|
-
// add-ons
|
18
|
-
$('.add-on :checkbox').on('click', function () {
|
19
|
-
var $this = $(this)
|
20
|
-
, method = $this.attr('checked') ? 'addClass' : 'removeClass'
|
21
|
-
$(this).parents('.add-on')[method]('active')
|
22
|
-
})
|
23
|
-
|
24
|
-
// position static twipsies for components page
|
25
|
-
if ($(".twipsies a").length) {
|
26
|
-
$(window).on('load resize', function () {
|
27
|
-
$(".twipsies a").each(function () {
|
28
|
-
$(this)
|
29
|
-
.tooltip({
|
30
|
-
placement: $(this).attr('title')
|
31
|
-
, trigger: 'manual'
|
32
|
-
})
|
33
|
-
.tooltip('show')
|
34
|
-
})
|
35
|
-
})
|
36
|
-
}
|
37
|
-
|
38
|
-
// add tipsies to grid for scaffolding
|
39
|
-
if ($('#grid-system').length) {
|
40
|
-
$('#grid-system').tooltip({
|
41
|
-
selector: '.show-grid > div'
|
42
|
-
, title: function () { return $(this).width() + 'px' }
|
43
|
-
})
|
44
|
-
}
|
45
|
-
|
46
|
-
// fix sub nav on scroll
|
47
|
-
var $win = $(window)
|
48
|
-
, $nav = $('.subnav')
|
49
|
-
, navTop = $('.subnav').length && $('.subnav').offset().top - 40
|
50
|
-
, isFixed = 0
|
51
|
-
|
52
|
-
processScroll()
|
53
|
-
|
54
|
-
// hack sad times - holdover until rewrite for 2.1
|
55
|
-
$nav.on('click', function () {
|
56
|
-
if (!isFixed) setTimeout(function () { $win.scrollTop($win.scrollTop() - 47) }, 10)
|
57
|
-
})
|
58
|
-
|
59
|
-
$win.on('scroll', processScroll)
|
60
|
-
|
61
|
-
function processScroll() {
|
62
|
-
var i, scrollTop = $win.scrollTop()
|
63
|
-
if (scrollTop >= navTop && !isFixed) {
|
64
|
-
isFixed = 1
|
65
|
-
$nav.addClass('subnav-fixed')
|
66
|
-
} else if (scrollTop <= navTop && isFixed) {
|
67
|
-
isFixed = 0
|
68
|
-
$nav.removeClass('subnav-fixed')
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
// tooltip demo
|
73
|
-
$('.tooltip-demo.well').tooltip({
|
74
|
-
selector: "a[rel=tooltip]"
|
75
|
-
})
|
76
|
-
|
77
|
-
$('.tooltip-test').tooltip()
|
78
|
-
$('.popover-test').popover()
|
79
|
-
|
80
|
-
// popover demo
|
81
|
-
$("a[rel=popover]")
|
82
|
-
.popover()
|
83
|
-
.click(function(e) {
|
84
|
-
e.preventDefault()
|
85
|
-
})
|
86
|
-
|
87
|
-
// button state demo
|
88
|
-
$('#fat-btn')
|
89
|
-
.click(function () {
|
90
|
-
var btn = $(this)
|
91
|
-
btn.button('loading')
|
92
|
-
setTimeout(function () {
|
93
|
-
btn.button('reset')
|
94
|
-
}, 3000)
|
95
|
-
})
|
96
|
-
|
97
|
-
// carousel demo
|
98
|
-
$('#myCarousel').carousel()
|
99
|
-
|
100
|
-
// javascript build logic
|
101
|
-
var inputsComponent = $("#components.download input")
|
102
|
-
, inputsPlugin = $("#plugins.download input")
|
103
|
-
, inputsVariables = $("#variables.download input")
|
104
|
-
|
105
|
-
// toggle all plugin checkboxes
|
106
|
-
$('#components.download .toggle-all').on('click', function (e) {
|
107
|
-
e.preventDefault()
|
108
|
-
inputsComponent.attr('checked', !inputsComponent.is(':checked'))
|
109
|
-
})
|
110
|
-
|
111
|
-
$('#plugins.download .toggle-all').on('click', function (e) {
|
112
|
-
e.preventDefault()
|
113
|
-
inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
|
114
|
-
})
|
115
|
-
|
116
|
-
$('#variables.download .toggle-all').on('click', function (e) {
|
117
|
-
e.preventDefault()
|
118
|
-
inputsVariables.val('')
|
119
|
-
})
|
120
|
-
|
121
|
-
// request built javascript
|
122
|
-
$('.download-btn').on('click', function () {
|
123
|
-
|
124
|
-
var css = $("#components.download input:checked")
|
125
|
-
.map(function () { return this.value })
|
126
|
-
.toArray()
|
127
|
-
, js = $("#plugins.download input:checked")
|
128
|
-
.map(function () { return this.value })
|
129
|
-
.toArray()
|
130
|
-
, vars = {}
|
131
|
-
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
|
132
|
-
|
133
|
-
$("#variables.download input")
|
134
|
-
.each(function () {
|
135
|
-
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
|
136
|
-
})
|
137
|
-
|
138
|
-
$.ajax({
|
139
|
-
type: 'POST'
|
140
|
-
, url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
|
141
|
-
, dataType: 'jsonpi'
|
142
|
-
, params: {
|
143
|
-
js: js
|
144
|
-
, css: css
|
145
|
-
, vars: vars
|
146
|
-
, img: img
|
147
|
-
}
|
148
|
-
})
|
149
|
-
})
|
150
|
-
})
|
151
|
-
|
152
|
-
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
|
153
|
-
$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
|
154
|
-
var url = opts.url;
|
155
|
-
|
156
|
-
return {
|
157
|
-
send: function(_, completeCallback) {
|
158
|
-
var name = 'jQuery_iframe_' + jQuery.now()
|
159
|
-
, iframe, form
|
160
|
-
|
161
|
-
iframe = $('<iframe>')
|
162
|
-
.attr('name', name)
|
163
|
-
.appendTo('head')
|
164
|
-
|
165
|
-
form = $('<form>')
|
166
|
-
.attr('method', opts.type) // GET or POST
|
167
|
-
.attr('action', url)
|
168
|
-
.attr('target', name)
|
169
|
-
|
170
|
-
$.each(opts.params, function(k, v) {
|
171
|
-
|
172
|
-
$('<input>')
|
173
|
-
.attr('type', 'hidden')
|
174
|
-
.attr('name', k)
|
175
|
-
.attr('value', typeof v == 'string' ? v : JSON.stringify(v))
|
176
|
-
.appendTo(form)
|
177
|
-
})
|
178
|
-
|
179
|
-
form.appendTo('body').submit()
|
180
|
-
}
|
181
|
-
}
|
182
|
-
})
|
183
|
-
|
184
|
-
}(window.jQuery)
|
@@ -1,90 +0,0 @@
|
|
1
|
-
/* ==========================================================
|
2
|
-
* bootstrap-alert.js v2.0.4
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
|
-
* ==========================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ========================================================== */
|
19
|
-
|
20
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* ALERT CLASS DEFINITION
|
27
|
-
* ====================== */
|
28
|
-
|
29
|
-
var dismiss = '[data-dismiss="alert"]'
|
30
|
-
, Alert = function (el) {
|
31
|
-
$(el).on('click', dismiss, this.close)
|
32
|
-
}
|
33
|
-
|
34
|
-
Alert.prototype.close = function (e) {
|
35
|
-
var $this = $(this)
|
36
|
-
, selector = $this.attr('data-target')
|
37
|
-
, $parent
|
38
|
-
|
39
|
-
if (!selector) {
|
40
|
-
selector = $this.attr('href')
|
41
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
42
|
-
}
|
43
|
-
|
44
|
-
$parent = $(selector)
|
45
|
-
|
46
|
-
e && e.preventDefault()
|
47
|
-
|
48
|
-
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
49
|
-
|
50
|
-
$parent.trigger(e = $.Event('close'))
|
51
|
-
|
52
|
-
if (e.isDefaultPrevented()) return
|
53
|
-
|
54
|
-
$parent.removeClass('in')
|
55
|
-
|
56
|
-
function removeElement() {
|
57
|
-
$parent
|
58
|
-
.trigger('closed')
|
59
|
-
.remove()
|
60
|
-
}
|
61
|
-
|
62
|
-
$.support.transition && $parent.hasClass('fade') ?
|
63
|
-
$parent.on($.support.transition.end, removeElement) :
|
64
|
-
removeElement()
|
65
|
-
}
|
66
|
-
|
67
|
-
|
68
|
-
/* ALERT PLUGIN DEFINITION
|
69
|
-
* ======================= */
|
70
|
-
|
71
|
-
$.fn.alert = function (option) {
|
72
|
-
return this.each(function () {
|
73
|
-
var $this = $(this)
|
74
|
-
, data = $this.data('alert')
|
75
|
-
if (!data) $this.data('alert', (data = new Alert(this)))
|
76
|
-
if (typeof option == 'string') data[option].call($this)
|
77
|
-
})
|
78
|
-
}
|
79
|
-
|
80
|
-
$.fn.alert.Constructor = Alert
|
81
|
-
|
82
|
-
|
83
|
-
/* ALERT DATA-API
|
84
|
-
* ============== */
|
85
|
-
|
86
|
-
$(function () {
|
87
|
-
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
88
|
-
})
|
89
|
-
|
90
|
-
}(window.jQuery);
|