active_frontend 2.0.10 → 2.0.11
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.
- checksums.yaml +4 -4
- data/lib/active_frontend/version.rb +1 -1
- data/vendor/assets/javascripts/affix.js +4 -4
- data/vendor/assets/javascripts/alert.js +1 -1
- data/vendor/assets/javascripts/button.js +1 -1
- data/vendor/assets/javascripts/carousel.js +5 -5
- data/vendor/assets/javascripts/collapse.js +6 -6
- data/vendor/assets/javascripts/dropdown.js +2 -2
- data/vendor/assets/javascripts/popover.js +7 -2
- data/vendor/assets/javascripts/scrollspy.js +19 -16
- data/vendor/assets/javascripts/tab.js +2 -2
- data/vendor/assets/javascripts/tooltip.js +12 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b35a8a9004aa928de48a975c29fa7e3e059aa6
|
4
|
+
data.tar.gz: ad9af5736fe77d2d1c5ad310a8540821659f5fc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12892902f34a5fca4b1890d026605363521822a54b38f2521872f8f6f4028d429935945535d45a9362511cb2eee825236dd36076d005648d77e2375e5fdb8c87
|
7
|
+
data.tar.gz: 2b879180927c23a518f48f02412ff76ef246f0ae92b0004c039fabfaf0526cb22ff6861bdabb9d772021424b19914be2fa73f2d93a4d198e34cd6a11a503c62a
|
@@ -12,14 +12,14 @@
|
|
12
12
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
13
13
|
|
14
14
|
this.$element = $(element)
|
15
|
-
this.affixed =
|
16
|
-
this.unpin =
|
15
|
+
this.affixed =
|
16
|
+
this.unpin =
|
17
17
|
this.pinnedOffset = null
|
18
18
|
|
19
19
|
this.checkPosition()
|
20
20
|
}
|
21
21
|
|
22
|
-
Affix.VERSION = '3.3.
|
22
|
+
Affix.VERSION = '3.3.2'
|
23
23
|
|
24
24
|
Affix.RESET = 'affix affix-top affix-bottom'
|
25
25
|
|
@@ -69,7 +69,7 @@
|
|
69
69
|
var offset = this.options.offset
|
70
70
|
var offsetTop = offset.top
|
71
71
|
var offsetBottom = offset.bottom
|
72
|
-
var scrollHeight = $(
|
72
|
+
var scrollHeight = $('body').height()
|
73
73
|
|
74
74
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
75
75
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
@@ -8,10 +8,10 @@
|
|
8
8
|
this.$element = $(element)
|
9
9
|
this.$indicators = this.$element.find('.carousel-indicators')
|
10
10
|
this.options = options
|
11
|
-
this.paused =
|
12
|
-
this.sliding =
|
13
|
-
this.interval =
|
14
|
-
this.$active =
|
11
|
+
this.paused =
|
12
|
+
this.sliding =
|
13
|
+
this.interval =
|
14
|
+
this.$active =
|
15
15
|
this.$items = null
|
16
16
|
|
17
17
|
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
@@ -21,7 +21,7 @@
|
|
21
21
|
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
22
22
|
}
|
23
23
|
|
24
|
-
Carousel.VERSION = '3.3.
|
24
|
+
Carousel.VERSION = '3.3.2'
|
25
25
|
|
26
26
|
Carousel.TRANSITION_DURATION = 600
|
27
27
|
|
@@ -7,8 +7,7 @@
|
|
7
7
|
var Collapse = function (element, options) {
|
8
8
|
this.$element = $(element)
|
9
9
|
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
10
|
-
this.$trigger = $('[
|
11
|
-
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
|
10
|
+
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
|
12
11
|
this.transitioning = null
|
13
12
|
|
14
13
|
if (this.options.parent) {
|
@@ -20,12 +19,13 @@
|
|
20
19
|
if (this.options.toggle) this.toggle()
|
21
20
|
}
|
22
21
|
|
23
|
-
Collapse.VERSION = '3.3.
|
22
|
+
Collapse.VERSION = '3.3.2'
|
24
23
|
|
25
24
|
Collapse.TRANSITION_DURATION = 350
|
26
25
|
|
27
26
|
Collapse.DEFAULTS = {
|
28
|
-
toggle: true
|
27
|
+
toggle: true,
|
28
|
+
trigger: '[data-toggle="collapse"]'
|
29
29
|
}
|
30
30
|
|
31
31
|
Collapse.prototype.dimension = function () {
|
@@ -163,7 +163,7 @@
|
|
163
163
|
var data = $this.data('bs.collapse')
|
164
164
|
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
165
165
|
|
166
|
-
if (!data && options.toggle &&
|
166
|
+
if (!data && options.toggle && option == 'show') options.toggle = false
|
167
167
|
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
168
168
|
if (typeof option == 'string') data[option]()
|
169
169
|
})
|
@@ -194,7 +194,7 @@
|
|
194
194
|
|
195
195
|
var $target = getTargetFromTrigger($this)
|
196
196
|
var data = $target.data('bs.collapse')
|
197
|
-
var option = data ? 'toggle' : $this.data()
|
197
|
+
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
|
198
198
|
|
199
199
|
Plugin.call($target, option)
|
200
200
|
})
|
@@ -10,7 +10,7 @@
|
|
10
10
|
$(element).on('click.bs.dropdown', this.toggle)
|
11
11
|
}
|
12
12
|
|
13
|
-
Dropdown.VERSION = '3.3.
|
13
|
+
Dropdown.VERSION = '3.3.2'
|
14
14
|
|
15
15
|
Dropdown.prototype.toggle = function (e) {
|
16
16
|
var $this = $(this)
|
@@ -63,7 +63,7 @@
|
|
63
63
|
return $this.trigger('click')
|
64
64
|
}
|
65
65
|
|
66
|
-
var desc = ' li:not(.
|
66
|
+
var desc = ' li:not(.divider):visible a'
|
67
67
|
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
|
68
68
|
|
69
69
|
if (!$items.length) return
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
12
12
|
|
13
|
-
Popover.VERSION = '3.3.
|
13
|
+
Popover.VERSION = '3.3.2'
|
14
14
|
|
15
15
|
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
16
16
|
placement: 'right',
|
@@ -66,6 +66,11 @@
|
|
66
66
|
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
67
67
|
}
|
68
68
|
|
69
|
+
Popover.prototype.tip = function () {
|
70
|
+
if (!this.$tip) this.$tip = $(this.options.template)
|
71
|
+
return this.$tip
|
72
|
+
}
|
73
|
+
|
69
74
|
|
70
75
|
// POPOVER PLUGIN DEFINITION
|
71
76
|
// =========================
|
@@ -76,7 +81,7 @@
|
|
76
81
|
var data = $this.data('bs.popover')
|
77
82
|
var options = typeof option == 'object' && option
|
78
83
|
|
79
|
-
if (!data &&
|
84
|
+
if (!data && option == 'destroy') return
|
80
85
|
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
81
86
|
if (typeof option == 'string') data[option]()
|
82
87
|
})
|
@@ -5,8 +5,10 @@
|
|
5
5
|
// ==========================
|
6
6
|
|
7
7
|
function ScrollSpy(element, options) {
|
8
|
-
|
9
|
-
|
8
|
+
var process = $.proxy(this.process, this)
|
9
|
+
|
10
|
+
this.$body = $('body')
|
11
|
+
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
10
12
|
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
11
13
|
this.selector = (this.options.target || '') + ' .nav li > a'
|
12
14
|
this.offsets = []
|
@@ -14,12 +16,12 @@
|
|
14
16
|
this.activeTarget = null
|
15
17
|
this.scrollHeight = 0
|
16
18
|
|
17
|
-
this.$scrollElement.on('scroll.bs.scrollspy',
|
19
|
+
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
18
20
|
this.refresh()
|
19
21
|
this.process()
|
20
22
|
}
|
21
23
|
|
22
|
-
ScrollSpy.VERSION = '3.3.
|
24
|
+
ScrollSpy.VERSION = '3.3.2'
|
23
25
|
|
24
26
|
ScrollSpy.DEFAULTS = {
|
25
27
|
offset: 10
|
@@ -30,19 +32,20 @@
|
|
30
32
|
}
|
31
33
|
|
32
34
|
ScrollSpy.prototype.refresh = function () {
|
33
|
-
var
|
34
|
-
var
|
35
|
-
var offsetBase = 0
|
36
|
-
|
37
|
-
this.offsets = []
|
38
|
-
this.targets = []
|
39
|
-
this.scrollHeight = this.getScrollHeight()
|
35
|
+
var offsetMethod = 'offset'
|
36
|
+
var offsetBase = 0
|
40
37
|
|
41
38
|
if (!$.isWindow(this.$scrollElement[0])) {
|
42
39
|
offsetMethod = 'position'
|
43
40
|
offsetBase = this.$scrollElement.scrollTop()
|
44
41
|
}
|
45
42
|
|
43
|
+
this.offsets = []
|
44
|
+
this.targets = []
|
45
|
+
this.scrollHeight = this.getScrollHeight()
|
46
|
+
|
47
|
+
var self = this
|
48
|
+
|
46
49
|
this.$body
|
47
50
|
.find(this.selector)
|
48
51
|
.map(function () {
|
@@ -57,8 +60,8 @@
|
|
57
60
|
})
|
58
61
|
.sort(function (a, b) { return a[0] - b[0] })
|
59
62
|
.each(function () {
|
60
|
-
|
61
|
-
|
63
|
+
self.offsets.push(this[0])
|
64
|
+
self.targets.push(this[1])
|
62
65
|
})
|
63
66
|
}
|
64
67
|
|
@@ -87,7 +90,7 @@
|
|
87
90
|
for (i = offsets.length; i--;) {
|
88
91
|
activeTarget != targets[i]
|
89
92
|
&& scrollTop >= offsets[i]
|
90
|
-
&& (offsets[i + 1]
|
93
|
+
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
91
94
|
&& this.activate(targets[i])
|
92
95
|
}
|
93
96
|
}
|
@@ -98,8 +101,8 @@
|
|
98
101
|
this.clear()
|
99
102
|
|
100
103
|
var selector = this.selector +
|
101
|
-
|
102
|
-
|
104
|
+
'[data-target="' + target + '"],' +
|
105
|
+
this.selector + '[href="' + target + '"]'
|
103
106
|
|
104
107
|
var active = $(selector)
|
105
108
|
.parents('li')
|
@@ -8,7 +8,7 @@
|
|
8
8
|
this.element = $(element)
|
9
9
|
}
|
10
10
|
|
11
|
-
Tab.VERSION = '3.3.
|
11
|
+
Tab.VERSION = '3.3.2'
|
12
12
|
|
13
13
|
Tab.TRANSITION_DURATION = 150
|
14
14
|
|
@@ -79,7 +79,7 @@
|
|
79
79
|
element.removeClass('fade')
|
80
80
|
}
|
81
81
|
|
82
|
-
if (element.parent('.dropdown-menu')
|
82
|
+
if (element.parent('.dropdown-menu')) {
|
83
83
|
element
|
84
84
|
.closest('li.dropdown')
|
85
85
|
.addClass('active')
|
@@ -5,17 +5,17 @@
|
|
5
5
|
// ===============================
|
6
6
|
|
7
7
|
var Tooltip = function (element, options) {
|
8
|
-
this.type =
|
9
|
-
this.options =
|
10
|
-
this.enabled =
|
11
|
-
this.timeout =
|
12
|
-
this.hoverState =
|
8
|
+
this.type =
|
9
|
+
this.options =
|
10
|
+
this.enabled =
|
11
|
+
this.timeout =
|
12
|
+
this.hoverState =
|
13
13
|
this.$element = null
|
14
14
|
|
15
15
|
this.init('tooltip', element, options)
|
16
16
|
}
|
17
17
|
|
18
|
-
Tooltip.VERSION = '3.3.
|
18
|
+
Tooltip.VERSION = '3.3.2'
|
19
19
|
|
20
20
|
Tooltip.TRANSITION_DURATION = 150
|
21
21
|
|
@@ -42,10 +42,6 @@
|
|
42
42
|
this.options = this.getOptions(options)
|
43
43
|
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
44
44
|
|
45
|
-
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
46
|
-
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
47
|
-
}
|
48
|
-
|
49
45
|
var triggers = this.options.trigger.split(' ')
|
50
46
|
|
51
47
|
for (var i = triggers.length; i--;) {
|
@@ -266,10 +262,10 @@
|
|
266
262
|
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
267
263
|
}
|
268
264
|
|
269
|
-
Tooltip.prototype.replaceArrow = function (delta, dimension,
|
265
|
+
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
270
266
|
this.arrow()
|
271
|
-
.css(
|
272
|
-
.css(
|
267
|
+
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
268
|
+
.css(isHorizontal ? 'top' : 'left', '')
|
273
269
|
}
|
274
270
|
|
275
271
|
Tooltip.prototype.setContent = function () {
|
@@ -282,7 +278,7 @@
|
|
282
278
|
|
283
279
|
Tooltip.prototype.hide = function (callback) {
|
284
280
|
var that = this
|
285
|
-
var $tip =
|
281
|
+
var $tip = this.tip()
|
286
282
|
var e = $.Event('hide.bs.' + this.type)
|
287
283
|
|
288
284
|
function complete() {
|
@@ -299,7 +295,7 @@
|
|
299
295
|
|
300
296
|
$tip.removeClass('in')
|
301
297
|
|
302
|
-
$.support.transition &&
|
298
|
+
$.support.transition && this.$tip.hasClass('fade') ?
|
303
299
|
$tip
|
304
300
|
.one('bsTransitionEnd', complete)
|
305
301
|
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
@@ -443,7 +439,7 @@
|
|
443
439
|
var data = $this.data('bs.tooltip')
|
444
440
|
var options = typeof option == 'object' && option
|
445
441
|
|
446
|
-
if (!data &&
|
442
|
+
if (!data && option == 'destroy') return
|
447
443
|
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
448
444
|
if (typeof option == 'string') data[option]()
|
449
445
|
})
|