Commit 15e2c198 authored by Sindre Sorhus's avatar Sindre Sorhus

Upgrade to Bootstrap 2.0.2

parent d9248d0a
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* ===================================================
* bootstrap-transition.js v2.0.1
* bootstrap-transition.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
......@@ -49,7 +49,7 @@
})
}( window.jQuery );/* ==========================================================
* bootstrap-alert.js v2.0.1
* bootstrap-alert.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
......@@ -142,7 +142,7 @@
})
}( window.jQuery );/* ============================================================
* bootstrap-button.js v2.0.1
* bootstrap-button.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
......@@ -234,12 +234,14 @@
$(function () {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
$(e.currentTarget).button('toggle')
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
})
}( window.jQuery );/* ==========================================================
* bootstrap-carousel.js v2.0.1
* bootstrap-carousel.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
......@@ -269,6 +271,9 @@
this.$element = $(element)
this.options = $.extend({}, $.fn.carousel.defaults, options)
this.options.slide && this.slide(this.options.slide)
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
......@@ -323,14 +328,14 @@
, fallback = type == 'next' ? 'first' : 'last'
, that = this
if (!$next.length) return
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
if ($next.hasClass('active')) return
if (!$.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger('slide')
$active.removeClass('active')
......@@ -376,6 +381,7 @@
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
......@@ -395,7 +401,7 @@
})
}( window.jQuery );/* =============================================================
* bootstrap-collapse.js v2.0.1
* bootstrap-collapse.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
......@@ -470,7 +476,9 @@
[dimension](size || 'auto')
[0].offsetWidth
this.$element.addClass('collapse')
this.$element[size ? 'addClass' : 'removeClass']('collapse')
return this
}
, transition: function ( method, startEvent, completeEvent ) {
......@@ -530,7 +538,7 @@
})
}( window.jQuery );/* ============================================================
* bootstrap-dropdown.js v2.0.1
* bootstrap-dropdown.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
......@@ -621,7 +629,7 @@
})
}( window.jQuery );/* =========================================================
* bootstrap-modal.js v2.0.1
* bootstrap-modal.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
......@@ -767,7 +775,7 @@
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
this.$backdrop.stop(true,true).one($.support.transition.end, $.proxy(removeBackdrop, this)) :
removeBackdrop.call(this)
} else if (callback) {
......@@ -830,7 +838,7 @@
})
}( window.jQuery );/* ===========================================================
* bootstrap-tooltip.js v2.0.1
* bootstrap-tooltip.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
......@@ -1037,7 +1045,7 @@
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
title = title.toString().replace(/(^\s*|\s*$)/, "")
title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
return title
}
......@@ -1099,7 +1107,7 @@
}
}( window.jQuery );/* ===========================================================
* bootstrap-popover.js v2.0.1
* bootstrap-popover.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
......@@ -1193,7 +1201,7 @@
})
}( window.jQuery );/* =============================================================
* bootstrap-scrollspy.js v2.0.1
* bootstrap-scrollspy.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
......@@ -1317,7 +1325,7 @@
})
}( window.jQuery );/* ========================================================
* bootstrap-tab.js v2.0.1
* bootstrap-tab.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
......@@ -1446,7 +1454,7 @@
})
}( window.jQuery );/* =============================================================
* bootstrap-typeahead.js v2.0.1
* bootstrap-typeahead.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
......@@ -1487,6 +1495,7 @@
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element.val(val)
this.$element.change();
return this.hide()
}
......@@ -1612,9 +1621,6 @@
}
, keyup: function (e) {
e.stopPropagation()
e.preventDefault()
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
......@@ -1627,6 +1633,7 @@
break
case 27: // escape
if (!this.shown) return
this.hide()
break
......@@ -1634,10 +1641,11 @@
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, keypress: function (e) {
e.stopPropagation()
if (!this.shown) return
switch(e.keyCode) {
......@@ -1657,12 +1665,12 @@
this.next()
break
}
e.stopPropagation()
}
, blur: function (e) {
var that = this
e.stopPropagation()
e.preventDefault()
setTimeout(function () { that.hide() }, 150)
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment