compass_twitter_bootstrap 2.0.3 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +41 -7
- data/build/convert.rb +27 -11
- data/lib/compass_twitter_bootstrap/version.rb +1 -1
- data/stylesheets/_compass_twitter_bootstrap.scss +2 -1
- data/stylesheets/_compass_twitter_bootstrap_awesome.scss +1 -1
- data/stylesheets/_compass_twitter_bootstrap_responsive.scss +1 -1
- data/stylesheets/compass_twitter_bootstrap/_accordion.scss +4 -3
- data/stylesheets/compass_twitter_bootstrap/_alerts.scss +31 -10
- data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +14 -14
- data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +91 -55
- data/stylesheets/compass_twitter_bootstrap/_buttons.scss +126 -84
- data/stylesheets/compass_twitter_bootstrap/_carousel.scss +33 -23
- data/stylesheets/compass_twitter_bootstrap/_close.scss +7 -5
- data/stylesheets/compass_twitter_bootstrap/_code.scss +12 -8
- data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +9 -7
- data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +112 -22
- data/stylesheets/compass_twitter_bootstrap/_font-awesome.scss +258 -196
- data/stylesheets/compass_twitter_bootstrap/_forms.scss +262 -161
- data/stylesheets/compass_twitter_bootstrap/_grid.scss +18 -2
- data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +11 -8
- data/stylesheets/compass_twitter_bootstrap/_labels-badges.scss +42 -26
- data/stylesheets/compass_twitter_bootstrap/_layouts.scss +3 -4
- data/stylesheets/compass_twitter_bootstrap/_media.scss +55 -0
- data/stylesheets/compass_twitter_bootstrap/_mixins.scss +243 -189
- data/stylesheets/compass_twitter_bootstrap/_modals.scss +28 -23
- data/stylesheets/compass_twitter_bootstrap/_navbar.scss +269 -143
- data/stylesheets/compass_twitter_bootstrap/_navs.scss +59 -46
- data/stylesheets/compass_twitter_bootstrap/_pager.scss +17 -12
- data/stylesheets/compass_twitter_bootstrap/_pagination.scss +92 -27
- data/stylesheets/compass_twitter_bootstrap/_popovers.scss +116 -36
- data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +35 -30
- data/stylesheets/compass_twitter_bootstrap/_reset.scss +101 -11
- data/stylesheets/compass_twitter_bootstrap/_responsive-1200px-min.scss +9 -7
- data/stylesheets/compass_twitter_bootstrap/_responsive-767px-max.scss +115 -71
- data/stylesheets/compass_twitter_bootstrap/_responsive-768px-979px.scss +8 -6
- data/stylesheets/compass_twitter_bootstrap/_responsive-navbar.scss +53 -14
- data/stylesheets/compass_twitter_bootstrap/_responsive-utilities.scss +17 -15
- data/stylesheets/compass_twitter_bootstrap/_responsive.scss +48 -0
- data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +27 -4
- data/stylesheets/compass_twitter_bootstrap/_sprites.scss +24 -22
- data/stylesheets/compass_twitter_bootstrap/_tables.scss +122 -61
- data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +12 -7
- data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +50 -15
- data/stylesheets/compass_twitter_bootstrap/_type.scss +93 -93
- data/stylesheets/compass_twitter_bootstrap/_utilities.scss +9 -2
- data/stylesheets/compass_twitter_bootstrap/_variables.scss +134 -38
- data/stylesheets/compass_twitter_bootstrap/_wells.scss +11 -10
- data/stylesheets_sass/_compass_twitter_bootstrap.sass +2 -1
- data/stylesheets_sass/_compass_twitter_bootstrap_awesome.sass +1 -1
- data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +1 -1
- data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +4 -3
- data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +27 -9
- data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +12 -13
- data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +93 -55
- data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +113 -88
- data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +31 -23
- data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +5 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +12 -9
- data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +7 -6
- data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +105 -21
- data/stylesheets_sass/compass_twitter_bootstrap/_font-awesome.sass +228 -31
- data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +255 -155
- data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +16 -2
- data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +10 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_labels-badges.sass +38 -31
- data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +3 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_media.sass +48 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +215 -174
- data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +25 -26
- data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +229 -134
- data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +53 -46
- data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +16 -12
- data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +78 -23
- data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +106 -40
- data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +35 -30
- data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +80 -12
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-1200px-min.sass +8 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-767px-max.sass +89 -54
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-768px-979px.sass +7 -6
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-navbar.sass +38 -13
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-utilities.sass +18 -17
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive.sass +44 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +24 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +25 -8
- data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +110 -83
- data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +11 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -19
- data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +123 -75
- data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +7 -2
- data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +141 -37
- data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +10 -9
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +247 -167
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
- data/vendor/assets/javascripts/bootstrap-alert.js +13 -4
- data/vendor/assets/javascripts/bootstrap-all.js +2 -1
- data/vendor/assets/javascripts/bootstrap-button.js +17 -8
- data/vendor/assets/javascripts/bootstrap-carousel.js +30 -14
- data/vendor/assets/javascripts/bootstrap-collapse.js +24 -14
- data/vendor/assets/javascripts/bootstrap-dropdown.js +80 -19
- data/vendor/assets/javascripts/bootstrap-modal.js +111 -84
- data/vendor/assets/javascripts/bootstrap-popover.js +21 -5
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +21 -10
- data/vendor/assets/javascripts/bootstrap-tab.js +17 -8
- data/vendor/assets/javascripts/bootstrap-tooltip.js +36 -24
- data/vendor/assets/javascripts/bootstrap-transition.js +6 -7
- data/vendor/assets/javascripts/bootstrap-typeahead.js +87 -49
- metadata +17 -7
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =========================================================
|
2
|
-
* bootstrap-modal.js v2.
|
2
|
+
* bootstrap-modal.js v2.2.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
4
|
* =========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -26,10 +26,11 @@
|
|
26
26
|
/* MODAL CLASS DEFINITION
|
27
27
|
* ====================== */
|
28
28
|
|
29
|
-
var Modal = function (
|
29
|
+
var Modal = function (element, options) {
|
30
30
|
this.options = options
|
31
|
-
this.$element = $(
|
31
|
+
this.$element = $(element)
|
32
32
|
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
33
|
+
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
33
34
|
}
|
34
35
|
|
35
36
|
Modal.prototype = {
|
@@ -48,12 +49,11 @@
|
|
48
49
|
|
49
50
|
if (this.isShown || e.isDefaultPrevented()) return
|
50
51
|
|
51
|
-
$('body').addClass('modal-open')
|
52
|
-
|
53
52
|
this.isShown = true
|
54
53
|
|
55
|
-
escape
|
56
|
-
|
54
|
+
this.escape()
|
55
|
+
|
56
|
+
this.backdrop(function () {
|
57
57
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
58
58
|
|
59
59
|
if (!that.$element.parent().length) {
|
@@ -67,11 +67,15 @@
|
|
67
67
|
that.$element[0].offsetWidth // force reflow
|
68
68
|
}
|
69
69
|
|
70
|
-
that.$element
|
70
|
+
that.$element
|
71
|
+
.addClass('in')
|
72
|
+
.attr('aria-hidden', false)
|
73
|
+
|
74
|
+
that.enforceFocus()
|
71
75
|
|
72
76
|
transition ?
|
73
|
-
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
74
|
-
that.$element.trigger('shown')
|
77
|
+
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
78
|
+
that.$element.focus().trigger('shown')
|
75
79
|
|
76
80
|
})
|
77
81
|
}
|
@@ -89,98 +93,108 @@
|
|
89
93
|
|
90
94
|
this.isShown = false
|
91
95
|
|
92
|
-
|
96
|
+
this.escape()
|
93
97
|
|
94
|
-
|
98
|
+
$(document).off('focusin.modal')
|
95
99
|
|
96
|
-
this.$element
|
100
|
+
this.$element
|
101
|
+
.removeClass('in')
|
102
|
+
.attr('aria-hidden', true)
|
97
103
|
|
98
104
|
$.support.transition && this.$element.hasClass('fade') ?
|
99
|
-
hideWithTransition
|
100
|
-
hideModal
|
105
|
+
this.hideWithTransition() :
|
106
|
+
this.hideModal()
|
101
107
|
}
|
102
108
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
, timeout = setTimeout(function () {
|
112
|
-
that.$element.off($.support.transition.end)
|
113
|
-
hideModal.call(that)
|
114
|
-
}, 500)
|
109
|
+
, enforceFocus: function () {
|
110
|
+
var that = this
|
111
|
+
$(document).on('focusin.modal', function (e) {
|
112
|
+
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
113
|
+
that.$element.focus()
|
114
|
+
}
|
115
|
+
})
|
116
|
+
}
|
115
117
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
, escape: function () {
|
119
|
+
var that = this
|
120
|
+
if (this.isShown && this.options.keyboard) {
|
121
|
+
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
122
|
+
e.which == 27 && that.hide()
|
123
|
+
})
|
124
|
+
} else if (!this.isShown) {
|
125
|
+
this.$element.off('keyup.dismiss.modal')
|
126
|
+
}
|
127
|
+
}
|
121
128
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
129
|
+
, hideWithTransition: function () {
|
130
|
+
var that = this
|
131
|
+
, timeout = setTimeout(function () {
|
132
|
+
that.$element.off($.support.transition.end)
|
133
|
+
that.hideModal()
|
134
|
+
}, 500)
|
135
|
+
|
136
|
+
this.$element.one($.support.transition.end, function () {
|
137
|
+
clearTimeout(timeout)
|
138
|
+
that.hideModal()
|
139
|
+
})
|
140
|
+
}
|
126
141
|
|
127
|
-
|
128
|
-
|
142
|
+
, hideModal: function (that) {
|
143
|
+
this.$element
|
144
|
+
.hide()
|
145
|
+
.trigger('hidden')
|
129
146
|
|
130
|
-
|
131
|
-
|
132
|
-
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
147
|
+
this.backdrop()
|
148
|
+
}
|
133
149
|
|
134
|
-
|
135
|
-
|
150
|
+
, removeBackdrop: function () {
|
151
|
+
this.$backdrop.remove()
|
152
|
+
this.$backdrop = null
|
153
|
+
}
|
136
154
|
|
137
|
-
|
138
|
-
|
155
|
+
, backdrop: function (callback) {
|
156
|
+
var that = this
|
157
|
+
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
139
158
|
|
140
|
-
|
141
|
-
|
142
|
-
}
|
159
|
+
if (this.isShown && this.options.backdrop) {
|
160
|
+
var doAnimate = $.support.transition && animate
|
143
161
|
|
144
|
-
|
162
|
+
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
163
|
+
.appendTo(document.body)
|
145
164
|
|
146
|
-
|
165
|
+
this.$backdrop.click(
|
166
|
+
this.options.backdrop == 'static' ?
|
167
|
+
$.proxy(this.$element[0].focus, this.$element[0])
|
168
|
+
: $.proxy(this.hide, this)
|
169
|
+
)
|
147
170
|
|
148
|
-
|
149
|
-
this.$backdrop.one($.support.transition.end, callback) :
|
150
|
-
callback()
|
171
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
151
172
|
|
152
|
-
|
153
|
-
this.$backdrop.removeClass('in')
|
173
|
+
this.$backdrop.addClass('in')
|
154
174
|
|
155
|
-
|
156
|
-
|
157
|
-
|
175
|
+
doAnimate ?
|
176
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
177
|
+
callback()
|
158
178
|
|
159
|
-
|
160
|
-
|
161
|
-
}
|
162
|
-
}
|
179
|
+
} else if (!this.isShown && this.$backdrop) {
|
180
|
+
this.$backdrop.removeClass('in')
|
163
181
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
}
|
182
|
+
$.support.transition && this.$element.hasClass('fade')?
|
183
|
+
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
184
|
+
this.removeBackdrop()
|
168
185
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
e.which == 27 && that.hide()
|
174
|
-
})
|
175
|
-
} else if (!this.isShown) {
|
176
|
-
$(document).off('keyup.dismiss.modal')
|
177
|
-
}
|
186
|
+
} else if (callback) {
|
187
|
+
callback()
|
188
|
+
}
|
189
|
+
}
|
178
190
|
}
|
179
191
|
|
180
192
|
|
181
193
|
/* MODAL PLUGIN DEFINITION
|
182
194
|
* ======================= */
|
183
195
|
|
196
|
+
var old = $.fn.modal
|
197
|
+
|
184
198
|
$.fn.modal = function (option) {
|
185
199
|
return this.each(function () {
|
186
200
|
var $this = $(this)
|
@@ -201,18 +215,31 @@
|
|
201
215
|
$.fn.modal.Constructor = Modal
|
202
216
|
|
203
217
|
|
218
|
+
/* MODAL NO CONFLICT
|
219
|
+
* ================= */
|
220
|
+
|
221
|
+
$.fn.modal.noConflict = function () {
|
222
|
+
$.fn.modal = old
|
223
|
+
return this
|
224
|
+
}
|
225
|
+
|
226
|
+
|
204
227
|
/* MODAL DATA-API
|
205
228
|
* ============== */
|
206
229
|
|
207
|
-
$(function () {
|
208
|
-
$
|
209
|
-
|
210
|
-
|
211
|
-
|
230
|
+
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
|
231
|
+
var $this = $(this)
|
232
|
+
, href = $this.attr('href')
|
233
|
+
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
234
|
+
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
212
235
|
|
213
|
-
|
214
|
-
|
215
|
-
|
236
|
+
e.preventDefault()
|
237
|
+
|
238
|
+
$target
|
239
|
+
.modal(option)
|
240
|
+
.one('hide', function () {
|
241
|
+
$this.focus()
|
242
|
+
})
|
216
243
|
})
|
217
244
|
|
218
|
-
}(window.jQuery);
|
245
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.
|
2
|
+
* bootstrap-popover.js v2.2.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -26,7 +26,7 @@
|
|
26
26
|
/* POPOVER PUBLIC CLASS DEFINITION
|
27
27
|
* =============================== */
|
28
28
|
|
29
|
-
var Popover = function (
|
29
|
+
var Popover = function (element, options) {
|
30
30
|
this.init('popover', element, options)
|
31
31
|
}
|
32
32
|
|
@@ -43,8 +43,8 @@
|
|
43
43
|
, title = this.getTitle()
|
44
44
|
, content = this.getContent()
|
45
45
|
|
46
|
-
$tip.find('.popover-title')[this.
|
47
|
-
$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)
|
48
48
|
|
49
49
|
$tip.removeClass('fade top bottom left right in')
|
50
50
|
}
|
@@ -71,12 +71,18 @@
|
|
71
71
|
return this.$tip
|
72
72
|
}
|
73
73
|
|
74
|
+
, destroy: function () {
|
75
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
76
|
+
}
|
77
|
+
|
74
78
|
})
|
75
79
|
|
76
80
|
|
77
81
|
/* POPOVER PLUGIN DEFINITION
|
78
82
|
* ======================= */
|
79
83
|
|
84
|
+
var old = $.fn.popover
|
85
|
+
|
80
86
|
$.fn.popover = function (option) {
|
81
87
|
return this.each(function () {
|
82
88
|
var $this = $(this)
|
@@ -91,8 +97,18 @@
|
|
91
97
|
|
92
98
|
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
93
99
|
placement: 'right'
|
100
|
+
, trigger: 'click'
|
94
101
|
, content: ''
|
95
|
-
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"
|
102
|
+
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
96
103
|
})
|
97
104
|
|
105
|
+
|
106
|
+
/* POPOVER NO CONFLICT
|
107
|
+
* =================== */
|
108
|
+
|
109
|
+
$.fn.popover.noConflict = function () {
|
110
|
+
$.fn.popover = old
|
111
|
+
return this
|
112
|
+
}
|
113
|
+
|
98
114
|
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.
|
2
|
+
* bootstrap-scrollspy.js v2.2.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -23,15 +23,15 @@
|
|
23
23
|
"use strict"; // jshint ;_;
|
24
24
|
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
/* SCROLLSPY CLASS DEFINITION
|
27
|
+
* ========================== */
|
28
28
|
|
29
|
-
function ScrollSpy(
|
29
|
+
function ScrollSpy(element, options) {
|
30
30
|
var process = $.proxy(this.process, this)
|
31
31
|
, $element = $(element).is('body') ? $(window) : $(element)
|
32
32
|
, href
|
33
33
|
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
34
|
-
this.$scrollElement = $element.on('scroll.scroll.data-api', process)
|
34
|
+
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
|
35
35
|
this.selector = (this.options.target
|
36
36
|
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
37
37
|
|| '') + ' .nav li > a'
|
@@ -58,8 +58,8 @@
|
|
58
58
|
, href = $el.data('target') || $el.attr('href')
|
59
59
|
, $href = /^#\w/.test(href) && $(href)
|
60
60
|
return ( $href
|
61
|
-
&& href.length
|
62
|
-
&& [[ $href.position().top, href ]] ) || null
|
61
|
+
&& $href.length
|
62
|
+
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
63
63
|
})
|
64
64
|
.sort(function (a, b) { return a[0] - b[0] })
|
65
65
|
.each(function () {
|
@@ -108,7 +108,7 @@
|
|
108
108
|
.parent('li')
|
109
109
|
.addClass('active')
|
110
110
|
|
111
|
-
if (active.parent('.dropdown-menu')) {
|
111
|
+
if (active.parent('.dropdown-menu').length) {
|
112
112
|
active = active.closest('li.dropdown').addClass('active')
|
113
113
|
}
|
114
114
|
|
@@ -121,7 +121,9 @@
|
|
121
121
|
/* SCROLLSPY PLUGIN DEFINITION
|
122
122
|
* =========================== */
|
123
123
|
|
124
|
-
$.fn.scrollspy
|
124
|
+
var old = $.fn.scrollspy
|
125
|
+
|
126
|
+
$.fn.scrollspy = function (option) {
|
125
127
|
return this.each(function () {
|
126
128
|
var $this = $(this)
|
127
129
|
, data = $this.data('scrollspy')
|
@@ -138,10 +140,19 @@
|
|
138
140
|
}
|
139
141
|
|
140
142
|
|
143
|
+
/* SCROLLSPY NO CONFLICT
|
144
|
+
* ===================== */
|
145
|
+
|
146
|
+
$.fn.scrollspy.noConflict = function () {
|
147
|
+
$.fn.scrollspy = old
|
148
|
+
return this
|
149
|
+
}
|
150
|
+
|
151
|
+
|
141
152
|
/* SCROLLSPY DATA-API
|
142
153
|
* ================== */
|
143
154
|
|
144
|
-
$(function () {
|
155
|
+
$(window).on('load', function () {
|
145
156
|
$('[data-spy="scroll"]').each(function () {
|
146
157
|
var $spy = $(this)
|
147
158
|
$spy.scrollspy($spy.data())
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.
|
2
|
+
* bootstrap-tab.js v2.2.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
4
|
* ========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -26,7 +26,7 @@
|
|
26
26
|
/* TAB CLASS DEFINITION
|
27
27
|
* ==================== */
|
28
28
|
|
29
|
-
var Tab = function (
|
29
|
+
var Tab = function (element) {
|
30
30
|
this.element = $(element)
|
31
31
|
}
|
32
32
|
|
@@ -49,7 +49,7 @@
|
|
49
49
|
|
50
50
|
if ( $this.parent('li').hasClass('active') ) return
|
51
51
|
|
52
|
-
previous = $ul.find('.active a')
|
52
|
+
previous = $ul.find('.active:last a')[0]
|
53
53
|
|
54
54
|
e = $.Event('show', {
|
55
55
|
relatedTarget: previous
|
@@ -110,6 +110,8 @@
|
|
110
110
|
/* TAB PLUGIN DEFINITION
|
111
111
|
* ===================== */
|
112
112
|
|
113
|
+
var old = $.fn.tab
|
114
|
+
|
113
115
|
$.fn.tab = function ( option ) {
|
114
116
|
return this.each(function () {
|
115
117
|
var $this = $(this)
|
@@ -122,14 +124,21 @@
|
|
122
124
|
$.fn.tab.Constructor = Tab
|
123
125
|
|
124
126
|
|
127
|
+
/* TAB NO CONFLICT
|
128
|
+
* =============== */
|
129
|
+
|
130
|
+
$.fn.tab.noConflict = function () {
|
131
|
+
$.fn.tab = old
|
132
|
+
return this
|
133
|
+
}
|
134
|
+
|
135
|
+
|
125
136
|
/* TAB DATA-API
|
126
137
|
* ============ */
|
127
138
|
|
128
|
-
$(function () {
|
129
|
-
|
130
|
-
|
131
|
-
$(this).tab('show')
|
132
|
-
})
|
139
|
+
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
140
|
+
e.preventDefault()
|
141
|
+
$(this).tab('show')
|
133
142
|
})
|
134
143
|
|
135
144
|
}(window.jQuery);
|