sass-twitter-bootstrap 2.0.1 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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-affix.js +104 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +28 -32
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +29 -33
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +43 -24
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +50 -28
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +77 -19
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +113 -84
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +19 -11
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +50 -24
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +13 -8
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +44 -39
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +29 -20
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +73 -44
- data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
- data/vendor/assets/stylesheets/tests/css-tests.css +1 -12
- data/vendor/assets/stylesheets/tests/css-tests.html +22 -125
- data/vendor/assets/stylesheets/tests/navbar.html +39 -38
- data/vendor/assets/stylesheets/twitter/_accordion.scss +8 -2
- data/vendor/assets/stylesheets/twitter/_alerts.scss +16 -21
- data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +12 -10
- data/vendor/assets/stylesheets/twitter/_button-groups.scss +137 -39
- data/vendor/assets/stylesheets/twitter/_buttons.scss +129 -81
- data/vendor/assets/stylesheets/twitter/_carousel.scss +13 -3
- data/vendor/assets/stylesheets/twitter/_close.scss +16 -3
- data/vendor/assets/stylesheets/twitter/_code.scss +11 -10
- data/vendor/assets/stylesheets/twitter/_component-animations.scss +12 -8
- data/vendor/assets/stylesheets/twitter/_dropdowns.scss +133 -53
- data/vendor/assets/stylesheets/twitter/_forms.scss +298 -170
- data/vendor/assets/stylesheets/twitter/_grid.scss +17 -4
- data/vendor/assets/stylesheets/twitter/_hero-unit.scss +7 -3
- data/vendor/assets/stylesheets/twitter/_labels-badges.scss +69 -0
- data/vendor/assets/stylesheets/twitter/_layouts.scss +2 -3
- data/vendor/assets/stylesheets/twitter/_mixins.scss +359 -258
- data/vendor/assets/stylesheets/twitter/_modals.scss +26 -12
- data/vendor/assets/stylesheets/twitter/_navbar.scss +318 -143
- data/vendor/assets/stylesheets/twitter/_navs.scss +87 -56
- data/vendor/assets/stylesheets/twitter/_pager.scss +16 -6
- data/vendor/assets/stylesheets/twitter/_pagination.scss +23 -14
- data/vendor/assets/stylesheets/twitter/_popovers.scss +101 -33
- data/vendor/assets/stylesheets/twitter/_progress-bars.scss +43 -16
- data/vendor/assets/stylesheets/twitter/_reset.scss +16 -6
- data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +28 -0
- data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +174 -0
- data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +19 -0
- data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +177 -0
- data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +58 -0
- data/vendor/assets/stylesheets/twitter/_scaffolding.scss +32 -11
- data/vendor/assets/stylesheets/twitter/_sprites.scss +49 -14
- data/vendor/assets/stylesheets/twitter/_tables.scss +115 -42
- data/vendor/assets/stylesheets/twitter/_thumbnails.scss +23 -6
- data/vendor/assets/stylesheets/twitter/_tooltip.scss +47 -12
- data/vendor/assets/stylesheets/twitter/_type.scss +96 -93
- data/vendor/assets/stylesheets/twitter/_utilities.scss +24 -2
- data/vendor/assets/stylesheets/twitter/_variables.scss +202 -31
- data/vendor/assets/stylesheets/twitter/_wells.scss +17 -5
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +3 -7
- data/vendor/assets/stylesheets/twitter/responsive.scss +15 -301
- metadata +10 -7
- data/vendor/assets/stylesheets/tests/buttons.html +0 -139
- data/vendor/assets/stylesheets/tests/forms-responsive.html +0 -71
- data/vendor/assets/stylesheets/tests/navbar-fixed-top.html +0 -104
- data/vendor/assets/stylesheets/tests/navbar-static-top.html +0 -107
- data/vendor/assets/stylesheets/twitter/_labels.scss +0 -32
Binary file
|
Binary file
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/* ==========================================================
|
2
|
+
* bootstrap-affix.js v2.1.1
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#affix
|
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
|
+
/* AFFIX CLASS DEFINITION
|
27
|
+
* ====================== */
|
28
|
+
|
29
|
+
var Affix = function (element, options) {
|
30
|
+
this.options = $.extend({}, $.fn.affix.defaults, options)
|
31
|
+
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
32
|
+
this.$element = $(element)
|
33
|
+
this.checkPosition()
|
34
|
+
}
|
35
|
+
|
36
|
+
Affix.prototype.checkPosition = function () {
|
37
|
+
if (!this.$element.is(':visible')) return
|
38
|
+
|
39
|
+
var scrollHeight = $(document).height()
|
40
|
+
, scrollTop = this.$window.scrollTop()
|
41
|
+
, position = this.$element.offset()
|
42
|
+
, offset = this.options.offset
|
43
|
+
, offsetBottom = offset.bottom
|
44
|
+
, offsetTop = offset.top
|
45
|
+
, reset = 'affix affix-top affix-bottom'
|
46
|
+
, affix
|
47
|
+
|
48
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
49
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
50
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
51
|
+
|
52
|
+
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
|
53
|
+
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
|
54
|
+
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
|
55
|
+
'top' : false
|
56
|
+
|
57
|
+
if (this.affixed === affix) return
|
58
|
+
|
59
|
+
this.affixed = affix
|
60
|
+
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
61
|
+
|
62
|
+
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
/* AFFIX PLUGIN DEFINITION
|
67
|
+
* ======================= */
|
68
|
+
|
69
|
+
$.fn.affix = function (option) {
|
70
|
+
return this.each(function () {
|
71
|
+
var $this = $(this)
|
72
|
+
, data = $this.data('affix')
|
73
|
+
, options = typeof option == 'object' && option
|
74
|
+
if (!data) $this.data('affix', (data = new Affix(this, options)))
|
75
|
+
if (typeof option == 'string') data[option]()
|
76
|
+
})
|
77
|
+
}
|
78
|
+
|
79
|
+
$.fn.affix.Constructor = Affix
|
80
|
+
|
81
|
+
$.fn.affix.defaults = {
|
82
|
+
offset: 0
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
/* AFFIX DATA-API
|
87
|
+
* ============== */
|
88
|
+
|
89
|
+
$(window).on('load', function () {
|
90
|
+
$('[data-spy="affix"]').each(function () {
|
91
|
+
var $spy = $(this)
|
92
|
+
, data = $spy.data()
|
93
|
+
|
94
|
+
data.offset = data.offset || {}
|
95
|
+
|
96
|
+
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
97
|
+
data.offsetTop && (data.offset.top = data.offsetTop)
|
98
|
+
|
99
|
+
$spy.affix(data)
|
100
|
+
})
|
101
|
+
})
|
102
|
+
|
103
|
+
|
104
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-alert.js v2.
|
2
|
+
* bootstrap-alert.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,61 +18,57 @@
|
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* ALERT CLASS DEFINITION
|
26
27
|
* ====================== */
|
27
28
|
|
28
29
|
var dismiss = '[data-dismiss="alert"]'
|
29
|
-
, Alert = function (
|
30
|
+
, Alert = function (el) {
|
30
31
|
$(el).on('click', dismiss, this.close)
|
31
32
|
}
|
32
33
|
|
33
|
-
Alert.prototype = {
|
34
|
-
|
35
|
-
|
34
|
+
Alert.prototype.close = function (e) {
|
35
|
+
var $this = $(this)
|
36
|
+
, selector = $this.attr('data-target')
|
37
|
+
, $parent
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
if (!selector) {
|
40
|
+
selector = $this.attr('href')
|
41
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
42
|
+
}
|
41
43
|
|
42
|
-
|
43
|
-
selector = $this.attr('href')
|
44
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
45
|
-
}
|
44
|
+
$parent = $(selector)
|
46
45
|
|
47
|
-
|
48
|
-
$parent.trigger('close')
|
46
|
+
e && e.preventDefault()
|
49
47
|
|
50
|
-
|
48
|
+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
51
49
|
|
52
|
-
|
50
|
+
$parent.trigger(e = $.Event('close'))
|
53
51
|
|
54
|
-
|
55
|
-
.trigger('close')
|
56
|
-
.removeClass('in')
|
52
|
+
if (e.isDefaultPrevented()) return
|
57
53
|
|
58
|
-
|
59
|
-
$parent
|
60
|
-
.trigger('closed')
|
61
|
-
.remove()
|
62
|
-
}
|
54
|
+
$parent.removeClass('in')
|
63
55
|
|
64
|
-
|
65
|
-
|
66
|
-
|
56
|
+
function removeElement() {
|
57
|
+
$parent
|
58
|
+
.trigger('closed')
|
59
|
+
.remove()
|
67
60
|
}
|
68
61
|
|
62
|
+
$.support.transition && $parent.hasClass('fade') ?
|
63
|
+
$parent.on($.support.transition.end, removeElement) :
|
64
|
+
removeElement()
|
69
65
|
}
|
70
66
|
|
71
67
|
|
72
68
|
/* ALERT PLUGIN DEFINITION
|
73
69
|
* ======================= */
|
74
70
|
|
75
|
-
$.fn.alert = function (
|
71
|
+
$.fn.alert = function (option) {
|
76
72
|
return this.each(function () {
|
77
73
|
var $this = $(this)
|
78
74
|
, data = $this.data('alert')
|
@@ -91,4 +87,4 @@
|
|
91
87
|
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
92
88
|
})
|
93
89
|
|
94
|
-
}(
|
90
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-button.js v2.
|
2
|
+
* bootstrap-button.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,58 +17,54 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ============================================================ */
|
19
19
|
|
20
|
-
!function( $ ){
|
21
20
|
|
22
|
-
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
24
|
+
|
23
25
|
|
24
26
|
/* BUTTON PUBLIC CLASS DEFINITION
|
25
27
|
* ============================== */
|
26
28
|
|
27
|
-
var Button = function (
|
29
|
+
var Button = function (element, options) {
|
28
30
|
this.$element = $(element)
|
29
31
|
this.options = $.extend({}, $.fn.button.defaults, options)
|
30
32
|
}
|
31
33
|
|
32
|
-
Button.prototype = {
|
33
|
-
|
34
|
-
|
34
|
+
Button.prototype.setState = function (state) {
|
35
|
+
var d = 'disabled'
|
36
|
+
, $el = this.$element
|
37
|
+
, data = $el.data()
|
38
|
+
, val = $el.is('input') ? 'val' : 'html'
|
35
39
|
|
36
|
-
|
37
|
-
|
38
|
-
, $el = this.$element
|
39
|
-
, data = $el.data()
|
40
|
-
, val = $el.is('input') ? 'val' : 'html'
|
40
|
+
state = state + 'Text'
|
41
|
+
data.resetText || $el.data('resetText', $el[val]())
|
41
42
|
|
42
|
-
|
43
|
-
data.resetText || $el.data('resetText', $el[val]())
|
43
|
+
$el[val](data[state] || this.options[state])
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}, 0)
|
53
|
-
}
|
54
|
-
|
55
|
-
, toggle: function () {
|
56
|
-
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
45
|
+
// push to event loop to allow forms to submit
|
46
|
+
setTimeout(function () {
|
47
|
+
state == 'loadingText' ?
|
48
|
+
$el.addClass(d).attr(d, d) :
|
49
|
+
$el.removeClass(d).removeAttr(d)
|
50
|
+
}, 0)
|
51
|
+
}
|
57
52
|
|
58
|
-
|
59
|
-
|
60
|
-
.removeClass('active')
|
53
|
+
Button.prototype.toggle = function () {
|
54
|
+
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
61
55
|
|
62
|
-
|
63
|
-
|
56
|
+
$parent && $parent
|
57
|
+
.find('.active')
|
58
|
+
.removeClass('active')
|
64
59
|
|
60
|
+
this.$element.toggleClass('active')
|
65
61
|
}
|
66
62
|
|
67
63
|
|
68
64
|
/* BUTTON PLUGIN DEFINITION
|
69
65
|
* ======================== */
|
70
66
|
|
71
|
-
$.fn.button = function (
|
67
|
+
$.fn.button = function (option) {
|
72
68
|
return this.each(function () {
|
73
69
|
var $this = $(this)
|
74
70
|
, data = $this.data('button')
|
@@ -97,4 +93,4 @@
|
|
97
93
|
})
|
98
94
|
})
|
99
95
|
|
100
|
-
}(
|
96
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-carousel.js v2.
|
2
|
+
* bootstrap-carousel.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,28 +18,35 @@
|
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* CAROUSEL CLASS DEFINITION
|
26
27
|
* ========================= */
|
27
28
|
|
28
29
|
var Carousel = function (element, options) {
|
29
30
|
this.$element = $(element)
|
30
|
-
this.options =
|
31
|
+
this.options = options
|
31
32
|
this.options.slide && this.slide(this.options.slide)
|
33
|
+
this.options.pause == 'hover' && this.$element
|
34
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
35
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
32
36
|
}
|
33
37
|
|
34
38
|
Carousel.prototype = {
|
35
39
|
|
36
|
-
cycle: function () {
|
37
|
-
|
40
|
+
cycle: function (e) {
|
41
|
+
if (!e) this.paused = false
|
42
|
+
this.options.interval
|
43
|
+
&& !this.paused
|
44
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
38
45
|
return this
|
39
46
|
}
|
40
47
|
|
41
48
|
, to: function (pos) {
|
42
|
-
var $active = this.$element.find('.active')
|
49
|
+
var $active = this.$element.find('.item.active')
|
43
50
|
, children = $active.parent().children()
|
44
51
|
, activePos = children.index($active)
|
45
52
|
, that = this
|
@@ -59,7 +66,12 @@
|
|
59
66
|
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
60
67
|
}
|
61
68
|
|
62
|
-
, pause: function () {
|
69
|
+
, pause: function (e) {
|
70
|
+
if (!e) this.paused = true
|
71
|
+
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
72
|
+
this.$element.trigger($.support.transition.end)
|
73
|
+
this.cycle()
|
74
|
+
}
|
63
75
|
clearInterval(this.interval)
|
64
76
|
this.interval = null
|
65
77
|
return this
|
@@ -76,14 +88,15 @@
|
|
76
88
|
}
|
77
89
|
|
78
90
|
, slide: function (type, next) {
|
79
|
-
var $active = this.$element.find('.active')
|
91
|
+
var $active = this.$element.find('.item.active')
|
80
92
|
, $next = next || $active[type]()
|
81
93
|
, isCycling = this.interval
|
82
94
|
, direction = type == 'next' ? 'left' : 'right'
|
83
95
|
, fallback = type == 'next' ? 'first' : 'last'
|
84
96
|
, that = this
|
85
|
-
|
86
|
-
|
97
|
+
, e = $.Event('slide', {
|
98
|
+
relatedTarget: $next[0]
|
99
|
+
})
|
87
100
|
|
88
101
|
this.sliding = true
|
89
102
|
|
@@ -91,24 +104,28 @@
|
|
91
104
|
|
92
105
|
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
93
106
|
|
94
|
-
if (
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
this.$element.trigger('slid')
|
100
|
-
} else {
|
107
|
+
if ($next.hasClass('active')) return
|
108
|
+
|
109
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
110
|
+
this.$element.trigger(e)
|
111
|
+
if (e.isDefaultPrevented()) return
|
101
112
|
$next.addClass(type)
|
102
113
|
$next[0].offsetWidth // force reflow
|
103
114
|
$active.addClass(direction)
|
104
115
|
$next.addClass(direction)
|
105
|
-
this.$element.trigger('slide')
|
106
116
|
this.$element.one($.support.transition.end, function () {
|
107
117
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
108
118
|
$active.removeClass(['active', direction].join(' '))
|
109
119
|
that.sliding = false
|
110
120
|
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
111
121
|
})
|
122
|
+
} else {
|
123
|
+
this.$element.trigger(e)
|
124
|
+
if (e.isDefaultPrevented()) return
|
125
|
+
$active.removeClass('active')
|
126
|
+
$next.addClass('active')
|
127
|
+
this.sliding = false
|
128
|
+
this.$element.trigger('slid')
|
112
129
|
}
|
113
130
|
|
114
131
|
isCycling && this.cycle()
|
@@ -122,20 +139,22 @@
|
|
122
139
|
/* CAROUSEL PLUGIN DEFINITION
|
123
140
|
* ========================== */
|
124
141
|
|
125
|
-
$.fn.carousel = function (
|
142
|
+
$.fn.carousel = function (option) {
|
126
143
|
return this.each(function () {
|
127
144
|
var $this = $(this)
|
128
145
|
, data = $this.data('carousel')
|
129
|
-
, options = typeof option == 'object' && option
|
146
|
+
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
147
|
+
, action = typeof option == 'string' ? option : options.slide
|
130
148
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
131
149
|
if (typeof option == 'number') data.to(option)
|
132
|
-
else if (
|
133
|
-
else data.cycle()
|
150
|
+
else if (action) data[action]()
|
151
|
+
else if (options.interval) data.cycle()
|
134
152
|
})
|
135
153
|
}
|
136
154
|
|
137
155
|
$.fn.carousel.defaults = {
|
138
156
|
interval: 5000
|
157
|
+
, pause: 'hover'
|
139
158
|
}
|
140
159
|
|
141
160
|
$.fn.carousel.Constructor = Carousel
|
@@ -154,4 +173,4 @@
|
|
154
173
|
})
|
155
174
|
})
|
156
175
|
|
157
|
-
}(
|
176
|
+
}(window.jQuery);
|