drink_up_doctor 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +32 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +74 -0
- data/Rakefile +11 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bootstrap-boilerplate/.gitignore +8 -0
- data/bootstrap-boilerplate/404.html +25 -0
- data/bootstrap-boilerplate/README.md.tt +88 -0
- data/bootstrap-boilerplate/_includes/footer.html +18 -0
- data/bootstrap-boilerplate/_includes/google_analytics.html +10 -0
- data/bootstrap-boilerplate/_includes/head.html +11 -0
- data/bootstrap-boilerplate/_includes/header.html +27 -0
- data/bootstrap-boilerplate/_includes/index_item.html +5 -0
- data/bootstrap-boilerplate/_includes/page_js.html +4 -0
- data/bootstrap-boilerplate/_layouts/category_index.html +12 -0
- data/bootstrap-boilerplate/_layouts/default.html +22 -0
- data/bootstrap-boilerplate/_layouts/page.html +13 -0
- data/bootstrap-boilerplate/_layouts/post.html +13 -0
- data/bootstrap-boilerplate/_layouts/tag_index.html +14 -0
- data/bootstrap-boilerplate/_plugins/category_index.rb +42 -0
- data/bootstrap-boilerplate/_plugins/slug_sort.rb +13 -0
- data/bootstrap-boilerplate/_plugins/tag_index.rb +41 -0
- data/bootstrap-boilerplate/_posts/2015-10-18-post-four.md +17 -0
- data/bootstrap-boilerplate/_posts/2015-10-18-post-one.md +12 -0
- data/bootstrap-boilerplate/_posts/2015-10-18-post-three.md +20 -0
- data/bootstrap-boilerplate/_posts/2015-10-18-post-two.md +16 -0
- data/bootstrap-boilerplate/_posts/2015-10-18-welcome.md +8 -0
- data/bootstrap-boilerplate/_sass/_bootstrap-compass.scss +9 -0
- data/bootstrap-boilerplate/_sass/_bootstrap-mincer.scss +19 -0
- data/bootstrap-boilerplate/_sass/_bootstrap-sprockets.scss +9 -0
- data/bootstrap-boilerplate/_sass/_bootstrap.scss +56 -0
- data/bootstrap-boilerplate/_sass/_my_variables.scss +874 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_alerts.scss +73 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_badges.scss +68 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_breadcrumbs.scss +26 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_button-groups.scss +244 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_buttons.scss +168 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_carousel.scss +269 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_close.scss +36 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_code.scss +69 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_component-animations.scss +37 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_dropdowns.scss +216 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_forms.scss +611 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_glyphicons.scss +307 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_grid.scss +84 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_input-groups.scss +167 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_jumbotron.scss +52 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_labels.scss +66 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_list-group.scss +130 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_media.scss +66 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_mixins.scss +40 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_modals.scss +150 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_navbar.scss +662 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_navs.scss +242 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_normalize.scss +424 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_pager.scss +54 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_pagination.scss +89 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_panels.scss +271 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_popovers.scss +131 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_print.scss +101 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_progress-bars.scss +87 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_responsive-embed.scss +35 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_responsive-utilities.scss +179 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_scaffolding.scss +161 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_tables.scss +234 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_theme.scss +291 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_thumbnails.scss +38 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_tooltip.scss +101 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_type.scss +298 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_utilities.scss +55 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_variables.scss +872 -0
- data/bootstrap-boilerplate/_sass/bootstrap/_wells.scss +29 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_alerts.scss +14 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_background-variant.scss +12 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_border-radius.scss +18 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_buttons.scss +68 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_center-block.scss +7 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_clearfix.scss +22 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_forms.scss +88 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_gradients.scss +58 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_grid-framework.scss +81 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_grid.scss +122 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_hide-text.scss +21 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_image.scss +33 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_labels.scss +12 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_list-group.scss +32 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_nav-divider.scss +10 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_opacity.scss +8 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_pagination.scss +24 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_panels.scss +24 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_progress-bar.scss +10 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_reset-filter.scss +8 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_reset-text.scss +18 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_resize.scss +6 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_size.scss +10 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_tab-focus.scss +9 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_table-row.scss +28 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_text-overflow.scss +8 -0
- data/bootstrap-boilerplate/_sass/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/bootstrap-boilerplate/_sass/main.scss +20 -0
- data/bootstrap-boilerplate/about/index.md +24 -0
- data/bootstrap-boilerplate/apple-touch-icon.png +0 -0
- data/bootstrap-boilerplate/browserconfig.xml +12 -0
- data/bootstrap-boilerplate/crossdomain.xml +14 -0
- data/bootstrap-boilerplate/favicon.ico +0 -0
- data/bootstrap-boilerplate/fonts/glyphicons-halflings-regular.eot +0 -0
- data/bootstrap-boilerplate/fonts/glyphicons-halflings-regular.svg +229 -0
- data/bootstrap-boilerplate/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/bootstrap-boilerplate/fonts/glyphicons-halflings-regular.woff +0 -0
- data/bootstrap-boilerplate/humans.txt.tt +18 -0
- data/bootstrap-boilerplate/index.html +18 -0
- data/bootstrap-boilerplate/js/main.js +1 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/affix.js +162 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/alert.js +94 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/button.js +120 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/carousel.js +237 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/collapse.js +211 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/dropdown.js +165 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/modal.js +337 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/popover.js +108 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/scrollspy.js +172 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/tab.js +155 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/tooltip.js +514 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap/transition.js +59 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap-sprockets.js +12 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap.js +2363 -0
- data/bootstrap-boilerplate/js/vendor/bootstrap.min.js +7 -0
- data/bootstrap-boilerplate/js/vendor/jquery-1.11.2.js +10346 -0
- data/bootstrap-boilerplate/js/vendor/jquery-1.11.2.min.js +4 -0
- data/bootstrap-boilerplate/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js +11 -0
- data/bootstrap-boilerplate/js/vendor/npm.js +13 -0
- data/bootstrap-boilerplate/robots.txt +5 -0
- data/bootstrap-boilerplate/tile-wide.png +0 -0
- data/bootstrap-boilerplate/tile.png +0 -0
- data/drink_up_doctor.gemspec +29 -0
- data/exe/drink_up_doctor +4 -0
- data/lib/drink_up_doctor/new_site.rb +178 -0
- data/lib/drink_up_doctor/new_twbs_site.rb +124 -0
- data/lib/drink_up_doctor/version.rb +3 -0
- data/lib/drink_up_doctor.rb +12 -0
- data/templates/Gemfile +11 -0
- data/templates/README.md.erb +81 -0
- data/templates/bower.json.erb +17 -0
- data/templates/gulpfile.js.erb +84 -0
- data/templates/main.scss +46 -0
- data/templates/package.json.erb +20 -0
- data/templates/setup.sh +2 -0
- data/templates/site_gitignore +7 -0
- metadata +285 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: scrollspy.js v3.3.5
|
3
|
+
* http://getbootstrap.com/javascript/#scrollspy
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2015 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
|
+
this.$body = $(document.body)
|
18
|
+
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
19
|
+
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
20
|
+
this.selector = (this.options.target || '') + ' .nav li > a'
|
21
|
+
this.offsets = []
|
22
|
+
this.targets = []
|
23
|
+
this.activeTarget = null
|
24
|
+
this.scrollHeight = 0
|
25
|
+
|
26
|
+
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
27
|
+
this.refresh()
|
28
|
+
this.process()
|
29
|
+
}
|
30
|
+
|
31
|
+
ScrollSpy.VERSION = '3.3.5'
|
32
|
+
|
33
|
+
ScrollSpy.DEFAULTS = {
|
34
|
+
offset: 10
|
35
|
+
}
|
36
|
+
|
37
|
+
ScrollSpy.prototype.getScrollHeight = function () {
|
38
|
+
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
39
|
+
}
|
40
|
+
|
41
|
+
ScrollSpy.prototype.refresh = function () {
|
42
|
+
var that = this
|
43
|
+
var offsetMethod = 'offset'
|
44
|
+
var offsetBase = 0
|
45
|
+
|
46
|
+
this.offsets = []
|
47
|
+
this.targets = []
|
48
|
+
this.scrollHeight = this.getScrollHeight()
|
49
|
+
|
50
|
+
if (!$.isWindow(this.$scrollElement[0])) {
|
51
|
+
offsetMethod = 'position'
|
52
|
+
offsetBase = this.$scrollElement.scrollTop()
|
53
|
+
}
|
54
|
+
|
55
|
+
this.$body
|
56
|
+
.find(this.selector)
|
57
|
+
.map(function () {
|
58
|
+
var $el = $(this)
|
59
|
+
var href = $el.data('target') || $el.attr('href')
|
60
|
+
var $href = /^#./.test(href) && $(href)
|
61
|
+
|
62
|
+
return ($href
|
63
|
+
&& $href.length
|
64
|
+
&& $href.is(':visible')
|
65
|
+
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
66
|
+
})
|
67
|
+
.sort(function (a, b) { return a[0] - b[0] })
|
68
|
+
.each(function () {
|
69
|
+
that.offsets.push(this[0])
|
70
|
+
that.targets.push(this[1])
|
71
|
+
})
|
72
|
+
}
|
73
|
+
|
74
|
+
ScrollSpy.prototype.process = function () {
|
75
|
+
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
76
|
+
var scrollHeight = this.getScrollHeight()
|
77
|
+
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
|
78
|
+
var offsets = this.offsets
|
79
|
+
var targets = this.targets
|
80
|
+
var activeTarget = this.activeTarget
|
81
|
+
var i
|
82
|
+
|
83
|
+
if (this.scrollHeight != scrollHeight) {
|
84
|
+
this.refresh()
|
85
|
+
}
|
86
|
+
|
87
|
+
if (scrollTop >= maxScroll) {
|
88
|
+
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
89
|
+
}
|
90
|
+
|
91
|
+
if (activeTarget && scrollTop < offsets[0]) {
|
92
|
+
this.activeTarget = null
|
93
|
+
return this.clear()
|
94
|
+
}
|
95
|
+
|
96
|
+
for (i = offsets.length; i--;) {
|
97
|
+
activeTarget != targets[i]
|
98
|
+
&& scrollTop >= offsets[i]
|
99
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
100
|
+
&& this.activate(targets[i])
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
ScrollSpy.prototype.activate = function (target) {
|
105
|
+
this.activeTarget = target
|
106
|
+
|
107
|
+
this.clear()
|
108
|
+
|
109
|
+
var selector = this.selector +
|
110
|
+
'[data-target="' + target + '"],' +
|
111
|
+
this.selector + '[href="' + target + '"]'
|
112
|
+
|
113
|
+
var active = $(selector)
|
114
|
+
.parents('li')
|
115
|
+
.addClass('active')
|
116
|
+
|
117
|
+
if (active.parent('.dropdown-menu').length) {
|
118
|
+
active = active
|
119
|
+
.closest('li.dropdown')
|
120
|
+
.addClass('active')
|
121
|
+
}
|
122
|
+
|
123
|
+
active.trigger('activate.bs.scrollspy')
|
124
|
+
}
|
125
|
+
|
126
|
+
ScrollSpy.prototype.clear = function () {
|
127
|
+
$(this.selector)
|
128
|
+
.parentsUntil(this.options.target, '.active')
|
129
|
+
.removeClass('active')
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
// SCROLLSPY PLUGIN DEFINITION
|
134
|
+
// ===========================
|
135
|
+
|
136
|
+
function Plugin(option) {
|
137
|
+
return this.each(function () {
|
138
|
+
var $this = $(this)
|
139
|
+
var data = $this.data('bs.scrollspy')
|
140
|
+
var options = typeof option == 'object' && option
|
141
|
+
|
142
|
+
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
143
|
+
if (typeof option == 'string') data[option]()
|
144
|
+
})
|
145
|
+
}
|
146
|
+
|
147
|
+
var old = $.fn.scrollspy
|
148
|
+
|
149
|
+
$.fn.scrollspy = Plugin
|
150
|
+
$.fn.scrollspy.Constructor = ScrollSpy
|
151
|
+
|
152
|
+
|
153
|
+
// SCROLLSPY NO CONFLICT
|
154
|
+
// =====================
|
155
|
+
|
156
|
+
$.fn.scrollspy.noConflict = function () {
|
157
|
+
$.fn.scrollspy = old
|
158
|
+
return this
|
159
|
+
}
|
160
|
+
|
161
|
+
|
162
|
+
// SCROLLSPY DATA-API
|
163
|
+
// ==================
|
164
|
+
|
165
|
+
$(window).on('load.bs.scrollspy.data-api', function () {
|
166
|
+
$('[data-spy="scroll"]').each(function () {
|
167
|
+
var $spy = $(this)
|
168
|
+
Plugin.call($spy, $spy.data())
|
169
|
+
})
|
170
|
+
})
|
171
|
+
|
172
|
+
}(jQuery);
|
@@ -0,0 +1,155 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: tab.js v3.3.5
|
3
|
+
* http://getbootstrap.com/javascript/#tabs
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2015 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
|
+
// jscs:disable requireDollarBeforejQueryAssignment
|
18
|
+
this.element = $(element)
|
19
|
+
// jscs:enable requireDollarBeforejQueryAssignment
|
20
|
+
}
|
21
|
+
|
22
|
+
Tab.VERSION = '3.3.5'
|
23
|
+
|
24
|
+
Tab.TRANSITION_DURATION = 150
|
25
|
+
|
26
|
+
Tab.prototype.show = function () {
|
27
|
+
var $this = this.element
|
28
|
+
var $ul = $this.closest('ul:not(.dropdown-menu)')
|
29
|
+
var selector = $this.data('target')
|
30
|
+
|
31
|
+
if (!selector) {
|
32
|
+
selector = $this.attr('href')
|
33
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
34
|
+
}
|
35
|
+
|
36
|
+
if ($this.parent('li').hasClass('active')) return
|
37
|
+
|
38
|
+
var $previous = $ul.find('.active:last a')
|
39
|
+
var hideEvent = $.Event('hide.bs.tab', {
|
40
|
+
relatedTarget: $this[0]
|
41
|
+
})
|
42
|
+
var showEvent = $.Event('show.bs.tab', {
|
43
|
+
relatedTarget: $previous[0]
|
44
|
+
})
|
45
|
+
|
46
|
+
$previous.trigger(hideEvent)
|
47
|
+
$this.trigger(showEvent)
|
48
|
+
|
49
|
+
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
|
50
|
+
|
51
|
+
var $target = $(selector)
|
52
|
+
|
53
|
+
this.activate($this.closest('li'), $ul)
|
54
|
+
this.activate($target, $target.parent(), function () {
|
55
|
+
$previous.trigger({
|
56
|
+
type: 'hidden.bs.tab',
|
57
|
+
relatedTarget: $this[0]
|
58
|
+
})
|
59
|
+
$this.trigger({
|
60
|
+
type: 'shown.bs.tab',
|
61
|
+
relatedTarget: $previous[0]
|
62
|
+
})
|
63
|
+
})
|
64
|
+
}
|
65
|
+
|
66
|
+
Tab.prototype.activate = function (element, container, callback) {
|
67
|
+
var $active = container.find('> .active')
|
68
|
+
var transition = callback
|
69
|
+
&& $.support.transition
|
70
|
+
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
71
|
+
|
72
|
+
function next() {
|
73
|
+
$active
|
74
|
+
.removeClass('active')
|
75
|
+
.find('> .dropdown-menu > .active')
|
76
|
+
.removeClass('active')
|
77
|
+
.end()
|
78
|
+
.find('[data-toggle="tab"]')
|
79
|
+
.attr('aria-expanded', false)
|
80
|
+
|
81
|
+
element
|
82
|
+
.addClass('active')
|
83
|
+
.find('[data-toggle="tab"]')
|
84
|
+
.attr('aria-expanded', true)
|
85
|
+
|
86
|
+
if (transition) {
|
87
|
+
element[0].offsetWidth // reflow for transition
|
88
|
+
element.addClass('in')
|
89
|
+
} else {
|
90
|
+
element.removeClass('fade')
|
91
|
+
}
|
92
|
+
|
93
|
+
if (element.parent('.dropdown-menu').length) {
|
94
|
+
element
|
95
|
+
.closest('li.dropdown')
|
96
|
+
.addClass('active')
|
97
|
+
.end()
|
98
|
+
.find('[data-toggle="tab"]')
|
99
|
+
.attr('aria-expanded', true)
|
100
|
+
}
|
101
|
+
|
102
|
+
callback && callback()
|
103
|
+
}
|
104
|
+
|
105
|
+
$active.length && transition ?
|
106
|
+
$active
|
107
|
+
.one('bsTransitionEnd', next)
|
108
|
+
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
|
109
|
+
next()
|
110
|
+
|
111
|
+
$active.removeClass('in')
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
// TAB PLUGIN DEFINITION
|
116
|
+
// =====================
|
117
|
+
|
118
|
+
function Plugin(option) {
|
119
|
+
return this.each(function () {
|
120
|
+
var $this = $(this)
|
121
|
+
var data = $this.data('bs.tab')
|
122
|
+
|
123
|
+
if (!data) $this.data('bs.tab', (data = new Tab(this)))
|
124
|
+
if (typeof option == 'string') data[option]()
|
125
|
+
})
|
126
|
+
}
|
127
|
+
|
128
|
+
var old = $.fn.tab
|
129
|
+
|
130
|
+
$.fn.tab = Plugin
|
131
|
+
$.fn.tab.Constructor = Tab
|
132
|
+
|
133
|
+
|
134
|
+
// TAB NO CONFLICT
|
135
|
+
// ===============
|
136
|
+
|
137
|
+
$.fn.tab.noConflict = function () {
|
138
|
+
$.fn.tab = old
|
139
|
+
return this
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
// TAB DATA-API
|
144
|
+
// ============
|
145
|
+
|
146
|
+
var clickHandler = function (e) {
|
147
|
+
e.preventDefault()
|
148
|
+
Plugin.call($(this), 'show')
|
149
|
+
}
|
150
|
+
|
151
|
+
$(document)
|
152
|
+
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
|
153
|
+
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
|
154
|
+
|
155
|
+
}(jQuery);
|