Skip to content

Commit c93c371

Browse files
committed
Merge branch 'master' of github.com:twbs/bootstrap
2 parents b004c9a + 96525fd commit c93c371

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ module.exports = function (grunt) {
390390
build: process.env.TRAVIS_JOB_ID,
391391
concurrency: 10,
392392
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
393-
browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
393+
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
394394
}
395395
}
396396
},

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"composer.json",
2727
"CONTRIBUTING.md",
2828
"docs",
29-
"js/tests"
29+
"js/tests",
30+
"test-infra"
3031
],
3132
"dependencies": {
3233
"jquery": ">= 1.9.0"

dist/js/bootstrap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
817817
}
818818

819819
Modal.prototype.toggle = function (_relatedTarget) {
820-
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
820+
return this.isShown ? this.hide() : this.show(_relatedTarget)
821821
}
822822

823823
Modal.prototype.show = function (_relatedTarget) {
@@ -1208,7 +1208,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
12081208
var $parent = this.$element.parent()
12091209

12101210
var orgPlacement = placement
1211-
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
1211+
var docScroll = document.documentElement.scrollTop
12121212
var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
12131213
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
12141214
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
@@ -1578,7 +1578,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
15781578

15791579
this.$element = $(element).is('body') ? $(window) : $(element)
15801580
this.$body = $('body')
1581-
this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
1581+
this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process)
15821582
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
15831583
this.selector = (this.options.target
15841584
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
@@ -1702,7 +1702,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
17021702
// SCROLLSPY DATA-API
17031703
// ==================
17041704

1705-
$(window).on('load', function () {
1705+
$(window).on('load.bs.scrollspy.data-api', function () {
17061706
$('[data-spy="scroll"]').each(function () {
17071707
var $spy = $(this)
17081708
$spy.scrollspy($spy.data())
File renamed without changes.

js/affix.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
var offsetTop = offset.top
5656
var offsetBottom = offset.bottom
5757

58-
if (this.affixed == 'top') position.top += scrollTop
59-
6058
if (typeof offset != 'object') offsetBottom = offsetTop = offset
6159
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
6260
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
@@ -84,7 +82,7 @@
8482
.trigger($.Event(affixType.replace('affix', 'affixed')))
8583

8684
if (affix == 'bottom') {
87-
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
85+
this.$element.offset({ top: position.top })
8886
}
8987
}
9088

js/modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737

3838
Modal.prototype.toggle = function (_relatedTarget) {
39-
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
39+
return this.isShown ? this.hide() : this.show(_relatedTarget)
4040
}
4141

4242
Modal.prototype.show = function (_relatedTarget) {

js/scrollspy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
this.$element = $(element).is('body') ? $(window) : $(element)
2121
this.$body = $('body')
22-
this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
22+
this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process)
2323
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
2424
this.selector = (this.options.target
2525
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
@@ -143,7 +143,7 @@
143143
// SCROLLSPY DATA-API
144144
// ==================
145145

146-
$(window).on('load', function () {
146+
$(window).on('load.bs.scrollspy.data-api', function () {
147147
$('[data-spy="scroll"]').each(function () {
148148
var $spy = $(this)
149149
$spy.scrollspy($spy.data())

js/tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
var $parent = this.$element.parent()
161161

162162
var orgPlacement = placement
163-
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
163+
var docScroll = document.documentElement.scrollTop
164164
var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
165165
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
166166
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left

0 commit comments

Comments
 (0)