ndr_error 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ndr_error/ndr_error.js +1 -3
- data/app/assets/stylesheets/ndr_error/ndr_error.scss +1 -37
- data/app/models/ndr_error/fingerprint.rb +5 -10
- data/lib/ndr_error/version.rb +1 -1
- metadata +5 -111
- data/app/assets/fonts/ndr_error/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/ndr_error/bootstrap/glyphicons-halflings-regular.svg +0 -229
- data/app/assets/fonts/ndr_error/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/ndr_error/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/ndr_error/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/ndr_error/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-affix.js +0 -142
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-alert.js +0 -92
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-button.js +0 -110
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-carousel.js +0 -223
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-collapse.js +0 -170
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-dropdown.js +0 -151
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-modal.js +0 -280
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-popover.js +0 -113
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-scrollspy.js +0 -170
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-tab.js +0 -128
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-tooltip.js +0 -457
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-transition.js +0 -59
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap-typeahead.js +0 -1782
- data/app/assets/javascripts/ndr_error/bootstrap/bootstrap.js +0 -13
- data/app/assets/javascripts/ndr_error/jquery-1.11.3.min.js +0 -5
- data/app/assets/stylesheets/ndr_error/bootstrap/_alerts.scss +0 -68
- data/app/assets/stylesheets/ndr_error/bootstrap/_badges.scss +0 -57
- data/app/assets/stylesheets/ndr_error/bootstrap/_bootstrap-sprockets.scss +0 -13
- data/app/assets/stylesheets/ndr_error/bootstrap/_breadcrumbs.scss +0 -26
- data/app/assets/stylesheets/ndr_error/bootstrap/_button-groups.scss +0 -240
- data/app/assets/stylesheets/ndr_error/bootstrap/_buttons.scss +0 -157
- data/app/assets/stylesheets/ndr_error/bootstrap/_carousel.scss +0 -243
- data/app/assets/stylesheets/ndr_error/bootstrap/_close.scss +0 -35
- data/app/assets/stylesheets/ndr_error/bootstrap/_code.scss +0 -68
- data/app/assets/stylesheets/ndr_error/bootstrap/_component-animations.scss +0 -35
- data/app/assets/stylesheets/ndr_error/bootstrap/_dropdowns.scss +0 -215
- data/app/assets/stylesheets/ndr_error/bootstrap/_forms.scss +0 -538
- data/app/assets/stylesheets/ndr_error/bootstrap/_glyphicons.scss +0 -233
- data/app/assets/stylesheets/ndr_error/bootstrap/_grid.scss +0 -84
- data/app/assets/stylesheets/ndr_error/bootstrap/_input-groups.scss +0 -166
- data/app/assets/stylesheets/ndr_error/bootstrap/_jumbotron.scss +0 -48
- data/app/assets/stylesheets/ndr_error/bootstrap/_labels.scss +0 -66
- data/app/assets/stylesheets/ndr_error/bootstrap/_list-group.scss +0 -131
- data/app/assets/stylesheets/ndr_error/bootstrap/_media.scss +0 -56
- data/app/assets/stylesheets/ndr_error/bootstrap/_mixins.scss +0 -39
- data/app/assets/stylesheets/ndr_error/bootstrap/_modals.scss +0 -150
- data/app/assets/stylesheets/ndr_error/bootstrap/_navbar.scss +0 -659
- data/app/assets/stylesheets/ndr_error/bootstrap/_navs.scss +0 -242
- data/app/assets/stylesheets/ndr_error/bootstrap/_normalize.scss +0 -425
- data/app/assets/stylesheets/ndr_error/bootstrap/_pager.scss +0 -55
- data/app/assets/stylesheets/ndr_error/bootstrap/_pagination.scss +0 -88
- data/app/assets/stylesheets/ndr_error/bootstrap/_panels.scss +0 -243
- data/app/assets/stylesheets/ndr_error/bootstrap/_popovers.scss +0 -133
- data/app/assets/stylesheets/ndr_error/bootstrap/_print.scss +0 -101
- data/app/assets/stylesheets/ndr_error/bootstrap/_progress-bars.scss +0 -105
- data/app/assets/stylesheets/ndr_error/bootstrap/_responsive-embed.scss +0 -34
- data/app/assets/stylesheets/ndr_error/bootstrap/_responsive-utilities.scss +0 -174
- data/app/assets/stylesheets/ndr_error/bootstrap/_scaffolding.scss +0 -150
- data/app/assets/stylesheets/ndr_error/bootstrap/_tables.scss +0 -233
- data/app/assets/stylesheets/ndr_error/bootstrap/_theme.scss +0 -258
- data/app/assets/stylesheets/ndr_error/bootstrap/_thumbnails.scss +0 -38
- data/app/assets/stylesheets/ndr_error/bootstrap/_tooltip.scss +0 -95
- data/app/assets/stylesheets/ndr_error/bootstrap/_type.scss +0 -304
- data/app/assets/stylesheets/ndr_error/bootstrap/_utilities.scss +0 -57
- data/app/assets/stylesheets/ndr_error/bootstrap/_variables.scss +0 -846
- data/app/assets/stylesheets/ndr_error/bootstrap/_wells.scss +0 -29
- data/app/assets/stylesheets/ndr_error/bootstrap/bootstrap.scss +0 -53
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_alerts.scss +0 -14
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_background-variant.scss +0 -11
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_border-radius.scss +0 -18
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_buttons.scss +0 -50
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_center-block.scss +0 -7
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_clearfix.scss +0 -22
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_forms.scss +0 -84
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_gradients.scss +0 -58
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_grid-framework.scss +0 -81
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_grid.scss +0 -122
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_hide-text.scss +0 -21
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_image.scss +0 -34
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_labels.scss +0 -12
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_list-group.scss +0 -31
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_nav-divider.scss +0 -10
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_opacity.scss +0 -8
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_pagination.scss +0 -23
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_panels.scss +0 -24
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_progress-bar.scss +0 -10
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_reset-filter.scss +0 -8
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_resize.scss +0 -6
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_responsive-visibility.scss +0 -21
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_size.scss +0 -10
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_tab-focus.scss +0 -9
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_table-row.scss +0 -28
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_text-emphasis.scss +0 -11
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_text-overflow.scss +0 -8
- data/app/assets/stylesheets/ndr_error/bootstrap/mixins/_vendor-prefixes.scss +0 -219
@@ -1,113 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.2.0
|
3
|
-
* http://getbootstrap.com/javascript/#popovers
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// POPOVER PUBLIC CLASS DEFINITION
|
14
|
-
// ===============================
|
15
|
-
|
16
|
-
var Popover = function (element, options) {
|
17
|
-
this.init('popover', element, options)
|
18
|
-
}
|
19
|
-
|
20
|
-
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
21
|
-
|
22
|
-
Popover.VERSION = '3.2.0'
|
23
|
-
|
24
|
-
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
25
|
-
placement: 'right',
|
26
|
-
trigger: 'click',
|
27
|
-
content: '',
|
28
|
-
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
29
|
-
})
|
30
|
-
|
31
|
-
|
32
|
-
// NOTE: POPOVER EXTENDS tooltip.js
|
33
|
-
// ================================
|
34
|
-
|
35
|
-
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
|
36
|
-
|
37
|
-
Popover.prototype.constructor = Popover
|
38
|
-
|
39
|
-
Popover.prototype.getDefaults = function () {
|
40
|
-
return Popover.DEFAULTS
|
41
|
-
}
|
42
|
-
|
43
|
-
Popover.prototype.setContent = function () {
|
44
|
-
var $tip = this.tip()
|
45
|
-
var title = this.getTitle()
|
46
|
-
var content = this.getContent()
|
47
|
-
|
48
|
-
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
49
|
-
$tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
|
50
|
-
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
51
|
-
](content)
|
52
|
-
|
53
|
-
$tip.removeClass('fade top bottom left right in')
|
54
|
-
|
55
|
-
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
56
|
-
// this manually by checking the contents.
|
57
|
-
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
58
|
-
}
|
59
|
-
|
60
|
-
Popover.prototype.hasContent = function () {
|
61
|
-
return this.getTitle() || this.getContent()
|
62
|
-
}
|
63
|
-
|
64
|
-
Popover.prototype.getContent = function () {
|
65
|
-
var $e = this.$element
|
66
|
-
var o = this.options
|
67
|
-
|
68
|
-
return $e.attr('data-content')
|
69
|
-
|| (typeof o.content == 'function' ?
|
70
|
-
o.content.call($e[0]) :
|
71
|
-
o.content)
|
72
|
-
}
|
73
|
-
|
74
|
-
Popover.prototype.arrow = function () {
|
75
|
-
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
76
|
-
}
|
77
|
-
|
78
|
-
Popover.prototype.tip = function () {
|
79
|
-
if (!this.$tip) this.$tip = $(this.options.template)
|
80
|
-
return this.$tip
|
81
|
-
}
|
82
|
-
|
83
|
-
|
84
|
-
// POPOVER PLUGIN DEFINITION
|
85
|
-
// =========================
|
86
|
-
|
87
|
-
function Plugin(option) {
|
88
|
-
return this.each(function () {
|
89
|
-
var $this = $(this)
|
90
|
-
var data = $this.data('bs.popover')
|
91
|
-
var options = typeof option == 'object' && option
|
92
|
-
|
93
|
-
if (!data && option == 'destroy') return
|
94
|
-
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
95
|
-
if (typeof option == 'string') data[option]()
|
96
|
-
})
|
97
|
-
}
|
98
|
-
|
99
|
-
var old = $.fn.popover
|
100
|
-
|
101
|
-
$.fn.popover = Plugin
|
102
|
-
$.fn.popover.Constructor = Popover
|
103
|
-
|
104
|
-
|
105
|
-
// POPOVER NO CONFLICT
|
106
|
-
// ===================
|
107
|
-
|
108
|
-
$.fn.popover.noConflict = function () {
|
109
|
-
$.fn.popover = old
|
110
|
-
return this
|
111
|
-
}
|
112
|
-
|
113
|
-
}(jQuery);
|
@@ -1,170 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.2.0
|
3
|
-
* http://getbootstrap.com/javascript/#scrollspy
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// SCROLLSPY CLASS DEFINITION
|
14
|
-
// ==========================
|
15
|
-
|
16
|
-
function ScrollSpy(element, options) {
|
17
|
-
var process = $.proxy(this.process, this)
|
18
|
-
|
19
|
-
this.$body = $('body')
|
20
|
-
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
21
|
-
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
22
|
-
this.selector = (this.options.target || '') + ' .nav li > a'
|
23
|
-
this.offsets = []
|
24
|
-
this.targets = []
|
25
|
-
this.activeTarget = null
|
26
|
-
this.scrollHeight = 0
|
27
|
-
|
28
|
-
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
29
|
-
this.refresh()
|
30
|
-
this.process()
|
31
|
-
}
|
32
|
-
|
33
|
-
ScrollSpy.VERSION = '3.2.0'
|
34
|
-
|
35
|
-
ScrollSpy.DEFAULTS = {
|
36
|
-
offset: 10
|
37
|
-
}
|
38
|
-
|
39
|
-
ScrollSpy.prototype.getScrollHeight = function () {
|
40
|
-
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
41
|
-
}
|
42
|
-
|
43
|
-
ScrollSpy.prototype.refresh = function () {
|
44
|
-
var offsetMethod = 'offset'
|
45
|
-
var offsetBase = 0
|
46
|
-
|
47
|
-
if (!$.isWindow(this.$scrollElement[0])) {
|
48
|
-
offsetMethod = 'position'
|
49
|
-
offsetBase = this.$scrollElement.scrollTop()
|
50
|
-
}
|
51
|
-
|
52
|
-
this.offsets = []
|
53
|
-
this.targets = []
|
54
|
-
this.scrollHeight = this.getScrollHeight()
|
55
|
-
|
56
|
-
var self = this
|
57
|
-
|
58
|
-
this.$body
|
59
|
-
.find(this.selector)
|
60
|
-
.map(function () {
|
61
|
-
var $el = $(this)
|
62
|
-
var href = $el.data('target') || $el.attr('href')
|
63
|
-
var $href = /^#./.test(href) && $(href)
|
64
|
-
|
65
|
-
return ($href
|
66
|
-
&& $href.length
|
67
|
-
&& $href.is(':visible')
|
68
|
-
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
69
|
-
})
|
70
|
-
.sort(function (a, b) { return a[0] - b[0] })
|
71
|
-
.each(function () {
|
72
|
-
self.offsets.push(this[0])
|
73
|
-
self.targets.push(this[1])
|
74
|
-
})
|
75
|
-
}
|
76
|
-
|
77
|
-
ScrollSpy.prototype.process = function () {
|
78
|
-
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
79
|
-
var scrollHeight = this.getScrollHeight()
|
80
|
-
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
|
81
|
-
var offsets = this.offsets
|
82
|
-
var targets = this.targets
|
83
|
-
var activeTarget = this.activeTarget
|
84
|
-
var i
|
85
|
-
|
86
|
-
if (this.scrollHeight != scrollHeight) {
|
87
|
-
this.refresh()
|
88
|
-
}
|
89
|
-
|
90
|
-
if (scrollTop >= maxScroll) {
|
91
|
-
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
92
|
-
}
|
93
|
-
|
94
|
-
if (activeTarget && scrollTop <= offsets[0]) {
|
95
|
-
return activeTarget != (i = targets[0]) && this.activate(i)
|
96
|
-
}
|
97
|
-
|
98
|
-
for (i = offsets.length; i--;) {
|
99
|
-
activeTarget != targets[i]
|
100
|
-
&& scrollTop >= offsets[i]
|
101
|
-
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
102
|
-
&& this.activate(targets[i])
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
ScrollSpy.prototype.activate = function (target) {
|
107
|
-
this.activeTarget = target
|
108
|
-
|
109
|
-
$(this.selector)
|
110
|
-
.parentsUntil(this.options.target, '.active')
|
111
|
-
.removeClass('active')
|
112
|
-
|
113
|
-
var selector = this.selector +
|
114
|
-
'[data-target="' + target + '"],' +
|
115
|
-
this.selector + '[href="' + target + '"]'
|
116
|
-
|
117
|
-
var active = $(selector)
|
118
|
-
.parents('li')
|
119
|
-
.addClass('active')
|
120
|
-
|
121
|
-
if (active.parent('.dropdown-menu').length) {
|
122
|
-
active = active
|
123
|
-
.closest('li.dropdown')
|
124
|
-
.addClass('active')
|
125
|
-
}
|
126
|
-
|
127
|
-
active.trigger('activate.bs.scrollspy')
|
128
|
-
}
|
129
|
-
|
130
|
-
|
131
|
-
// SCROLLSPY PLUGIN DEFINITION
|
132
|
-
// ===========================
|
133
|
-
|
134
|
-
function Plugin(option) {
|
135
|
-
return this.each(function () {
|
136
|
-
var $this = $(this)
|
137
|
-
var data = $this.data('bs.scrollspy')
|
138
|
-
var options = typeof option == 'object' && option
|
139
|
-
|
140
|
-
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
141
|
-
if (typeof option == 'string') data[option]()
|
142
|
-
})
|
143
|
-
}
|
144
|
-
|
145
|
-
var old = $.fn.scrollspy
|
146
|
-
|
147
|
-
$.fn.scrollspy = Plugin
|
148
|
-
$.fn.scrollspy.Constructor = ScrollSpy
|
149
|
-
|
150
|
-
|
151
|
-
// SCROLLSPY NO CONFLICT
|
152
|
-
// =====================
|
153
|
-
|
154
|
-
$.fn.scrollspy.noConflict = function () {
|
155
|
-
$.fn.scrollspy = old
|
156
|
-
return this
|
157
|
-
}
|
158
|
-
|
159
|
-
|
160
|
-
// SCROLLSPY DATA-API
|
161
|
-
// ==================
|
162
|
-
|
163
|
-
$(window).on('load.bs.scrollspy.data-api', function () {
|
164
|
-
$('[data-spy="scroll"]').each(function () {
|
165
|
-
var $spy = $(this)
|
166
|
-
Plugin.call($spy, $spy.data())
|
167
|
-
})
|
168
|
-
})
|
169
|
-
|
170
|
-
}(jQuery);
|
@@ -1,128 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: tab.js v3.2.0
|
3
|
-
* http://getbootstrap.com/javascript/#tabs
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// TAB CLASS DEFINITION
|
14
|
-
// ====================
|
15
|
-
|
16
|
-
var Tab = function (element) {
|
17
|
-
this.element = $(element)
|
18
|
-
}
|
19
|
-
|
20
|
-
Tab.VERSION = '3.2.0'
|
21
|
-
|
22
|
-
Tab.prototype.show = function () {
|
23
|
-
var $this = this.element
|
24
|
-
var $ul = $this.closest('ul:not(.dropdown-menu)')
|
25
|
-
var selector = $this.data('target')
|
26
|
-
|
27
|
-
if (!selector) {
|
28
|
-
selector = $this.attr('href')
|
29
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
30
|
-
}
|
31
|
-
|
32
|
-
if ($this.parent('li').hasClass('active')) return
|
33
|
-
|
34
|
-
var previous = $ul.find('.active:last a')[0]
|
35
|
-
var e = $.Event('show.bs.tab', {
|
36
|
-
relatedTarget: previous
|
37
|
-
})
|
38
|
-
|
39
|
-
$this.trigger(e)
|
40
|
-
|
41
|
-
if (e.isDefaultPrevented()) return
|
42
|
-
|
43
|
-
var $target = $(selector)
|
44
|
-
|
45
|
-
this.activate($this.closest('li'), $ul)
|
46
|
-
this.activate($target, $target.parent(), function () {
|
47
|
-
$this.trigger({
|
48
|
-
type: 'shown.bs.tab',
|
49
|
-
relatedTarget: previous
|
50
|
-
})
|
51
|
-
})
|
52
|
-
}
|
53
|
-
|
54
|
-
Tab.prototype.activate = function (element, container, callback) {
|
55
|
-
var $active = container.find('> .active')
|
56
|
-
var transition = callback
|
57
|
-
&& $.support.transition
|
58
|
-
&& $active.hasClass('fade')
|
59
|
-
|
60
|
-
function next() {
|
61
|
-
$active
|
62
|
-
.removeClass('active')
|
63
|
-
.find('> .dropdown-menu > .active')
|
64
|
-
.removeClass('active')
|
65
|
-
|
66
|
-
element.addClass('active')
|
67
|
-
|
68
|
-
if (transition) {
|
69
|
-
element[0].offsetWidth // reflow for transition
|
70
|
-
element.addClass('in')
|
71
|
-
} else {
|
72
|
-
element.removeClass('fade')
|
73
|
-
}
|
74
|
-
|
75
|
-
if (element.parent('.dropdown-menu')) {
|
76
|
-
element.closest('li.dropdown').addClass('active')
|
77
|
-
}
|
78
|
-
|
79
|
-
callback && callback()
|
80
|
-
}
|
81
|
-
|
82
|
-
transition ?
|
83
|
-
$active
|
84
|
-
.one('bsTransitionEnd', next)
|
85
|
-
.emulateTransitionEnd(150) :
|
86
|
-
next()
|
87
|
-
|
88
|
-
$active.removeClass('in')
|
89
|
-
}
|
90
|
-
|
91
|
-
|
92
|
-
// TAB PLUGIN DEFINITION
|
93
|
-
// =====================
|
94
|
-
|
95
|
-
function Plugin(option) {
|
96
|
-
return this.each(function () {
|
97
|
-
var $this = $(this)
|
98
|
-
var data = $this.data('bs.tab')
|
99
|
-
|
100
|
-
if (!data) $this.data('bs.tab', (data = new Tab(this)))
|
101
|
-
if (typeof option == 'string') data[option]()
|
102
|
-
})
|
103
|
-
}
|
104
|
-
|
105
|
-
var old = $.fn.tab
|
106
|
-
|
107
|
-
$.fn.tab = Plugin
|
108
|
-
$.fn.tab.Constructor = Tab
|
109
|
-
|
110
|
-
|
111
|
-
// TAB NO CONFLICT
|
112
|
-
// ===============
|
113
|
-
|
114
|
-
$.fn.tab.noConflict = function () {
|
115
|
-
$.fn.tab = old
|
116
|
-
return this
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
// TAB DATA-API
|
121
|
-
// ============
|
122
|
-
|
123
|
-
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
124
|
-
e.preventDefault()
|
125
|
-
Plugin.call($(this), 'show')
|
126
|
-
})
|
127
|
-
|
128
|
-
}(jQuery);
|