bootstrap-sass 3.3.0.1 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +8 -14
- data/CHANGELOG.md +64 -0
- data/CONTRIBUTING.md +8 -1
- data/Gemfile +1 -4
- data/LICENSE +2 -1
- data/README.md +135 -114
- data/Rakefile +58 -12
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
- 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/javascripts/bootstrap/affix.js +11 -9
- data/assets/javascripts/bootstrap/alert.js +6 -5
- data/assets/javascripts/bootstrap/button.js +25 -16
- data/assets/javascripts/bootstrap/carousel.js +25 -18
- data/assets/javascripts/bootstrap/collapse.js +13 -12
- data/assets/javascripts/bootstrap/dropdown.js +51 -47
- data/assets/javascripts/bootstrap/modal.js +112 -35
- data/assets/javascripts/bootstrap/popover.js +31 -27
- data/assets/javascripts/bootstrap/scrollspy.js +19 -22
- data/assets/javascripts/bootstrap/tab.js +14 -12
- data/assets/javascripts/bootstrap/tooltip.js +255 -56
- data/assets/javascripts/bootstrap/transition.js +5 -5
- data/assets/javascripts/bootstrap-sprockets.js +2 -2
- data/assets/javascripts/bootstrap.js +1282 -962
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/stylesheets/_bootstrap-compass.scss +2 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +4 -2
- data/assets/stylesheets/_bootstrap-sprockets.scss +2 -0
- data/assets/stylesheets/_bootstrap.scss +6 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +8 -3
- data/assets/stylesheets/bootstrap/_badges.scss +16 -5
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
- data/assets/stylesheets/bootstrap/_button-groups.scss +11 -14
- data/assets/stylesheets/bootstrap/_buttons.scss +18 -10
- data/assets/stylesheets/bootstrap/_carousel.scss +40 -36
- data/assets/stylesheets/bootstrap/_close.scss +2 -0
- data/assets/stylesheets/bootstrap/_code.scss +3 -3
- data/assets/stylesheets/bootstrap/_component-animations.scss +2 -2
- data/assets/stylesheets/bootstrap/_dropdowns.scss +24 -24
- data/assets/stylesheets/bootstrap/_forms.scss +149 -103
- data/assets/stylesheets/bootstrap/_glyphicons.scss +85 -12
- data/assets/stylesheets/bootstrap/_grid.scss +10 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +10 -5
- data/assets/stylesheets/bootstrap/_jumbotron.scss +11 -5
- data/assets/stylesheets/bootstrap/_labels.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +30 -34
- data/assets/stylesheets/bootstrap/_media.scss +19 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
- data/assets/stylesheets/bootstrap/_modals.scss +9 -8
- data/assets/stylesheets/bootstrap/_navbar.scss +77 -82
- data/assets/stylesheets/bootstrap/_navs.scss +4 -6
- data/assets/stylesheets/bootstrap/_normalize.scss +13 -13
- data/assets/stylesheets/bootstrap/_pager.scss +2 -2
- data/assets/stylesheets/bootstrap/_pagination.scss +15 -17
- data/assets/stylesheets/bootstrap/_panels.scss +16 -6
- data/assets/stylesheets/bootstrap/_popovers.scss +50 -58
- data/assets/stylesheets/bootstrap/_print.scss +90 -98
- data/assets/stylesheets/bootstrap/_progress-bars.scss +3 -3
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +10 -10
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +11 -6
- data/assets/stylesheets/bootstrap/_scaffolding.scss +18 -7
- data/assets/stylesheets/bootstrap/_tables.scss +24 -24
- data/assets/stylesheets/bootstrap/_theme.scss +57 -22
- data/assets/stylesheets/bootstrap/_thumbnails.scss +1 -1
- data/assets/stylesheets/bootstrap/_tooltip.scss +49 -32
- data/assets/stylesheets/bootstrap/_type.scss +12 -12
- data/assets/stylesheets/bootstrap/_utilities.scss +0 -1
- data/assets/stylesheets/bootstrap/_variables.scss +27 -17
- data/assets/stylesheets/bootstrap/_wells.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +20 -11
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +6 -8
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_image.scss +5 -10
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +2 -3
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +1 -5
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +4 -4
- data/bootstrap-sass.gemspec +10 -9
- data/bower.json +6 -20
- data/composer.json +2 -2
- data/eyeglass-exports.js +7 -0
- data/lib/bootstrap-sass/engine.rb +6 -1
- data/lib/bootstrap-sass/version.rb +2 -2
- data/lib/bootstrap-sass.rb +32 -13
- data/package-lock.json +1611 -0
- data/package.json +21 -7
- data/sache.json +1 -1
- data/tasks/bower.rake +2 -5
- data/tasks/converter/fonts_conversion.rb +1 -1
- data/tasks/converter/js_conversion.rb +7 -5
- data/tasks/converter/less_conversion.rb +48 -37
- data/tasks/converter/network.rb +12 -7
- data/tasks/converter.rb +1 -1
- data/templates/project/_bootstrap-variables.sass +27 -18
- data/templates/project/styles.sass +3 -0
- data/test/compilation_test.rb +24 -12
- data/test/dummy_rails/app/assets/stylesheets/{application.css.sass → application.sass} +0 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +43 -0
- data/test/dummy_rails/config/application.rb +2 -1
- data/test/dummy_rails/config/boot.rb +1 -1
- data/test/dummy_rails/config/environments/development.rb +0 -3
- data/test/dummy_rails/config/environments/production.rb +7 -1
- data/test/dummy_rails/config/environments/test.rb +9 -1
- data/test/dummy_sass_only/Gemfile +1 -1
- data/test/dummy_sass_only/compile.rb +14 -7
- data/test/dummy_sass_only/import_all.scss +2 -0
- data/test/gemfiles/default.gemfile +3 -0
- data/test/node_mincer_test.rb +2 -3
- data/test/node_sass_compile_test.sh +4 -3
- data/test/sass_test.rb +10 -7
- data/test/sprockets_rails_test.rb +12 -8
- data/test/support/dummy_rails_integration.rb +1 -1
- data/test/support/reporting.rb +10 -0
- data/test/test_helper.rb +3 -2
- metadata +56 -46
- data/test/compass_test.rb +0 -9
- data/test/dummy_rails/log/development.log +0 -0
- data/test/dummy_sass_only/import_all.sass +0 -2
- data/test/gemfiles/sass_3_2.gemfile +0 -6
- data/test/gemfiles/sass_3_3.gemfile +0 -6
- data/test/gemfiles/sass_3_4.gemfile +0 -7
- data/test/gemfiles/sass_head.gemfile +0 -6
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: modal.js v3.
|
3
|
-
*
|
2
|
+
* Bootstrap: modal.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#modals
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,12 +14,16 @@
|
|
14
14
|
// ======================
|
15
15
|
|
16
16
|
var Modal = function (element, options) {
|
17
|
-
this.options
|
18
|
-
this.$body
|
19
|
-
this.$element
|
20
|
-
this.$
|
21
|
-
this
|
17
|
+
this.options = options
|
18
|
+
this.$body = $(document.body)
|
19
|
+
this.$element = $(element)
|
20
|
+
this.$dialog = this.$element.find('.modal-dialog')
|
21
|
+
this.$backdrop = null
|
22
|
+
this.isShown = null
|
23
|
+
this.originalBodyPad = null
|
22
24
|
this.scrollbarWidth = 0
|
25
|
+
this.ignoreBackdropClick = false
|
26
|
+
this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
|
23
27
|
|
24
28
|
if (this.options.remote) {
|
25
29
|
this.$element
|
@@ -30,7 +34,7 @@
|
|
30
34
|
}
|
31
35
|
}
|
32
36
|
|
33
|
-
Modal.VERSION
|
37
|
+
Modal.VERSION = '3.4.1'
|
34
38
|
|
35
39
|
Modal.TRANSITION_DURATION = 300
|
36
40
|
Modal.BACKDROP_TRANSITION_DURATION = 150
|
@@ -47,7 +51,7 @@
|
|
47
51
|
|
48
52
|
Modal.prototype.show = function (_relatedTarget) {
|
49
53
|
var that = this
|
50
|
-
var e
|
54
|
+
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
|
51
55
|
|
52
56
|
this.$element.trigger(e)
|
53
57
|
|
@@ -56,13 +60,20 @@
|
|
56
60
|
this.isShown = true
|
57
61
|
|
58
62
|
this.checkScrollbar()
|
63
|
+
this.setScrollbar()
|
59
64
|
this.$body.addClass('modal-open')
|
60
65
|
|
61
|
-
this.setScrollbar()
|
62
66
|
this.escape()
|
67
|
+
this.resize()
|
63
68
|
|
64
69
|
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
65
70
|
|
71
|
+
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
|
72
|
+
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
|
73
|
+
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
|
74
|
+
})
|
75
|
+
})
|
76
|
+
|
66
77
|
this.backdrop(function () {
|
67
78
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
68
79
|
|
@@ -74,20 +85,20 @@
|
|
74
85
|
.show()
|
75
86
|
.scrollTop(0)
|
76
87
|
|
88
|
+
that.adjustDialog()
|
89
|
+
|
77
90
|
if (transition) {
|
78
91
|
that.$element[0].offsetWidth // force reflow
|
79
92
|
}
|
80
93
|
|
81
|
-
that.$element
|
82
|
-
.addClass('in')
|
83
|
-
.attr('aria-hidden', false)
|
94
|
+
that.$element.addClass('in')
|
84
95
|
|
85
96
|
that.enforceFocus()
|
86
97
|
|
87
98
|
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
88
99
|
|
89
100
|
transition ?
|
90
|
-
that.$
|
101
|
+
that.$dialog // wait for modal to slide in
|
91
102
|
.one('bsTransitionEnd', function () {
|
92
103
|
that.$element.trigger('focus').trigger(e)
|
93
104
|
})
|
@@ -108,13 +119,16 @@
|
|
108
119
|
this.isShown = false
|
109
120
|
|
110
121
|
this.escape()
|
122
|
+
this.resize()
|
111
123
|
|
112
124
|
$(document).off('focusin.bs.modal')
|
113
125
|
|
114
126
|
this.$element
|
115
127
|
.removeClass('in')
|
116
|
-
.attr('aria-hidden', true)
|
117
128
|
.off('click.dismiss.bs.modal')
|
129
|
+
.off('mouseup.dismiss.bs.modal')
|
130
|
+
|
131
|
+
this.$dialog.off('mousedown.dismiss.bs.modal')
|
118
132
|
|
119
133
|
$.support.transition && this.$element.hasClass('fade') ?
|
120
134
|
this.$element
|
@@ -127,7 +141,9 @@
|
|
127
141
|
$(document)
|
128
142
|
.off('focusin.bs.modal') // guard against infinite focus loop
|
129
143
|
.on('focusin.bs.modal', $.proxy(function (e) {
|
130
|
-
if (
|
144
|
+
if (document !== e.target &&
|
145
|
+
this.$element[0] !== e.target &&
|
146
|
+
!this.$element.has(e.target).length) {
|
131
147
|
this.$element.trigger('focus')
|
132
148
|
}
|
133
149
|
}, this))
|
@@ -143,11 +159,20 @@
|
|
143
159
|
}
|
144
160
|
}
|
145
161
|
|
162
|
+
Modal.prototype.resize = function () {
|
163
|
+
if (this.isShown) {
|
164
|
+
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
|
165
|
+
} else {
|
166
|
+
$(window).off('resize.bs.modal')
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
146
170
|
Modal.prototype.hideModal = function () {
|
147
171
|
var that = this
|
148
172
|
this.$element.hide()
|
149
173
|
this.backdrop(function () {
|
150
174
|
that.$body.removeClass('modal-open')
|
175
|
+
that.resetAdjustments()
|
151
176
|
that.resetScrollbar()
|
152
177
|
that.$element.trigger('hidden.bs.modal')
|
153
178
|
})
|
@@ -165,14 +190,20 @@
|
|
165
190
|
if (this.isShown && this.options.backdrop) {
|
166
191
|
var doAnimate = $.support.transition && animate
|
167
192
|
|
168
|
-
this.$backdrop = $('
|
169
|
-
.
|
170
|
-
.
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
193
|
+
this.$backdrop = $(document.createElement('div'))
|
194
|
+
.addClass('modal-backdrop ' + animate)
|
195
|
+
.appendTo(this.$body)
|
196
|
+
|
197
|
+
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
198
|
+
if (this.ignoreBackdropClick) {
|
199
|
+
this.ignoreBackdropClick = false
|
200
|
+
return
|
201
|
+
}
|
202
|
+
if (e.target !== e.currentTarget) return
|
203
|
+
this.options.backdrop == 'static'
|
204
|
+
? this.$element[0].focus()
|
205
|
+
: this.hide()
|
206
|
+
}, this))
|
176
207
|
|
177
208
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
178
209
|
|
@@ -204,21 +235,64 @@
|
|
204
235
|
}
|
205
236
|
}
|
206
237
|
|
238
|
+
// these following methods are used to handle overflowing modals
|
239
|
+
|
240
|
+
Modal.prototype.handleUpdate = function () {
|
241
|
+
this.adjustDialog()
|
242
|
+
}
|
243
|
+
|
244
|
+
Modal.prototype.adjustDialog = function () {
|
245
|
+
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
246
|
+
|
247
|
+
this.$element.css({
|
248
|
+
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
|
249
|
+
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
|
250
|
+
})
|
251
|
+
}
|
252
|
+
|
253
|
+
Modal.prototype.resetAdjustments = function () {
|
254
|
+
this.$element.css({
|
255
|
+
paddingLeft: '',
|
256
|
+
paddingRight: ''
|
257
|
+
})
|
258
|
+
}
|
259
|
+
|
207
260
|
Modal.prototype.checkScrollbar = function () {
|
261
|
+
var fullWindowWidth = window.innerWidth
|
262
|
+
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
|
263
|
+
var documentElementRect = document.documentElement.getBoundingClientRect()
|
264
|
+
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
|
265
|
+
}
|
266
|
+
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
|
208
267
|
this.scrollbarWidth = this.measureScrollbar()
|
209
268
|
}
|
210
269
|
|
211
270
|
Modal.prototype.setScrollbar = function () {
|
212
271
|
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
|
213
|
-
|
272
|
+
this.originalBodyPad = document.body.style.paddingRight || ''
|
273
|
+
var scrollbarWidth = this.scrollbarWidth
|
274
|
+
if (this.bodyIsOverflowing) {
|
275
|
+
this.$body.css('padding-right', bodyPad + scrollbarWidth)
|
276
|
+
$(this.fixedContent).each(function (index, element) {
|
277
|
+
var actualPadding = element.style.paddingRight
|
278
|
+
var calculatedPadding = $(element).css('padding-right')
|
279
|
+
$(element)
|
280
|
+
.data('padding-right', actualPadding)
|
281
|
+
.css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
|
282
|
+
})
|
283
|
+
}
|
214
284
|
}
|
215
285
|
|
216
286
|
Modal.prototype.resetScrollbar = function () {
|
217
|
-
this.$body.css('padding-right',
|
287
|
+
this.$body.css('padding-right', this.originalBodyPad)
|
288
|
+
$(this.fixedContent).each(function (index, element) {
|
289
|
+
var padding = $(element).data('padding-right')
|
290
|
+
$(element).removeData('padding-right')
|
291
|
+
element.style.paddingRight = padding ? padding : ''
|
292
|
+
})
|
218
293
|
}
|
219
294
|
|
220
295
|
Modal.prototype.measureScrollbar = function () { // thx walsh
|
221
|
-
if (document.body.clientWidth >= window.innerWidth) return 0
|
222
296
|
var scrollDiv = document.createElement('div')
|
223
297
|
scrollDiv.className = 'modal-scrollbar-measure'
|
224
298
|
this.$body.append(scrollDiv)
|
@@ -233,8 +307,8 @@
|
|
233
307
|
|
234
308
|
function Plugin(option, _relatedTarget) {
|
235
309
|
return this.each(function () {
|
236
|
-
var $this
|
237
|
-
var data
|
310
|
+
var $this = $(this)
|
311
|
+
var data = $this.data('bs.modal')
|
238
312
|
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
239
313
|
|
240
314
|
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
|
@@ -245,7 +319,7 @@
|
|
245
319
|
|
246
320
|
var old = $.fn.modal
|
247
321
|
|
248
|
-
$.fn.modal
|
322
|
+
$.fn.modal = Plugin
|
249
323
|
$.fn.modal.Constructor = Modal
|
250
324
|
|
251
325
|
|
@@ -262,10 +336,13 @@
|
|
262
336
|
// ==============
|
263
337
|
|
264
338
|
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
|
265
|
-
var $this
|
266
|
-
var href
|
267
|
-
var
|
268
|
-
|
339
|
+
var $this = $(this)
|
340
|
+
var href = $this.attr('href')
|
341
|
+
var target = $this.attr('data-target') ||
|
342
|
+
(href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
343
|
+
|
344
|
+
var $target = $(document).find(target)
|
345
|
+
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
269
346
|
|
270
347
|
if ($this.is('a')) e.preventDefault()
|
271
348
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.
|
3
|
-
*
|
2
|
+
* Bootstrap: popover.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#popovers
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
21
21
|
|
22
|
-
Popover.VERSION = '3.
|
22
|
+
Popover.VERSION = '3.4.1'
|
23
23
|
|
24
24
|
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
25
25
|
placement: 'right',
|
@@ -45,10 +45,25 @@
|
|
45
45
|
var title = this.getTitle()
|
46
46
|
var content = this.getContent()
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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
|
+
}
|
52
67
|
|
53
68
|
$tip.removeClass('fade top bottom left right in')
|
54
69
|
|
@@ -67,37 +82,26 @@
|
|
67
82
|
|
68
83
|
return $e.attr('data-content')
|
69
84
|
|| (typeof o.content == 'function' ?
|
70
|
-
|
71
|
-
|
85
|
+
o.content.call($e[0]) :
|
86
|
+
o.content)
|
72
87
|
}
|
73
88
|
|
74
89
|
Popover.prototype.arrow = function () {
|
75
90
|
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
76
91
|
}
|
77
92
|
|
78
|
-
Popover.prototype.tip = function () {
|
79
|
-
if (!this.$tip) this.$tip = $(this.options.template)
|
80
|
-
return this.$tip
|
81
|
-
}
|
82
|
-
|
83
93
|
|
84
94
|
// POPOVER PLUGIN DEFINITION
|
85
95
|
// =========================
|
86
96
|
|
87
97
|
function Plugin(option) {
|
88
98
|
return this.each(function () {
|
89
|
-
var $this
|
90
|
-
var data
|
91
|
-
var options
|
92
|
-
|
93
|
-
|
94
|
-
if (!data
|
95
|
-
if (selector) {
|
96
|
-
if (!data) $this.data('bs.popover', (data = {}))
|
97
|
-
if (!data[selector]) data[selector] = new Popover(this, options)
|
98
|
-
} else {
|
99
|
-
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
100
|
-
}
|
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)))
|
101
105
|
if (typeof option == 'string') data[option]()
|
102
106
|
})
|
103
107
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.
|
3
|
-
*
|
2
|
+
* Bootstrap: scrollspy.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#scrollspy
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,10 +14,8 @@
|
|
14
14
|
// ==========================
|
15
15
|
|
16
16
|
function ScrollSpy(element, options) {
|
17
|
-
|
18
|
-
|
19
|
-
this.$body = $('body')
|
20
|
-
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
17
|
+
this.$body = $(document.body)
|
18
|
+
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
21
19
|
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
22
20
|
this.selector = (this.options.target || '') + ' .nav li > a'
|
23
21
|
this.offsets = []
|
@@ -25,12 +23,12 @@
|
|
25
23
|
this.activeTarget = null
|
26
24
|
this.scrollHeight = 0
|
27
25
|
|
28
|
-
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
26
|
+
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
29
27
|
this.refresh()
|
30
28
|
this.process()
|
31
29
|
}
|
32
30
|
|
33
|
-
ScrollSpy.VERSION = '3.
|
31
|
+
ScrollSpy.VERSION = '3.4.1'
|
34
32
|
|
35
33
|
ScrollSpy.DEFAULTS = {
|
36
34
|
offset: 10
|
@@ -41,20 +39,19 @@
|
|
41
39
|
}
|
42
40
|
|
43
41
|
ScrollSpy.prototype.refresh = function () {
|
44
|
-
var
|
45
|
-
var
|
42
|
+
var that = this
|
43
|
+
var offsetMethod = 'offset'
|
44
|
+
var offsetBase = 0
|
45
|
+
|
46
|
+
this.offsets = []
|
47
|
+
this.targets = []
|
48
|
+
this.scrollHeight = this.getScrollHeight()
|
46
49
|
|
47
50
|
if (!$.isWindow(this.$scrollElement[0])) {
|
48
51
|
offsetMethod = 'position'
|
49
52
|
offsetBase = this.$scrollElement.scrollTop()
|
50
53
|
}
|
51
54
|
|
52
|
-
this.offsets = []
|
53
|
-
this.targets = []
|
54
|
-
this.scrollHeight = this.getScrollHeight()
|
55
|
-
|
56
|
-
var self = this
|
57
|
-
|
58
55
|
this.$body
|
59
56
|
.find(this.selector)
|
60
57
|
.map(function () {
|
@@ -69,8 +66,8 @@
|
|
69
66
|
})
|
70
67
|
.sort(function (a, b) { return a[0] - b[0] })
|
71
68
|
.each(function () {
|
72
|
-
|
73
|
-
|
69
|
+
that.offsets.push(this[0])
|
70
|
+
that.targets.push(this[1])
|
74
71
|
})
|
75
72
|
}
|
76
73
|
|
@@ -99,7 +96,7 @@
|
|
99
96
|
for (i = offsets.length; i--;) {
|
100
97
|
activeTarget != targets[i]
|
101
98
|
&& scrollTop >= offsets[i]
|
102
|
-
&& (
|
99
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
103
100
|
&& this.activate(targets[i])
|
104
101
|
}
|
105
102
|
}
|
@@ -110,8 +107,8 @@
|
|
110
107
|
this.clear()
|
111
108
|
|
112
109
|
var selector = this.selector +
|
113
|
-
|
114
|
-
|
110
|
+
'[data-target="' + target + '"],' +
|
111
|
+
this.selector + '[href="' + target + '"]'
|
115
112
|
|
116
113
|
var active = $(selector)
|
117
114
|
.parents('li')
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: tab.js v3.
|
3
|
-
*
|
2
|
+
* Bootstrap: tab.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#tabs
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,10 +14,12 @@
|
|
14
14
|
// ====================
|
15
15
|
|
16
16
|
var Tab = function (element) {
|
17
|
+
// jscs:disable requireDollarBeforejQueryAssignment
|
17
18
|
this.element = $(element)
|
19
|
+
// jscs:enable requireDollarBeforejQueryAssignment
|
18
20
|
}
|
19
21
|
|
20
|
-
Tab.VERSION = '3.
|
22
|
+
Tab.VERSION = '3.4.1'
|
21
23
|
|
22
24
|
Tab.TRANSITION_DURATION = 150
|
23
25
|
|
@@ -46,7 +48,7 @@
|
|
46
48
|
|
47
49
|
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
|
48
50
|
|
49
|
-
var $target = $(selector)
|
51
|
+
var $target = $(document).find(selector)
|
50
52
|
|
51
53
|
this.activate($this.closest('li'), $ul)
|
52
54
|
this.activate($target, $target.parent(), function () {
|
@@ -65,21 +67,21 @@
|
|
65
67
|
var $active = container.find('> .active')
|
66
68
|
var transition = callback
|
67
69
|
&& $.support.transition
|
68
|
-
&& (
|
70
|
+
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
69
71
|
|
70
72
|
function next() {
|
71
73
|
$active
|
72
74
|
.removeClass('active')
|
73
75
|
.find('> .dropdown-menu > .active')
|
74
|
-
|
76
|
+
.removeClass('active')
|
75
77
|
.end()
|
76
78
|
.find('[data-toggle="tab"]')
|
77
|
-
|
79
|
+
.attr('aria-expanded', false)
|
78
80
|
|
79
81
|
element
|
80
82
|
.addClass('active')
|
81
83
|
.find('[data-toggle="tab"]')
|
82
|
-
|
84
|
+
.attr('aria-expanded', true)
|
83
85
|
|
84
86
|
if (transition) {
|
85
87
|
element[0].offsetWidth // reflow for transition
|
@@ -88,13 +90,13 @@
|
|
88
90
|
element.removeClass('fade')
|
89
91
|
}
|
90
92
|
|
91
|
-
if (element.parent('.dropdown-menu')) {
|
93
|
+
if (element.parent('.dropdown-menu').length) {
|
92
94
|
element
|
93
95
|
.closest('li.dropdown')
|
94
|
-
|
96
|
+
.addClass('active')
|
95
97
|
.end()
|
96
98
|
.find('[data-toggle="tab"]')
|
97
|
-
|
99
|
+
.attr('aria-expanded', true)
|
98
100
|
}
|
99
101
|
|
100
102
|
callback && callback()
|