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
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.
|
2
|
+
* bootstrap-popover.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,14 +18,19 @@
|
|
18
18
|
* =========================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
22
|
|
23
|
-
|
23
|
+
"use strict"; // jshint ;_;
|
24
24
|
|
25
|
-
|
25
|
+
|
26
|
+
/* POPOVER PUBLIC CLASS DEFINITION
|
27
|
+
* =============================== */
|
28
|
+
|
29
|
+
var Popover = function (element, options) {
|
26
30
|
this.init('popover', element, options)
|
27
31
|
}
|
28
32
|
|
33
|
+
|
29
34
|
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
30
35
|
========================================== */
|
31
36
|
|
@@ -38,8 +43,8 @@
|
|
38
43
|
, title = this.getTitle()
|
39
44
|
, content = this.getContent()
|
40
45
|
|
41
|
-
$tip.find('.popover-title')[
|
42
|
-
$tip.find('.popover-content > *')[
|
46
|
+
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
47
|
+
$tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
|
43
48
|
|
44
49
|
$tip.removeClass('fade top bottom left right in')
|
45
50
|
}
|
@@ -56,25 +61,27 @@
|
|
56
61
|
content = $e.attr('data-content')
|
57
62
|
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
58
63
|
|
59
|
-
content = content.toString().replace(/(^\s*|\s*$)/, "")
|
60
|
-
|
61
64
|
return content
|
62
65
|
}
|
63
66
|
|
64
|
-
, tip: function() {
|
67
|
+
, tip: function () {
|
65
68
|
if (!this.$tip) {
|
66
69
|
this.$tip = $(this.options.template)
|
67
70
|
}
|
68
71
|
return this.$tip
|
69
72
|
}
|
70
73
|
|
74
|
+
, destroy: function () {
|
75
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
76
|
+
}
|
77
|
+
|
71
78
|
})
|
72
79
|
|
73
80
|
|
74
81
|
/* POPOVER PLUGIN DEFINITION
|
75
82
|
* ======================= */
|
76
83
|
|
77
|
-
$.fn.popover = function (
|
84
|
+
$.fn.popover = function (option) {
|
78
85
|
return this.each(function () {
|
79
86
|
var $this = $(this)
|
80
87
|
, data = $this.data('popover')
|
@@ -88,8 +95,9 @@
|
|
88
95
|
|
89
96
|
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
90
97
|
placement: 'right'
|
98
|
+
, trigger: 'click'
|
91
99
|
, content: ''
|
92
100
|
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
|
93
101
|
})
|
94
102
|
|
95
|
-
}(
|
103
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.
|
2
|
+
* bootstrap-scrollspy.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,23 +17,25 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ============================================================== */
|
19
19
|
|
20
|
-
!function ( $ ) {
|
21
20
|
|
22
|
-
|
21
|
+
!function ($) {
|
23
22
|
|
24
|
-
|
25
|
-
* ========================== */
|
23
|
+
"use strict"; // jshint ;_;
|
26
24
|
|
27
|
-
|
25
|
+
|
26
|
+
/* SCROLLSPY CLASS DEFINITION
|
27
|
+
* ========================== */
|
28
|
+
|
29
|
+
function ScrollSpy(element, options) {
|
28
30
|
var process = $.proxy(this.process, this)
|
29
31
|
, $element = $(element).is('body') ? $(window) : $(element)
|
30
32
|
, href
|
31
33
|
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
32
|
-
this.$scrollElement = $element.on('scroll.scroll.data-api', process)
|
34
|
+
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
|
33
35
|
this.selector = (this.options.target
|
34
36
|
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
35
37
|
|| '') + ' .nav li > a'
|
36
|
-
this.$body = $('body')
|
38
|
+
this.$body = $('body')
|
37
39
|
this.refresh()
|
38
40
|
this.process()
|
39
41
|
}
|
@@ -43,25 +45,43 @@
|
|
43
45
|
constructor: ScrollSpy
|
44
46
|
|
45
47
|
, refresh: function () {
|
46
|
-
|
48
|
+
var self = this
|
49
|
+
, $targets
|
50
|
+
|
51
|
+
this.offsets = $([])
|
52
|
+
this.targets = $([])
|
53
|
+
|
54
|
+
$targets = this.$body
|
47
55
|
.find(this.selector)
|
48
56
|
.map(function () {
|
49
|
-
var
|
50
|
-
|
57
|
+
var $el = $(this)
|
58
|
+
, href = $el.data('target') || $el.attr('href')
|
59
|
+
, $href = /^#\w/.test(href) && $(href)
|
60
|
+
return ( $href
|
61
|
+
&& $href.length
|
62
|
+
&& [[ $href.position().top, href ]] ) || null
|
63
|
+
})
|
64
|
+
.sort(function (a, b) { return a[0] - b[0] })
|
65
|
+
.each(function () {
|
66
|
+
self.offsets.push(this[0])
|
67
|
+
self.targets.push(this[1])
|
51
68
|
})
|
52
|
-
|
53
|
-
this.offsets = $.map(this.targets, function (id) {
|
54
|
-
return $(id).position().top
|
55
|
-
})
|
56
69
|
}
|
57
70
|
|
58
71
|
, process: function () {
|
59
72
|
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
73
|
+
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
|
74
|
+
, maxScroll = scrollHeight - this.$scrollElement.height()
|
60
75
|
, offsets = this.offsets
|
61
76
|
, targets = this.targets
|
62
77
|
, activeTarget = this.activeTarget
|
63
78
|
, i
|
64
79
|
|
80
|
+
if (scrollTop >= maxScroll) {
|
81
|
+
return activeTarget != (i = targets.last()[0])
|
82
|
+
&& this.activate ( i )
|
83
|
+
}
|
84
|
+
|
65
85
|
for (i = offsets.length; i--;) {
|
66
86
|
activeTarget != targets[i]
|
67
87
|
&& scrollTop >= offsets[i]
|
@@ -72,21 +92,27 @@
|
|
72
92
|
|
73
93
|
, activate: function (target) {
|
74
94
|
var active
|
95
|
+
, selector
|
75
96
|
|
76
97
|
this.activeTarget = target
|
77
98
|
|
78
|
-
this
|
79
|
-
.
|
99
|
+
$(this.selector)
|
100
|
+
.parent('.active')
|
80
101
|
.removeClass('active')
|
81
102
|
|
82
|
-
|
83
|
-
|
103
|
+
selector = this.selector
|
104
|
+
+ '[data-target="' + target + '"],'
|
105
|
+
+ this.selector + '[href="' + target + '"]'
|
106
|
+
|
107
|
+
active = $(selector)
|
84
108
|
.parent('li')
|
85
109
|
.addClass('active')
|
86
110
|
|
87
|
-
if (
|
88
|
-
active.closest('li.dropdown').addClass('active')
|
111
|
+
if (active.parent('.dropdown-menu').length) {
|
112
|
+
active = active.closest('li.dropdown').addClass('active')
|
89
113
|
}
|
114
|
+
|
115
|
+
active.trigger('activate')
|
90
116
|
}
|
91
117
|
|
92
118
|
}
|
@@ -95,7 +121,7 @@
|
|
95
121
|
/* SCROLLSPY PLUGIN DEFINITION
|
96
122
|
* =========================== */
|
97
123
|
|
98
|
-
$.fn.scrollspy = function (
|
124
|
+
$.fn.scrollspy = function (option) {
|
99
125
|
return this.each(function () {
|
100
126
|
var $this = $(this)
|
101
127
|
, data = $this.data('scrollspy')
|
@@ -115,11 +141,11 @@
|
|
115
141
|
/* SCROLLSPY DATA-API
|
116
142
|
* ================== */
|
117
143
|
|
118
|
-
$(function () {
|
144
|
+
$(window).on('load', function () {
|
119
145
|
$('[data-spy="scroll"]').each(function () {
|
120
146
|
var $spy = $(this)
|
121
147
|
$spy.scrollspy($spy.data())
|
122
148
|
})
|
123
149
|
})
|
124
150
|
|
125
|
-
}(
|
151
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.
|
2
|
+
* bootstrap-tab.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
4
|
* ========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,14 +18,15 @@
|
|
18
18
|
* ======================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* TAB CLASS DEFINITION
|
26
27
|
* ==================== */
|
27
28
|
|
28
|
-
var Tab = function (
|
29
|
+
var Tab = function (element) {
|
29
30
|
this.element = $(element)
|
30
31
|
}
|
31
32
|
|
@@ -39,6 +40,7 @@
|
|
39
40
|
, selector = $this.attr('data-target')
|
40
41
|
, previous
|
41
42
|
, $target
|
43
|
+
, e
|
42
44
|
|
43
45
|
if (!selector) {
|
44
46
|
selector = $this.attr('href')
|
@@ -49,11 +51,14 @@
|
|
49
51
|
|
50
52
|
previous = $ul.find('.active a').last()[0]
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
, relatedTarget: previous
|
54
|
+
e = $.Event('show', {
|
55
|
+
relatedTarget: previous
|
55
56
|
})
|
56
57
|
|
58
|
+
$this.trigger(e)
|
59
|
+
|
60
|
+
if (e.isDefaultPrevented()) return
|
61
|
+
|
57
62
|
$target = $(selector)
|
58
63
|
|
59
64
|
this.activate($this.parent('li'), $ul)
|
@@ -127,4 +132,4 @@
|
|
127
132
|
})
|
128
133
|
})
|
129
134
|
|
130
|
-
}(
|
135
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-tooltip.js v2.
|
2
|
+
* bootstrap-tooltip.js v2.1.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
4
4
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
5
|
* ===========================================================
|
@@ -18,14 +18,16 @@
|
|
18
18
|
* limitations under the License.
|
19
19
|
* ========================================================== */
|
20
20
|
|
21
|
-
!function( $ ) {
|
22
21
|
|
23
|
-
|
22
|
+
!function ($) {
|
23
|
+
|
24
|
+
"use strict"; // jshint ;_;
|
25
|
+
|
24
26
|
|
25
27
|
/* TOOLTIP PUBLIC CLASS DEFINITION
|
26
28
|
* =============================== */
|
27
29
|
|
28
|
-
var Tooltip = function (
|
30
|
+
var Tooltip = function (element, options) {
|
29
31
|
this.init('tooltip', element, options)
|
30
32
|
}
|
31
33
|
|
@@ -33,7 +35,7 @@
|
|
33
35
|
|
34
36
|
constructor: Tooltip
|
35
37
|
|
36
|
-
, init: function (
|
38
|
+
, init: function (type, element, options) {
|
37
39
|
var eventIn
|
38
40
|
, eventOut
|
39
41
|
|
@@ -42,11 +44,13 @@
|
|
42
44
|
this.options = this.getOptions(options)
|
43
45
|
this.enabled = true
|
44
46
|
|
45
|
-
if (this.options.trigger
|
46
|
-
|
47
|
+
if (this.options.trigger == 'click') {
|
48
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
49
|
+
} else if (this.options.trigger != 'manual') {
|
50
|
+
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
|
47
51
|
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
|
48
|
-
this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
|
49
|
-
this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
|
52
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
53
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
50
54
|
}
|
51
55
|
|
52
56
|
this.options.selector ?
|
@@ -54,7 +58,7 @@
|
|
54
58
|
this.fixTitle()
|
55
59
|
}
|
56
60
|
|
57
|
-
, getOptions: function (
|
61
|
+
, getOptions: function (options) {
|
58
62
|
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
|
59
63
|
|
60
64
|
if (options.delay && typeof options.delay == 'number') {
|
@@ -67,34 +71,28 @@
|
|
67
71
|
return options
|
68
72
|
}
|
69
73
|
|
70
|
-
, enter: function (
|
74
|
+
, enter: function (e) {
|
71
75
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
72
76
|
|
73
|
-
if (!self.options.delay || !self.options.delay.show)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
81
|
-
}, self.options.delay.show)
|
82
|
-
}
|
77
|
+
if (!self.options.delay || !self.options.delay.show) return self.show()
|
78
|
+
|
79
|
+
clearTimeout(this.timeout)
|
80
|
+
self.hoverState = 'in'
|
81
|
+
this.timeout = setTimeout(function() {
|
82
|
+
if (self.hoverState == 'in') self.show()
|
83
|
+
}, self.options.delay.show)
|
83
84
|
}
|
84
85
|
|
85
|
-
, leave: function (
|
86
|
+
, leave: function (e) {
|
86
87
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
87
88
|
|
88
|
-
if (
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
}
|
96
|
-
}, self.options.delay.hide)
|
97
|
-
}
|
89
|
+
if (this.timeout) clearTimeout(this.timeout)
|
90
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
91
|
+
|
92
|
+
self.hoverState = 'out'
|
93
|
+
this.timeout = setTimeout(function() {
|
94
|
+
if (self.hoverState == 'out') self.hide()
|
95
|
+
}, self.options.delay.hide)
|
98
96
|
}
|
99
97
|
|
100
98
|
, show: function () {
|
@@ -154,7 +152,9 @@
|
|
154
152
|
|
155
153
|
, setContent: function () {
|
156
154
|
var $tip = this.tip()
|
157
|
-
|
155
|
+
, title = this.getTitle()
|
156
|
+
|
157
|
+
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
158
158
|
$tip.removeClass('fade in top bottom left right')
|
159
159
|
}
|
160
160
|
|
@@ -178,6 +178,8 @@
|
|
178
178
|
$.support.transition && this.$tip.hasClass('fade') ?
|
179
179
|
removeWithAnimation() :
|
180
180
|
$tip.remove()
|
181
|
+
|
182
|
+
return this
|
181
183
|
}
|
182
184
|
|
183
185
|
, fixTitle: function () {
|
@@ -206,8 +208,6 @@
|
|
206
208
|
title = $e.attr('data-original-title')
|
207
209
|
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
208
210
|
|
209
|
-
title = title.toString().replace(/(^\s*|\s*$)/, "")
|
210
|
-
|
211
211
|
return title
|
212
212
|
}
|
213
213
|
|
@@ -239,6 +239,10 @@
|
|
239
239
|
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
240
240
|
}
|
241
241
|
|
242
|
+
, destroy: function () {
|
243
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
244
|
+
}
|
245
|
+
|
242
246
|
}
|
243
247
|
|
244
248
|
|
@@ -259,12 +263,13 @@
|
|
259
263
|
|
260
264
|
$.fn.tooltip.defaults = {
|
261
265
|
animation: true
|
262
|
-
, delay: 0
|
263
|
-
, selector: false
|
264
266
|
, placement: 'top'
|
267
|
+
, selector: false
|
268
|
+
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
265
269
|
, trigger: 'hover'
|
266
270
|
, title: ''
|
267
|
-
,
|
271
|
+
, delay: 0
|
272
|
+
, html: true
|
268
273
|
}
|
269
274
|
|
270
|
-
}(
|
275
|
+
}(window.jQuery);
|