bootstrap-sass 2.3.1.3 → 3.4.1
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 +5 -5
- data/.gitignore +20 -0
- data/.travis.yml +19 -0
- data/CHANGELOG.md +215 -0
- data/CONTRIBUTING.md +86 -0
- data/Gemfile +7 -0
- data/LICENSE +18 -10
- data/README.md +290 -67
- data/Rakefile +98 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/images/.keep +0 -0
- data/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/assets/javascripts/bootstrap.js +2580 -0
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/javascripts/bootstrap/affix.js +164 -0
- data/assets/javascripts/bootstrap/alert.js +95 -0
- data/assets/javascripts/bootstrap/button.js +125 -0
- data/assets/javascripts/bootstrap/carousel.js +246 -0
- data/assets/javascripts/bootstrap/collapse.js +212 -0
- data/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/assets/javascripts/bootstrap/modal.js +358 -0
- data/assets/javascripts/bootstrap/popover.js +123 -0
- data/assets/javascripts/bootstrap/scrollspy.js +172 -0
- data/assets/javascripts/bootstrap/tab.js +155 -0
- data/assets/javascripts/bootstrap/tooltip.js +677 -0
- data/assets/javascripts/bootstrap/transition.js +59 -0
- data/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/assets/stylesheets/_bootstrap.scss +56 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/assets/stylesheets/bootstrap/_badges.scss +68 -0
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
- data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +271 -0
- data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +13 -8
- data/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/assets/stylesheets/bootstrap/_forms.scss +607 -0
- data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
- data/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +40 -0
- data/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +656 -0
- data/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/assets/stylesheets/bootstrap/_panels.scss +271 -0
- data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
- data/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
- data/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/assets/stylesheets/bootstrap/_theme.scss +295 -0
- data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
- data/assets/stylesheets/bootstrap/_type.scss +298 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/assets/stylesheets/bootstrap/_variables.scss +874 -0
- data/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/bootstrap-sass.gemspec +37 -0
- data/bower.json +36 -0
- data/composer.json +35 -0
- data/eyeglass-exports.js +7 -0
- data/lib/bootstrap-sass.rb +75 -35
- data/lib/bootstrap-sass/engine.rb +12 -2
- data/lib/bootstrap-sass/version.rb +4 -0
- data/package-lock.json +1611 -0
- data/package.json +44 -0
- data/sache.json +5 -0
- data/tasks/bower.rake +31 -0
- data/tasks/converter.rb +80 -0
- data/tasks/converter/char_string_scanner.rb +38 -0
- data/tasks/converter/fonts_conversion.rb +16 -0
- data/tasks/converter/js_conversion.rb +47 -0
- data/tasks/converter/less_conversion.rb +713 -0
- data/tasks/converter/logger.rb +57 -0
- data/tasks/converter/network.rb +97 -0
- data/templates/project/_bootstrap-variables.sass +875 -0
- data/templates/project/manifest.rb +15 -14
- data/templates/project/styles.sass +6 -0
- data/test/compilation_test.rb +30 -0
- data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
- data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
- data/test/dummy_node_mincer/manifest.js +87 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +2 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/config/application.rb +31 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/dummy_sass_only/Gemfile +4 -0
- data/test/dummy_sass_only/compile.rb +20 -0
- data/test/dummy_sass_only/import_all.scss +2 -0
- data/test/gemfiles/default.gemfile +3 -0
- data/test/node_mincer_test.rb +35 -0
- data/test/node_sass_compile_test.sh +9 -0
- data/test/pages_test.rb +14 -0
- data/test/sass_test.rb +29 -0
- data/test/sprockets_rails_test.rb +31 -0
- data/test/support/dummy_rails_integration.rb +22 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +36 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +404 -89
- data/lib/bootstrap-sass/compass_functions.rb +0 -24
- data/lib/bootstrap-sass/sass_functions.rb +0 -14
- data/templates/project/_variables.scss +0 -301
- data/templates/project/styles.scss +0 -8
- 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 +0 -117
- data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
- data/vendor/assets/javascripts/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -165
- data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
- data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
- data/vendor/assets/javascripts/bootstrap.js +0 -13
- data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
- data/vendor/assets/stylesheets/bootstrap.scss +0 -1
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +0 -79
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -24
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +0 -229
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +0 -228
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +0 -158
- data/vendor/assets/stylesheets/bootstrap/_code.scss +0 -61
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +0 -22
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +0 -237
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +0 -689
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +0 -21
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
- data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
- data/vendor/assets/stylesheets/bootstrap/_media.scss +0 -55
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +0 -690
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +0 -95
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +0 -497
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +0 -409
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +0 -43
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +0 -123
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +0 -133
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +0 -122
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
- data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
- data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
- data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
- data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -74
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +0 -53
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +0 -235
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +0 -53
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +0 -70
- data/vendor/assets/stylesheets/bootstrap/_type.scss +0 -247
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +0 -45
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +0 -301
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +0 -29
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -63
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* ========================================================================
|
|
2
|
+
* Bootstrap: popover.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#popovers
|
|
4
|
+
* ========================================================================
|
|
5
|
+
* Copyright 2011-2019 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.4.1'
|
|
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
|
+
if (this.options.html) {
|
|
49
|
+
var typeContent = typeof content
|
|
50
|
+
|
|
51
|
+
if (this.options.sanitize) {
|
|
52
|
+
title = this.sanitizeHtml(title)
|
|
53
|
+
|
|
54
|
+
if (typeContent === 'string') {
|
|
55
|
+
content = this.sanitizeHtml(content)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$tip.find('.popover-title').html(title)
|
|
60
|
+
$tip.find('.popover-content').children().detach().end()[
|
|
61
|
+
typeContent === 'string' ? 'html' : 'append'
|
|
62
|
+
](content)
|
|
63
|
+
} else {
|
|
64
|
+
$tip.find('.popover-title').text(title)
|
|
65
|
+
$tip.find('.popover-content').children().detach().end().text(content)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$tip.removeClass('fade top bottom left right in')
|
|
69
|
+
|
|
70
|
+
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
|
71
|
+
// this manually by checking the contents.
|
|
72
|
+
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Popover.prototype.hasContent = function () {
|
|
76
|
+
return this.getTitle() || this.getContent()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
Popover.prototype.getContent = function () {
|
|
80
|
+
var $e = this.$element
|
|
81
|
+
var o = this.options
|
|
82
|
+
|
|
83
|
+
return $e.attr('data-content')
|
|
84
|
+
|| (typeof o.content == 'function' ?
|
|
85
|
+
o.content.call($e[0]) :
|
|
86
|
+
o.content)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
Popover.prototype.arrow = function () {
|
|
90
|
+
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
// POPOVER PLUGIN DEFINITION
|
|
95
|
+
// =========================
|
|
96
|
+
|
|
97
|
+
function Plugin(option) {
|
|
98
|
+
return this.each(function () {
|
|
99
|
+
var $this = $(this)
|
|
100
|
+
var data = $this.data('bs.popover')
|
|
101
|
+
var options = typeof option == 'object' && option
|
|
102
|
+
|
|
103
|
+
if (!data && /destroy|hide/.test(option)) return
|
|
104
|
+
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
|
105
|
+
if (typeof option == 'string') data[option]()
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var old = $.fn.popover
|
|
110
|
+
|
|
111
|
+
$.fn.popover = Plugin
|
|
112
|
+
$.fn.popover.Constructor = Popover
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
// POPOVER NO CONFLICT
|
|
116
|
+
// ===================
|
|
117
|
+
|
|
118
|
+
$.fn.popover.noConflict = function () {
|
|
119
|
+
$.fn.popover = old
|
|
120
|
+
return this
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
}(jQuery);
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* ========================================================================
|
|
2
|
+
* Bootstrap: scrollspy.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#scrollspy
|
|
4
|
+
* ========================================================================
|
|
5
|
+
* Copyright 2011-2019 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.4.1'
|
|
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.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#tabs
|
|
4
|
+
* ========================================================================
|
|
5
|
+
* Copyright 2011-2019 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.4.1'
|
|
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 = $(document).find(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);
|