bootstrap-generators 3.1.1.3 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -5
- data/README.md +8 -8
- data/Rakefile +7 -5
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +40 -23
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +41 -24
- data/vendor/assets/javascripts/bootstrap.js +6 -6
- data/vendor/assets/javascripts/bootstrap/affix.js +19 -14
- data/vendor/assets/javascripts/bootstrap/alert.js +10 -6
- data/vendor/assets/javascripts/bootstrap/button.js +11 -8
- data/vendor/assets/javascripts/bootstrap/carousel.js +49 -31
- data/vendor/assets/javascripts/bootstrap/collapse.js +22 -22
- data/vendor/assets/javascripts/bootstrap/dropdown.js +17 -13
- data/vendor/assets/javascripts/bootstrap/modal.js +66 -29
- data/vendor/assets/javascripts/bootstrap/popover.js +10 -7
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +40 -23
- data/vendor/assets/javascripts/bootstrap/tab.js +11 -8
- data/vendor/assets/javascripts/bootstrap/tooltip.js +115 -57
- data/vendor/assets/javascripts/bootstrap/transition.js +18 -7
- data/vendor/assets/stylesheets/bootstrap.css.erb +2740 -2322
- data/vendor/twitter/bootstrap/less/alerts.less +4 -3
- data/vendor/twitter/bootstrap/less/badges.less +18 -18
- data/vendor/twitter/bootstrap/less/bootstrap.less +3 -2
- data/vendor/twitter/bootstrap/less/button-groups.less +16 -2
- data/vendor/twitter/bootstrap/less/buttons.less +0 -2
- data/vendor/twitter/bootstrap/less/carousel.less +15 -4
- data/vendor/twitter/bootstrap/less/code.less +6 -1
- data/vendor/twitter/bootstrap/less/component-animations.less +6 -4
- data/vendor/twitter/bootstrap/less/dropdowns.less +2 -0
- data/vendor/twitter/bootstrap/less/forms.less +144 -42
- data/vendor/twitter/bootstrap/less/glyphicons.less +5 -5
- data/vendor/twitter/bootstrap/less/input-groups.less +6 -2
- data/vendor/twitter/bootstrap/less/jumbotron.less +4 -0
- data/vendor/twitter/bootstrap/less/labels.less +1 -1
- data/vendor/twitter/bootstrap/less/list-group.less +22 -1
- data/vendor/twitter/bootstrap/less/mixins.less +35 -925
- data/vendor/twitter/bootstrap/less/mixins/alerts.less +14 -0
- data/vendor/twitter/bootstrap/less/mixins/background-variant.less +8 -0
- data/vendor/twitter/bootstrap/less/mixins/border-radius.less +18 -0
- data/vendor/twitter/bootstrap/less/mixins/buttons.less +50 -0
- data/vendor/twitter/bootstrap/less/mixins/center-block.less +7 -0
- data/vendor/twitter/bootstrap/less/mixins/clearfix.less +22 -0
- data/vendor/twitter/bootstrap/less/mixins/forms.less +81 -0
- data/vendor/twitter/bootstrap/less/mixins/gradients.less +59 -0
- data/vendor/twitter/bootstrap/less/mixins/grid-framework.less +91 -0
- data/vendor/twitter/bootstrap/less/mixins/grid.less +122 -0
- data/vendor/twitter/bootstrap/less/mixins/hide-text.less +21 -0
- data/vendor/twitter/bootstrap/less/mixins/image.less +34 -0
- data/vendor/twitter/bootstrap/less/mixins/labels.less +12 -0
- data/vendor/twitter/bootstrap/less/mixins/list-group.less +29 -0
- data/vendor/twitter/bootstrap/less/mixins/nav-divider.less +10 -0
- data/vendor/twitter/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/vendor/twitter/bootstrap/less/mixins/opacity.less +8 -0
- data/vendor/twitter/bootstrap/less/mixins/pagination.less +23 -0
- data/vendor/twitter/bootstrap/less/mixins/panels.less +24 -0
- data/vendor/twitter/bootstrap/less/mixins/progress-bar.less +10 -0
- data/vendor/twitter/bootstrap/less/mixins/reset-filter.less +8 -0
- data/vendor/twitter/bootstrap/less/mixins/resize.less +6 -0
- data/vendor/twitter/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/vendor/twitter/bootstrap/less/mixins/size.less +10 -0
- data/vendor/twitter/bootstrap/less/mixins/tab-focus.less +9 -0
- data/vendor/twitter/bootstrap/less/mixins/table-row.less +28 -0
- data/vendor/twitter/bootstrap/less/mixins/text-emphasis.less +8 -0
- data/vendor/twitter/bootstrap/less/mixins/text-overflow.less +8 -0
- data/vendor/twitter/bootstrap/less/mixins/vendor-prefixes.less +224 -0
- data/vendor/twitter/bootstrap/less/modals.less +18 -7
- data/vendor/twitter/bootstrap/less/navbar.less +41 -2
- data/vendor/twitter/bootstrap/less/navs.less +1 -1
- data/vendor/twitter/bootstrap/less/normalize.less +20 -18
- data/vendor/twitter/bootstrap/less/panels.less +8 -6
- data/vendor/twitter/bootstrap/less/popovers.less +1 -1
- data/vendor/twitter/bootstrap/less/progress-bars.less +27 -2
- data/vendor/twitter/bootstrap/less/responsive-embed.less +34 -0
- data/vendor/twitter/bootstrap/less/responsive-utilities.less +103 -1
- data/vendor/twitter/bootstrap/less/scaffolding.less +17 -1
- data/vendor/twitter/bootstrap/less/tables.less +4 -4
- data/vendor/twitter/bootstrap/less/theme.less +11 -0
- data/vendor/twitter/bootstrap/less/type.less +32 -12
- data/vendor/twitter/bootstrap/less/utilities.less +1 -0
- data/vendor/twitter/bootstrap/less/variables.less +40 -23
- data/vendor/twitter/bootstrap/sass/_alerts.scss +4 -3
- data/vendor/twitter/bootstrap/sass/_badges.scss +13 -11
- data/vendor/twitter/bootstrap/sass/_button-groups.scss +16 -2
- data/vendor/twitter/bootstrap/sass/_buttons.scss +0 -2
- data/vendor/twitter/bootstrap/sass/_carousel.scss +15 -4
- data/vendor/twitter/bootstrap/sass/_code.scss +6 -1
- data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -4
- data/vendor/twitter/bootstrap/sass/_dropdowns.scss +2 -0
- data/vendor/twitter/bootstrap/sass/_forms.scss +144 -42
- data/vendor/twitter/bootstrap/sass/_glyphicons.scss +4 -0
- data/vendor/twitter/bootstrap/sass/_input-groups.scss +6 -2
- data/vendor/twitter/bootstrap/sass/_jumbotron.scss +4 -0
- data/vendor/twitter/bootstrap/sass/_labels.scss +11 -9
- data/vendor/twitter/bootstrap/sass/_list-group.scss +22 -1
- data/vendor/twitter/bootstrap/sass/_mixins.scss +35 -943
- data/vendor/twitter/bootstrap/sass/_modals.scss +18 -7
- data/vendor/twitter/bootstrap/sass/_navbar.scss +41 -2
- data/vendor/twitter/bootstrap/sass/_navs.scss +1 -1
- data/vendor/twitter/bootstrap/sass/_normalize.scss +20 -18
- data/vendor/twitter/bootstrap/sass/_panels.scss +8 -6
- data/vendor/twitter/bootstrap/sass/_popovers.scss +1 -1
- data/vendor/twitter/bootstrap/sass/_progress-bars.scss +27 -2
- data/vendor/twitter/bootstrap/sass/_responsive-embed.scss +34 -0
- data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +101 -1
- data/vendor/twitter/bootstrap/sass/_scaffolding.scss +17 -1
- data/vendor/twitter/bootstrap/sass/_tables.scss +4 -4
- data/vendor/twitter/bootstrap/sass/_theme.scss +11 -0
- data/vendor/twitter/bootstrap/sass/_type.scss +32 -12
- data/vendor/twitter/bootstrap/sass/_utilities.scss +1 -0
- data/vendor/twitter/bootstrap/sass/_variables.scss +41 -24
- data/vendor/twitter/bootstrap/sass/bootstrap.scss +3 -2
- data/vendor/twitter/bootstrap/sass/mixins/_alerts.scss +14 -0
- data/vendor/twitter/bootstrap/sass/mixins/_background-variant.scss +11 -0
- data/vendor/twitter/bootstrap/sass/mixins/_border-radius.scss +18 -0
- data/vendor/twitter/bootstrap/sass/mixins/_buttons.scss +50 -0
- data/vendor/twitter/bootstrap/sass/mixins/_center-block.scss +7 -0
- data/vendor/twitter/bootstrap/sass/mixins/_clearfix.scss +22 -0
- data/vendor/twitter/bootstrap/sass/mixins/_forms.scss +84 -0
- data/vendor/twitter/bootstrap/sass/mixins/_gradients.scss +58 -0
- data/vendor/twitter/bootstrap/sass/mixins/_grid-framework.scss +81 -0
- data/vendor/twitter/bootstrap/sass/mixins/_grid.scss +122 -0
- data/vendor/twitter/bootstrap/sass/mixins/_hide-text.scss +21 -0
- data/vendor/twitter/bootstrap/sass/mixins/_image.scss +34 -0
- data/vendor/twitter/bootstrap/sass/mixins/_labels.scss +12 -0
- data/vendor/twitter/bootstrap/sass/mixins/_list-group.scss +31 -0
- data/vendor/twitter/bootstrap/sass/mixins/_nav-divider.scss +10 -0
- data/vendor/twitter/bootstrap/sass/mixins/_nav-vertical-align.scss +9 -0
- data/vendor/twitter/bootstrap/sass/mixins/_opacity.scss +8 -0
- data/vendor/twitter/bootstrap/sass/mixins/_pagination.scss +23 -0
- data/vendor/twitter/bootstrap/sass/mixins/_panels.scss +24 -0
- data/vendor/twitter/bootstrap/sass/mixins/_progress-bar.scss +10 -0
- data/vendor/twitter/bootstrap/sass/mixins/_reset-filter.scss +8 -0
- data/vendor/twitter/bootstrap/sass/mixins/_resize.scss +6 -0
- data/vendor/twitter/bootstrap/sass/mixins/_responsive-visibility.scss +21 -0
- data/vendor/twitter/bootstrap/sass/mixins/_size.scss +10 -0
- data/vendor/twitter/bootstrap/sass/mixins/_tab-focus.scss +9 -0
- data/vendor/twitter/bootstrap/sass/mixins/_table-row.scss +28 -0
- data/vendor/twitter/bootstrap/sass/mixins/_text-emphasis.scss +11 -0
- data/vendor/twitter/bootstrap/sass/mixins/_text-overflow.scss +8 -0
- data/vendor/twitter/bootstrap/sass/mixins/_vendor-prefixes.scss +219 -0
- metadata +62 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: affix.js v3.
|
2
|
+
* Bootstrap: affix.js v3.2.0
|
3
3
|
* http://getbootstrap.com/javascript/#affix
|
4
4
|
* ========================================================================
|
5
5
|
* Copyright 2011-2014 Twitter, Inc.
|
@@ -15,7 +15,8 @@
|
|
15
15
|
|
16
16
|
var Affix = function (element, options) {
|
17
17
|
this.options = $.extend({}, Affix.DEFAULTS, options)
|
18
|
-
|
18
|
+
|
19
|
+
this.$target = $(this.options.target)
|
19
20
|
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
20
21
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
21
22
|
|
@@ -27,16 +28,19 @@
|
|
27
28
|
this.checkPosition()
|
28
29
|
}
|
29
30
|
|
30
|
-
Affix.
|
31
|
+
Affix.VERSION = '3.2.0'
|
32
|
+
|
33
|
+
Affix.RESET = 'affix affix-top affix-bottom'
|
31
34
|
|
32
35
|
Affix.DEFAULTS = {
|
33
|
-
offset: 0
|
36
|
+
offset: 0,
|
37
|
+
target: window
|
34
38
|
}
|
35
39
|
|
36
40
|
Affix.prototype.getPinnedOffset = function () {
|
37
41
|
if (this.pinnedOffset) return this.pinnedOffset
|
38
42
|
this.$element.removeClass(Affix.RESET).addClass('affix')
|
39
|
-
var scrollTop = this.$
|
43
|
+
var scrollTop = this.$target.scrollTop()
|
40
44
|
var position = this.$element.offset()
|
41
45
|
return (this.pinnedOffset = position.top - scrollTop)
|
42
46
|
}
|
@@ -49,14 +53,12 @@
|
|
49
53
|
if (!this.$element.is(':visible')) return
|
50
54
|
|
51
55
|
var scrollHeight = $(document).height()
|
52
|
-
var scrollTop = this.$
|
56
|
+
var scrollTop = this.$target.scrollTop()
|
53
57
|
var position = this.$element.offset()
|
54
58
|
var offset = this.options.offset
|
55
59
|
var offsetTop = offset.top
|
56
60
|
var offsetBottom = offset.bottom
|
57
61
|
|
58
|
-
if (this.affixed == 'top') position.top += scrollTop
|
59
|
-
|
60
62
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
61
63
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
62
64
|
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
@@ -66,7 +68,7 @@
|
|
66
68
|
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
|
67
69
|
|
68
70
|
if (this.affixed === affix) return
|
69
|
-
if (this.unpin) this.$element.css('top', '')
|
71
|
+
if (this.unpin != null) this.$element.css('top', '')
|
70
72
|
|
71
73
|
var affixType = 'affix' + (affix ? '-' + affix : '')
|
72
74
|
var e = $.Event(affixType + '.bs.affix')
|
@@ -84,7 +86,9 @@
|
|
84
86
|
.trigger($.Event(affixType.replace('affix', 'affixed')))
|
85
87
|
|
86
88
|
if (affix == 'bottom') {
|
87
|
-
this.$element.offset({
|
89
|
+
this.$element.offset({
|
90
|
+
top: scrollHeight - this.$element.height() - offsetBottom
|
91
|
+
})
|
88
92
|
}
|
89
93
|
}
|
90
94
|
|
@@ -92,9 +96,7 @@
|
|
92
96
|
// AFFIX PLUGIN DEFINITION
|
93
97
|
// =======================
|
94
98
|
|
95
|
-
|
96
|
-
|
97
|
-
$.fn.affix = function (option) {
|
99
|
+
function Plugin(option) {
|
98
100
|
return this.each(function () {
|
99
101
|
var $this = $(this)
|
100
102
|
var data = $this.data('bs.affix')
|
@@ -105,6 +107,9 @@
|
|
105
107
|
})
|
106
108
|
}
|
107
109
|
|
110
|
+
var old = $.fn.affix
|
111
|
+
|
112
|
+
$.fn.affix = Plugin
|
108
113
|
$.fn.affix.Constructor = Affix
|
109
114
|
|
110
115
|
|
@@ -130,7 +135,7 @@
|
|
130
135
|
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
131
136
|
if (data.offsetTop) data.offset.top = data.offsetTop
|
132
137
|
|
133
|
-
$spy
|
138
|
+
Plugin.call($spy, data)
|
134
139
|
})
|
135
140
|
})
|
136
141
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: alert.js v3.
|
2
|
+
* Bootstrap: alert.js v3.2.0
|
3
3
|
* http://getbootstrap.com/javascript/#alerts
|
4
4
|
* ========================================================================
|
5
5
|
* Copyright 2011-2014 Twitter, Inc.
|
@@ -18,6 +18,8 @@
|
|
18
18
|
$(el).on('click', dismiss, this.close)
|
19
19
|
}
|
20
20
|
|
21
|
+
Alert.VERSION = '3.2.0'
|
22
|
+
|
21
23
|
Alert.prototype.close = function (e) {
|
22
24
|
var $this = $(this)
|
23
25
|
var selector = $this.attr('data-target')
|
@@ -42,12 +44,13 @@
|
|
42
44
|
$parent.removeClass('in')
|
43
45
|
|
44
46
|
function removeElement() {
|
45
|
-
|
47
|
+
// detach from parent, fire event then clean up data
|
48
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
46
49
|
}
|
47
50
|
|
48
51
|
$.support.transition && $parent.hasClass('fade') ?
|
49
52
|
$parent
|
50
|
-
.one(
|
53
|
+
.one('bsTransitionEnd', removeElement)
|
51
54
|
.emulateTransitionEnd(150) :
|
52
55
|
removeElement()
|
53
56
|
}
|
@@ -56,9 +59,7 @@
|
|
56
59
|
// ALERT PLUGIN DEFINITION
|
57
60
|
// =======================
|
58
61
|
|
59
|
-
|
60
|
-
|
61
|
-
$.fn.alert = function (option) {
|
62
|
+
function Plugin(option) {
|
62
63
|
return this.each(function () {
|
63
64
|
var $this = $(this)
|
64
65
|
var data = $this.data('bs.alert')
|
@@ -68,6 +69,9 @@
|
|
68
69
|
})
|
69
70
|
}
|
70
71
|
|
72
|
+
var old = $.fn.alert
|
73
|
+
|
74
|
+
$.fn.alert = Plugin
|
71
75
|
$.fn.alert.Constructor = Alert
|
72
76
|
|
73
77
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: button.js v3.
|
2
|
+
* Bootstrap: button.js v3.2.0
|
3
3
|
* http://getbootstrap.com/javascript/#buttons
|
4
4
|
* ========================================================================
|
5
5
|
* Copyright 2011-2014 Twitter, Inc.
|
@@ -19,6 +19,8 @@
|
|
19
19
|
this.isLoading = false
|
20
20
|
}
|
21
21
|
|
22
|
+
Button.VERSION = '3.2.0'
|
23
|
+
|
22
24
|
Button.DEFAULTS = {
|
23
25
|
loadingText: 'loading...'
|
24
26
|
}
|
@@ -31,9 +33,9 @@
|
|
31
33
|
|
32
34
|
state = state + 'Text'
|
33
35
|
|
34
|
-
if (
|
36
|
+
if (data.resetText == null) $el.data('resetText', $el[val]())
|
35
37
|
|
36
|
-
$el[val](data[state]
|
38
|
+
$el[val](data[state] == null ? this.options[state] : data[state])
|
37
39
|
|
38
40
|
// push to event loop to allow forms to submit
|
39
41
|
setTimeout($.proxy(function () {
|
@@ -67,9 +69,7 @@
|
|
67
69
|
// BUTTON PLUGIN DEFINITION
|
68
70
|
// ========================
|
69
71
|
|
70
|
-
|
71
|
-
|
72
|
-
$.fn.button = function (option) {
|
72
|
+
function Plugin(option) {
|
73
73
|
return this.each(function () {
|
74
74
|
var $this = $(this)
|
75
75
|
var data = $this.data('bs.button')
|
@@ -82,6 +82,9 @@
|
|
82
82
|
})
|
83
83
|
}
|
84
84
|
|
85
|
+
var old = $.fn.button
|
86
|
+
|
87
|
+
$.fn.button = Plugin
|
85
88
|
$.fn.button.Constructor = Button
|
86
89
|
|
87
90
|
|
@@ -97,10 +100,10 @@
|
|
97
100
|
// BUTTON DATA-API
|
98
101
|
// ===============
|
99
102
|
|
100
|
-
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
|
103
|
+
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
101
104
|
var $btn = $(e.target)
|
102
105
|
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
103
|
-
$btn
|
106
|
+
Plugin.call($btn, 'toggle')
|
104
107
|
e.preventDefault()
|
105
108
|
})
|
106
109
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: carousel.js v3.
|
2
|
+
* Bootstrap: carousel.js v3.2.0
|
3
3
|
* http://getbootstrap.com/javascript/#carousel
|
4
4
|
* ========================================================================
|
5
5
|
* Copyright 2011-2014 Twitter, Inc.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
// =========================
|
15
15
|
|
16
16
|
var Carousel = function (element, options) {
|
17
|
-
this.$element = $(element)
|
17
|
+
this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
18
18
|
this.$indicators = this.$element.find('.carousel-indicators')
|
19
19
|
this.options = options
|
20
20
|
this.paused =
|
@@ -24,17 +24,29 @@
|
|
24
24
|
this.$items = null
|
25
25
|
|
26
26
|
this.options.pause == 'hover' && this.$element
|
27
|
-
.on('mouseenter', $.proxy(this.pause, this))
|
28
|
-
.on('mouseleave', $.proxy(this.cycle, this))
|
27
|
+
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
28
|
+
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
29
29
|
}
|
30
30
|
|
31
|
+
Carousel.VERSION = '3.2.0'
|
32
|
+
|
31
33
|
Carousel.DEFAULTS = {
|
32
34
|
interval: 5000,
|
33
35
|
pause: 'hover',
|
34
36
|
wrap: true
|
35
37
|
}
|
36
38
|
|
37
|
-
Carousel.prototype.
|
39
|
+
Carousel.prototype.keydown = function (e) {
|
40
|
+
switch (e.which) {
|
41
|
+
case 37: this.prev(); break
|
42
|
+
case 39: this.next(); break
|
43
|
+
default: return
|
44
|
+
}
|
45
|
+
|
46
|
+
e.preventDefault()
|
47
|
+
}
|
48
|
+
|
49
|
+
Carousel.prototype.cycle = function (e) {
|
38
50
|
e || (this.paused = false)
|
39
51
|
|
40
52
|
this.interval && clearInterval(this.interval)
|
@@ -46,20 +58,18 @@
|
|
46
58
|
return this
|
47
59
|
}
|
48
60
|
|
49
|
-
Carousel.prototype.
|
50
|
-
this.$
|
51
|
-
this.$items
|
52
|
-
|
53
|
-
return this.$items.index(this.$active)
|
61
|
+
Carousel.prototype.getItemIndex = function (item) {
|
62
|
+
this.$items = item.parent().children('.item')
|
63
|
+
return this.$items.index(item || this.$active)
|
54
64
|
}
|
55
65
|
|
56
66
|
Carousel.prototype.to = function (pos) {
|
57
67
|
var that = this
|
58
|
-
var activeIndex = this.
|
68
|
+
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
|
59
69
|
|
60
70
|
if (pos > (this.$items.length - 1) || pos < 0) return
|
61
71
|
|
62
|
-
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
|
72
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
63
73
|
if (activeIndex == pos) return this.pause().cycle()
|
64
74
|
|
65
75
|
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
@@ -101,11 +111,15 @@
|
|
101
111
|
$next = this.$element.find('.item')[fallback]()
|
102
112
|
}
|
103
113
|
|
104
|
-
if ($next.hasClass('active')) return this.sliding = false
|
114
|
+
if ($next.hasClass('active')) return (this.sliding = false)
|
105
115
|
|
106
|
-
var
|
107
|
-
|
108
|
-
|
116
|
+
var relatedTarget = $next[0]
|
117
|
+
var slideEvent = $.Event('slide.bs.carousel', {
|
118
|
+
relatedTarget: relatedTarget,
|
119
|
+
direction: direction
|
120
|
+
})
|
121
|
+
this.$element.trigger(slideEvent)
|
122
|
+
if (slideEvent.isDefaultPrevented()) return
|
109
123
|
|
110
124
|
this.sliding = true
|
111
125
|
|
@@ -113,30 +127,31 @@
|
|
113
127
|
|
114
128
|
if (this.$indicators.length) {
|
115
129
|
this.$indicators.find('.active').removeClass('active')
|
116
|
-
this.$
|
117
|
-
|
118
|
-
$nextIndicator && $nextIndicator.addClass('active')
|
119
|
-
})
|
130
|
+
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
|
131
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
120
132
|
}
|
121
133
|
|
134
|
+
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
122
135
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
123
136
|
$next.addClass(type)
|
124
137
|
$next[0].offsetWidth // force reflow
|
125
138
|
$active.addClass(direction)
|
126
139
|
$next.addClass(direction)
|
127
140
|
$active
|
128
|
-
.one(
|
141
|
+
.one('bsTransitionEnd', function () {
|
129
142
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
130
143
|
$active.removeClass(['active', direction].join(' '))
|
131
144
|
that.sliding = false
|
132
|
-
setTimeout(function () {
|
145
|
+
setTimeout(function () {
|
146
|
+
that.$element.trigger(slidEvent)
|
147
|
+
}, 0)
|
133
148
|
})
|
134
149
|
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
|
135
150
|
} else {
|
136
151
|
$active.removeClass('active')
|
137
152
|
$next.addClass('active')
|
138
153
|
this.sliding = false
|
139
|
-
this.$element.trigger(
|
154
|
+
this.$element.trigger(slidEvent)
|
140
155
|
}
|
141
156
|
|
142
157
|
isCycling && this.cycle()
|
@@ -148,9 +163,7 @@
|
|
148
163
|
// CAROUSEL PLUGIN DEFINITION
|
149
164
|
// ==========================
|
150
165
|
|
151
|
-
|
152
|
-
|
153
|
-
$.fn.carousel = function (option) {
|
166
|
+
function Plugin(option) {
|
154
167
|
return this.each(function () {
|
155
168
|
var $this = $(this)
|
156
169
|
var data = $this.data('bs.carousel')
|
@@ -164,6 +177,9 @@
|
|
164
177
|
})
|
165
178
|
}
|
166
179
|
|
180
|
+
var old = $.fn.carousel
|
181
|
+
|
182
|
+
$.fn.carousel = Plugin
|
167
183
|
$.fn.carousel.Constructor = Carousel
|
168
184
|
|
169
185
|
|
@@ -180,15 +196,17 @@
|
|
180
196
|
// =================
|
181
197
|
|
182
198
|
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
183
|
-
var
|
184
|
-
var $
|
199
|
+
var href
|
200
|
+
var $this = $(this)
|
201
|
+
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
202
|
+
if (!$target.hasClass('carousel')) return
|
185
203
|
var options = $.extend({}, $target.data(), $this.data())
|
186
204
|
var slideIndex = $this.attr('data-slide-to')
|
187
205
|
if (slideIndex) options.interval = false
|
188
206
|
|
189
|
-
$target
|
207
|
+
Plugin.call($target, options)
|
190
208
|
|
191
|
-
if (slideIndex
|
209
|
+
if (slideIndex) {
|
192
210
|
$target.data('bs.carousel').to(slideIndex)
|
193
211
|
}
|
194
212
|
|
@@ -198,7 +216,7 @@
|
|
198
216
|
$(window).on('load', function () {
|
199
217
|
$('[data-ride="carousel"]').each(function () {
|
200
218
|
var $carousel = $(this)
|
201
|
-
|
219
|
+
Plugin.call($carousel, $carousel.data())
|
202
220
|
})
|
203
221
|
})
|
204
222
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: collapse.js v3.
|
2
|
+
* Bootstrap: collapse.js v3.2.0
|
3
3
|
* http://getbootstrap.com/javascript/#collapse
|
4
4
|
* ========================================================================
|
5
5
|
* Copyright 2011-2014 Twitter, Inc.
|
@@ -22,6 +22,8 @@
|
|
22
22
|
if (this.options.toggle) this.toggle()
|
23
23
|
}
|
24
24
|
|
25
|
+
Collapse.VERSION = '3.2.0'
|
26
|
+
|
25
27
|
Collapse.DEFAULTS = {
|
26
28
|
toggle: true
|
27
29
|
}
|
@@ -43,7 +45,7 @@
|
|
43
45
|
if (actives && actives.length) {
|
44
46
|
var hasData = actives.data('bs.collapse')
|
45
47
|
if (hasData && hasData.transitioning) return
|
46
|
-
|
48
|
+
Plugin.call(actives, 'hide')
|
47
49
|
hasData || actives.data('bs.collapse', null)
|
48
50
|
}
|
49
51
|
|
@@ -51,18 +53,17 @@
|
|
51
53
|
|
52
54
|
this.$element
|
53
55
|
.removeClass('collapse')
|
54
|
-
.addClass('collapsing')
|
55
|
-
[dimension](0)
|
56
|
+
.addClass('collapsing')[dimension](0)
|
56
57
|
|
57
58
|
this.transitioning = 1
|
58
59
|
|
59
60
|
var complete = function () {
|
60
61
|
this.$element
|
61
62
|
.removeClass('collapsing')
|
62
|
-
.addClass('collapse in')
|
63
|
-
[dimension]('auto')
|
63
|
+
.addClass('collapse in')[dimension]('')
|
64
64
|
this.transitioning = 0
|
65
|
-
this.$element
|
65
|
+
this.$element
|
66
|
+
.trigger('shown.bs.collapse')
|
66
67
|
}
|
67
68
|
|
68
69
|
if (!$.support.transition) return complete.call(this)
|
@@ -70,9 +71,8 @@
|
|
70
71
|
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
71
72
|
|
72
73
|
this.$element
|
73
|
-
.one(
|
74
|
-
.emulateTransitionEnd(350)
|
75
|
-
[dimension](this.$element[0][scrollSize])
|
74
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
75
|
+
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
|
76
76
|
}
|
77
77
|
|
78
78
|
Collapse.prototype.hide = function () {
|
@@ -84,9 +84,7 @@
|
|
84
84
|
|
85
85
|
var dimension = this.dimension()
|
86
86
|
|
87
|
-
this.$element
|
88
|
-
[dimension](this.$element[dimension]())
|
89
|
-
[0].offsetHeight
|
87
|
+
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
90
88
|
|
91
89
|
this.$element
|
92
90
|
.addClass('collapsing')
|
@@ -107,7 +105,7 @@
|
|
107
105
|
|
108
106
|
this.$element
|
109
107
|
[dimension](0)
|
110
|
-
.one(
|
108
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
111
109
|
.emulateTransitionEnd(350)
|
112
110
|
}
|
113
111
|
|
@@ -119,9 +117,7 @@
|
|
119
117
|
// COLLAPSE PLUGIN DEFINITION
|
120
118
|
// ==========================
|
121
119
|
|
122
|
-
|
123
|
-
|
124
|
-
$.fn.collapse = function (option) {
|
120
|
+
function Plugin(option) {
|
125
121
|
return this.each(function () {
|
126
122
|
var $this = $(this)
|
127
123
|
var data = $this.data('bs.collapse')
|
@@ -133,6 +129,9 @@
|
|
133
129
|
})
|
134
130
|
}
|
135
131
|
|
132
|
+
var old = $.fn.collapse
|
133
|
+
|
134
|
+
$.fn.collapse = Plugin
|
136
135
|
$.fn.collapse.Constructor = Collapse
|
137
136
|
|
138
137
|
|
@@ -148,11 +147,12 @@
|
|
148
147
|
// COLLAPSE DATA-API
|
149
148
|
// =================
|
150
149
|
|
151
|
-
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
152
|
-
var
|
150
|
+
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
151
|
+
var href
|
152
|
+
var $this = $(this)
|
153
153
|
var target = $this.attr('data-target')
|
154
154
|
|| e.preventDefault()
|
155
|
-
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
155
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
156
156
|
var $target = $(target)
|
157
157
|
var data = $target.data('bs.collapse')
|
158
158
|
var option = data ? 'toggle' : $this.data()
|
@@ -160,11 +160,11 @@
|
|
160
160
|
var $parent = parent && $(parent)
|
161
161
|
|
162
162
|
if (!data || !data.transitioning) {
|
163
|
-
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
163
|
+
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
164
164
|
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
165
165
|
}
|
166
166
|
|
167
|
-
$target
|
167
|
+
Plugin.call($target, option)
|
168
168
|
})
|
169
169
|
|
170
170
|
}(jQuery);
|