twitter-bootstrap-rails 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- data/README.md +40 -22
- data/app/helpers/flash_block_helper.rb +17 -0
- data/app/helpers/twitter_breadcrumbs_helper.rb +5 -0
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +14 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +1 -5
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +1 -5
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +1 -5
- data/lib/generators/bootstrap/themed/templates/show.html.erb +4 -4
- data/lib/twitter/bootstrap/rails/engine.rb +1 -1
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +28 -32
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +29 -33
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +27 -19
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +45 -26
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +18 -10
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +25 -17
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +13 -10
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +43 -17
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +12 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +40 -35
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +30 -20
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +25 -11
- data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +2 -3
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +55 -36
- data/vendor/toolkit/twitter/bootstrap/buttons.less +15 -11
- data/vendor/toolkit/twitter/bootstrap/close.less +12 -1
- data/vendor/toolkit/twitter/bootstrap/code.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +5 -5
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +15 -20
- data/vendor/toolkit/twitter/bootstrap/forms.less +58 -29
- data/vendor/toolkit/twitter/bootstrap/labels-badges.less +55 -0
- data/vendor/toolkit/twitter/bootstrap/layouts.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/mixins.less +53 -36
- data/vendor/toolkit/twitter/bootstrap/modals.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/navbar.less +64 -41
- data/vendor/toolkit/twitter/bootstrap/navs.less +36 -36
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -6
- data/vendor/toolkit/twitter/bootstrap/reset.less +3 -3
- data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +26 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +149 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +17 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +146 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +41 -0
- data/vendor/toolkit/twitter/bootstrap/responsive.less +14 -337
- data/vendor/toolkit/twitter/bootstrap/sprites.less +39 -6
- data/vendor/toolkit/twitter/bootstrap/tables.less +22 -5
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +14 -2
- data/vendor/toolkit/twitter/bootstrap/type.less +7 -6
- data/vendor/toolkit/twitter/bootstrap/variables.less +10 -6
- metadata +31 -11
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.0.
|
2
|
+
* bootstrap-scrollspy.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,9 +17,11 @@
|
|
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
|
/* SCROLLSPY CLASS DEFINITION
|
25
27
|
* ========================== */
|
@@ -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')) {
|
112
|
+
active = active.closest('li.dropdown').addClass('active')
|
89
113
|
}
|
114
|
+
|
115
|
+
active.trigger('activate')
|
90
116
|
}
|
91
117
|
|
92
118
|
}
|
@@ -122,4 +148,4 @@
|
|
122
148
|
})
|
123
149
|
})
|
124
150
|
|
125
|
-
}(
|
151
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.0.
|
2
|
+
* bootstrap-tab.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
4
|
* ========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,9 +18,10 @@
|
|
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
|
* ==================== */
|
@@ -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.0.
|
2
|
+
* bootstrap-tooltip.js v2.0.3
|
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
|
|
@@ -54,7 +56,7 @@
|
|
54
56
|
this.fixTitle()
|
55
57
|
}
|
56
58
|
|
57
|
-
, getOptions: function (
|
59
|
+
, getOptions: function (options) {
|
58
60
|
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
|
59
61
|
|
60
62
|
if (options.delay && typeof options.delay == 'number') {
|
@@ -67,34 +69,28 @@
|
|
67
69
|
return options
|
68
70
|
}
|
69
71
|
|
70
|
-
, enter: function (
|
72
|
+
, enter: function (e) {
|
71
73
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
72
74
|
|
73
|
-
if (!self.options.delay || !self.options.delay.show)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
81
|
-
}, self.options.delay.show)
|
82
|
-
}
|
75
|
+
if (!self.options.delay || !self.options.delay.show) return self.show()
|
76
|
+
|
77
|
+
clearTimeout(this.timeout)
|
78
|
+
self.hoverState = 'in'
|
79
|
+
this.timeout = setTimeout(function() {
|
80
|
+
if (self.hoverState == 'in') self.show()
|
81
|
+
}, self.options.delay.show)
|
83
82
|
}
|
84
83
|
|
85
|
-
, leave: function (
|
84
|
+
, leave: function (e) {
|
86
85
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
87
86
|
|
88
|
-
if (!self.options.delay || !self.options.delay.hide)
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
}
|
96
|
-
}, self.options.delay.hide)
|
97
|
-
}
|
87
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
88
|
+
|
89
|
+
clearTimeout(this.timeout)
|
90
|
+
self.hoverState = 'out'
|
91
|
+
this.timeout = setTimeout(function() {
|
92
|
+
if (self.hoverState == 'out') self.hide()
|
93
|
+
}, self.options.delay.hide)
|
98
94
|
}
|
99
95
|
|
100
96
|
, show: function () {
|
@@ -152,9 +148,20 @@
|
|
152
148
|
}
|
153
149
|
}
|
154
150
|
|
151
|
+
, isHTML: function(text) {
|
152
|
+
// html string detection logic adapted from jQuery
|
153
|
+
return typeof text != 'string'
|
154
|
+
|| ( text.charAt(0) === "<"
|
155
|
+
&& text.charAt( text.length - 1 ) === ">"
|
156
|
+
&& text.length >= 3
|
157
|
+
) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
|
158
|
+
}
|
159
|
+
|
155
160
|
, setContent: function () {
|
156
161
|
var $tip = this.tip()
|
157
|
-
|
162
|
+
, title = this.getTitle()
|
163
|
+
|
164
|
+
$tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
|
158
165
|
$tip.removeClass('fade in top bottom left right')
|
159
166
|
}
|
160
167
|
|
@@ -206,8 +213,6 @@
|
|
206
213
|
title = $e.attr('data-original-title')
|
207
214
|
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
208
215
|
|
209
|
-
title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
|
210
|
-
|
211
216
|
return title
|
212
217
|
}
|
213
218
|
|
@@ -259,12 +264,12 @@
|
|
259
264
|
|
260
265
|
$.fn.tooltip.defaults = {
|
261
266
|
animation: true
|
262
|
-
, delay: 0
|
263
|
-
, selector: false
|
264
267
|
, placement: 'top'
|
268
|
+
, selector: false
|
269
|
+
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
265
270
|
, trigger: 'hover'
|
266
271
|
, title: ''
|
267
|
-
,
|
272
|
+
, delay: 0
|
268
273
|
}
|
269
274
|
|
270
|
-
}(
|
275
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.0.
|
2
|
+
* bootstrap-transition.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
4
|
* ===================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,35 +17,45 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
|
-
|
20
|
+
|
21
|
+
!function ($) {
|
21
22
|
|
22
23
|
$(function () {
|
23
24
|
|
24
|
-
"use strict"
|
25
|
+
"use strict"; // jshint ;_;
|
26
|
+
|
25
27
|
|
26
|
-
/* CSS TRANSITION SUPPORT (
|
28
|
+
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
27
29
|
* ======================================================= */
|
28
30
|
|
29
31
|
$.support.transition = (function () {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
32
|
+
|
33
|
+
var transitionEnd = (function () {
|
34
|
+
|
35
|
+
var el = document.createElement('bootstrap')
|
36
|
+
, transEndEventNames = {
|
37
|
+
'WebkitTransition' : 'webkitTransitionEnd'
|
38
|
+
, 'MozTransition' : 'transitionend'
|
39
|
+
, 'OTransition' : 'oTransitionEnd'
|
40
|
+
, 'msTransition' : 'MSTransitionEnd'
|
41
|
+
, 'transition' : 'transitionend'
|
42
|
+
}
|
43
|
+
, name
|
44
|
+
|
45
|
+
for (name in transEndEventNames){
|
46
|
+
if (el.style[name] !== undefined) {
|
47
|
+
return transEndEventNames[name]
|
43
48
|
}
|
44
|
-
|
45
|
-
|
49
|
+
}
|
50
|
+
|
51
|
+
}())
|
52
|
+
|
53
|
+
return transitionEnd && {
|
54
|
+
end: transitionEnd
|
46
55
|
}
|
56
|
+
|
47
57
|
})()
|
48
58
|
|
49
59
|
})
|
50
60
|
|
51
|
-
}(
|
61
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-typeahead.js v2.0.
|
2
|
+
* bootstrap-typeahead.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,16 +17,22 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ============================================================ */
|
19
19
|
|
20
|
-
!function( $ ){
|
21
20
|
|
22
|
-
|
21
|
+
!function($){
|
23
22
|
|
24
|
-
|
23
|
+
"use strict"; // jshint ;_;
|
24
|
+
|
25
|
+
|
26
|
+
/* TYPEAHEAD PUBLIC CLASS DEFINITION
|
27
|
+
* ================================= */
|
28
|
+
|
29
|
+
var Typeahead = function (element, options) {
|
25
30
|
this.$element = $(element)
|
26
31
|
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
27
32
|
this.matcher = this.options.matcher || this.matcher
|
28
33
|
this.sorter = this.options.sorter || this.sorter
|
29
34
|
this.highlighter = this.options.highlighter || this.highlighter
|
35
|
+
this.updater = this.options.updater || this.updater
|
30
36
|
this.$menu = $(this.options.menu).appendTo('body')
|
31
37
|
this.source = this.options.source
|
32
38
|
this.shown = false
|
@@ -39,13 +45,18 @@
|
|
39
45
|
|
40
46
|
, select: function () {
|
41
47
|
var val = this.$menu.find('.active').attr('data-value')
|
42
|
-
this.$element
|
43
|
-
|
48
|
+
this.$element
|
49
|
+
.val(this.updater(val))
|
50
|
+
.change()
|
44
51
|
return this.hide()
|
45
52
|
}
|
46
53
|
|
54
|
+
, updater: function (item) {
|
55
|
+
return item
|
56
|
+
}
|
57
|
+
|
47
58
|
, show: function () {
|
48
|
-
var pos = $.extend({}, this.$element.
|
59
|
+
var pos = $.extend({}, this.$element.position(), {
|
49
60
|
height: this.$element[0].offsetHeight
|
50
61
|
})
|
51
62
|
|
@@ -77,7 +88,7 @@
|
|
77
88
|
}
|
78
89
|
|
79
90
|
items = $.grep(this.source, function (item) {
|
80
|
-
|
91
|
+
return that.matcher(item)
|
81
92
|
})
|
82
93
|
|
83
94
|
items = this.sorter(items)
|
@@ -109,7 +120,8 @@
|
|
109
120
|
}
|
110
121
|
|
111
122
|
, highlighter: function (item) {
|
112
|
-
|
123
|
+
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
124
|
+
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
113
125
|
return '<strong>' + match + '</strong>'
|
114
126
|
})
|
115
127
|
}
|
@@ -201,11 +213,13 @@
|
|
201
213
|
break
|
202
214
|
|
203
215
|
case 38: // up arrow
|
216
|
+
if (e.type != 'keydown') break
|
204
217
|
e.preventDefault()
|
205
218
|
this.prev()
|
206
219
|
break
|
207
220
|
|
208
221
|
case 40: // down arrow
|
222
|
+
if (e.type != 'keydown') break
|
209
223
|
e.preventDefault()
|
210
224
|
this.next()
|
211
225
|
break
|
@@ -236,7 +250,7 @@
|
|
236
250
|
/* TYPEAHEAD PLUGIN DEFINITION
|
237
251
|
* =========================== */
|
238
252
|
|
239
|
-
$.fn.typeahead = function (
|
253
|
+
$.fn.typeahead = function (option) {
|
240
254
|
return this.each(function () {
|
241
255
|
var $this = $(this)
|
242
256
|
, data = $this.data('typeahead')
|
@@ -268,4 +282,4 @@
|
|
268
282
|
})
|
269
283
|
})
|
270
284
|
|
271
|
-
}(
|
285
|
+
}(window.jQuery);
|