twitter-bootstrap-rails 1.3.1 → 1.4.0
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/.gitignore +1 -0
- data/README.md +2 -1
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alerts.js +112 -103
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-buttons.js +62 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +55 -50
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +260 -238
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +85 -76
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +106 -104
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tabs.js +80 -62
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-twipsy.js +309 -306
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -27
- data/vendor/toolkit/twitter/bootstrap/forms.less +479 -466
- data/vendor/toolkit/twitter/bootstrap/mixins.less +223 -218
- data/vendor/toolkit/twitter/bootstrap/patterns.less +1058 -1007
- data/vendor/toolkit/twitter/bootstrap/reset.less +141 -142
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +137 -136
- data/vendor/toolkit/twitter/bootstrap/tables.less +224 -171
- data/vendor/toolkit/twitter/bootstrap/type.less +187 -188
- data/vendor/toolkit/twitter/bootstrap/variables.less +60 -61
- metadata +15 -14
@@ -1,77 +1,86 @@
|
|
1
|
-
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v1.
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#popover
|
4
|
-
* ===========================================================
|
5
|
-
* Copyright 2011 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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
this
|
27
|
-
this.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
$tip
|
39
|
-
$tip[
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
$.fn.popover
|
76
|
-
|
1
|
+
/* ===========================================================
|
2
|
+
* bootstrap-popover.js v1.4.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#popover
|
4
|
+
* ===========================================================
|
5
|
+
* Copyright 2011 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"
|
24
|
+
|
25
|
+
var Popover = function ( element, options ) {
|
26
|
+
this.$element = $(element)
|
27
|
+
this.options = options
|
28
|
+
this.enabled = true
|
29
|
+
this.fixTitle()
|
30
|
+
}
|
31
|
+
|
32
|
+
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
|
33
|
+
========================================= */
|
34
|
+
|
35
|
+
Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
|
36
|
+
|
37
|
+
setContent: function () {
|
38
|
+
var $tip = this.tip()
|
39
|
+
$tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
|
40
|
+
$tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
|
41
|
+
$tip[0].className = 'popover'
|
42
|
+
}
|
43
|
+
|
44
|
+
, hasContent: function () {
|
45
|
+
return this.getTitle() || this.getContent()
|
46
|
+
}
|
47
|
+
|
48
|
+
, getContent: function () {
|
49
|
+
var content
|
50
|
+
, $e = this.$element
|
51
|
+
, o = this.options
|
52
|
+
|
53
|
+
if (typeof this.options.content == 'string') {
|
54
|
+
content = this.options.content
|
55
|
+
} else if (typeof this.options.content == 'function') {
|
56
|
+
content = this.options.content.call(this.$element[0])
|
57
|
+
}
|
58
|
+
return content
|
59
|
+
}
|
60
|
+
|
61
|
+
, tip: function() {
|
62
|
+
if (!this.$tip) {
|
63
|
+
this.$tip = $('<div class="popover" />')
|
64
|
+
.html(this.options.template)
|
65
|
+
}
|
66
|
+
return this.$tip
|
67
|
+
}
|
68
|
+
|
69
|
+
})
|
70
|
+
|
71
|
+
|
72
|
+
/* POPOVER PLUGIN DEFINITION
|
73
|
+
* ======================= */
|
74
|
+
|
75
|
+
$.fn.popover = function (options) {
|
76
|
+
if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
|
77
|
+
$.fn.twipsy.initWith.call(this, options, Popover, 'popover')
|
78
|
+
return this
|
79
|
+
}
|
80
|
+
|
81
|
+
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
|
82
|
+
placement: 'right'
|
83
|
+
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
|
84
|
+
})
|
85
|
+
|
77
86
|
}( window.jQuery || window.ender );
|
@@ -1,105 +1,107 @@
|
|
1
|
-
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v1.
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
|
-
* =============================================================
|
5
|
-
* Copyright 2011 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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
this
|
30
|
-
this
|
31
|
-
|
32
|
-
this.processScroll
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
,
|
53
|
-
,
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
&&
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
this
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
1
|
+
/* =============================================================
|
2
|
+
* bootstrap-scrollspy.js v1.4.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
|
+
* =============================================================
|
5
|
+
* Copyright 2011 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"
|
24
|
+
|
25
|
+
var $window = $(window)
|
26
|
+
|
27
|
+
function ScrollSpy( topbar, selector ) {
|
28
|
+
var processScroll = $.proxy(this.processScroll, this)
|
29
|
+
this.$topbar = $(topbar)
|
30
|
+
this.selector = selector || 'li > a'
|
31
|
+
this.refresh()
|
32
|
+
this.$topbar.delegate(this.selector, 'click', processScroll)
|
33
|
+
$window.scroll(processScroll)
|
34
|
+
this.processScroll()
|
35
|
+
}
|
36
|
+
|
37
|
+
ScrollSpy.prototype = {
|
38
|
+
|
39
|
+
refresh: function () {
|
40
|
+
this.targets = this.$topbar.find(this.selector).map(function () {
|
41
|
+
var href = $(this).attr('href')
|
42
|
+
return /^#\w/.test(href) && $(href).length ? href : null
|
43
|
+
})
|
44
|
+
|
45
|
+
this.offsets = $.map(this.targets, function (id) {
|
46
|
+
return $(id).offset().top
|
47
|
+
})
|
48
|
+
}
|
49
|
+
|
50
|
+
, processScroll: function () {
|
51
|
+
var scrollTop = $window.scrollTop() + 10
|
52
|
+
, offsets = this.offsets
|
53
|
+
, targets = this.targets
|
54
|
+
, activeTarget = this.activeTarget
|
55
|
+
, i
|
56
|
+
|
57
|
+
for (i = offsets.length; i--;) {
|
58
|
+
activeTarget != targets[i]
|
59
|
+
&& scrollTop >= offsets[i]
|
60
|
+
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
61
|
+
&& this.activateButton( targets[i] )
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
, activateButton: function (target) {
|
66
|
+
this.activeTarget = target
|
67
|
+
|
68
|
+
this.$topbar
|
69
|
+
.find(this.selector).parent('.active')
|
70
|
+
.removeClass('active')
|
71
|
+
|
72
|
+
this.$topbar
|
73
|
+
.find(this.selector + '[href="' + target + '"]')
|
74
|
+
.parent('li')
|
75
|
+
.addClass('active')
|
76
|
+
}
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
/* SCROLLSPY PLUGIN DEFINITION
|
81
|
+
* =========================== */
|
82
|
+
|
83
|
+
$.fn.scrollSpy = function( options ) {
|
84
|
+
var scrollspy = this.data('scrollspy')
|
85
|
+
|
86
|
+
if (!scrollspy) {
|
87
|
+
return this.each(function () {
|
88
|
+
$(this).data('scrollspy', new ScrollSpy( this, options ))
|
89
|
+
})
|
90
|
+
}
|
91
|
+
|
92
|
+
if ( options === true ) {
|
93
|
+
return scrollspy
|
94
|
+
}
|
95
|
+
|
96
|
+
if ( typeof options == 'string' ) {
|
97
|
+
scrollspy[options]()
|
98
|
+
}
|
99
|
+
|
100
|
+
return this
|
101
|
+
}
|
102
|
+
|
103
|
+
$(document).ready(function () {
|
104
|
+
$('body').scrollSpy('[data-scrollspy] li > a')
|
105
|
+
})
|
106
|
+
|
105
107
|
}( window.jQuery || window.ender );
|
@@ -1,62 +1,80 @@
|
|
1
|
-
/* ========================================================
|
2
|
-
* bootstrap-tabs.js v1.
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
|
-
* ========================================================
|
5
|
-
* Copyright 2011 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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
if (
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
$
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
$
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
}
|
1
|
+
/* ========================================================
|
2
|
+
* bootstrap-tabs.js v1.4.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
|
+
* ========================================================
|
5
|
+
* Copyright 2011 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"
|
24
|
+
|
25
|
+
function activate ( element, container ) {
|
26
|
+
container
|
27
|
+
.find('> .active')
|
28
|
+
.removeClass('active')
|
29
|
+
.find('> .dropdown-menu > .active')
|
30
|
+
.removeClass('active')
|
31
|
+
|
32
|
+
element.addClass('active')
|
33
|
+
|
34
|
+
if ( element.parent('.dropdown-menu') ) {
|
35
|
+
element.closest('li.dropdown').addClass('active')
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
function tab( e ) {
|
40
|
+
var $this = $(this)
|
41
|
+
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
42
|
+
, href = $this.attr('href')
|
43
|
+
, previous
|
44
|
+
, $href
|
45
|
+
|
46
|
+
if ( /^#\w+/.test(href) ) {
|
47
|
+
e.preventDefault()
|
48
|
+
|
49
|
+
if ( $this.parent('li').hasClass('active') ) {
|
50
|
+
return
|
51
|
+
}
|
52
|
+
|
53
|
+
previous = $ul.find('.active a').last()[0]
|
54
|
+
$href = $(href)
|
55
|
+
|
56
|
+
activate($this.parent('li'), $ul)
|
57
|
+
activate($href, $href.parent())
|
58
|
+
|
59
|
+
$this.trigger({
|
60
|
+
type: 'change'
|
61
|
+
, relatedTarget: previous
|
62
|
+
})
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
/* TABS/PILLS PLUGIN DEFINITION
|
68
|
+
* ============================ */
|
69
|
+
|
70
|
+
$.fn.tabs = $.fn.pills = function ( selector ) {
|
71
|
+
return this.each(function () {
|
72
|
+
$(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
|
73
|
+
})
|
74
|
+
}
|
75
|
+
|
76
|
+
$(document).ready(function () {
|
77
|
+
$('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
|
78
|
+
})
|
79
|
+
|
80
|
+
}( window.jQuery || window.ender );
|