Skip to content

Commit

Permalink
Updated JS files to be compatible with Bootstrap 2.1
Browse files Browse the repository at this point in the history
Signed-off-by: Rachel Baker <rachel@rachelbaker.me>
  • Loading branch information
rachelbaker committed Sep 10, 2012
1 parent 6d91aab commit a561279
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 175 deletions.
49 changes: 26 additions & 23 deletions js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ===================================================
* bootstrap-transition.js v2.0.4
* bootstrap-transition.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -58,7 +58,7 @@
})

}(window.jQuery);/* ==========================================================
* bootstrap-alert.js v2.0.4
* bootstrap-alert.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -147,7 +147,7 @@
})

}(window.jQuery);/* ============================================================
* bootstrap-button.js v2.0.4
* bootstrap-button.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -199,7 +199,7 @@
}

Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')

$parent && $parent
.find('.active')
Expand Down Expand Up @@ -242,7 +242,7 @@
})

}(window.jQuery);/* ==========================================================
* bootstrap-carousel.js v2.0.4
* bootstrap-carousel.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -417,7 +417,7 @@
})

}(window.jQuery);/* =============================================================
* bootstrap-collapse.js v2.0.4
* bootstrap-collapse.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -574,7 +574,7 @@
})

}(window.jQuery);/* ============================================================
* bootstrap-dropdown.js v2.0.4
* bootstrap-dropdown.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -685,7 +685,7 @@

if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}

$parent = $(selector)
Expand Down Expand Up @@ -715,15 +715,15 @@

$(function () {
$('html')
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
$('body')
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
})

}(window.jQuery);/* =========================================================
* bootstrap-modal.js v2.0.4
* bootstrap-modal.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -953,15 +953,15 @@
e.preventDefault()

$target
.modal(option)
.modal(option)
.one('hide', function () {
$this.focus()
})
})
})

}(window.jQuery);/* ===========================================================
* bootstrap-tooltip.js v2.0.4
* bootstrap-tooltip.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
Expand Down Expand Up @@ -1006,8 +1006,10 @@
this.options = this.getOptions(options)
this.enabled = true

if (this.options.trigger != 'manual') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
if (this.options.trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (this.options.trigger != 'manual') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
Expand Down Expand Up @@ -1234,7 +1236,7 @@

}(window.jQuery);
/* ===========================================================
* bootstrap-popover.js v2.0.4
* bootstrap-popover.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1330,12 +1332,13 @@

$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
})

}(window.jQuery);/* =============================================================
* bootstrap-scrollspy.js v2.0.4
* bootstrap-scrollspy.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1485,7 +1488,7 @@
})

}(window.jQuery);/* ========================================================
* bootstrap-tab.js v2.0.4
* bootstrap-tab.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1619,7 +1622,7 @@
})

}(window.jQuery);/* =============================================================
* bootstrap-typeahead.js v2.0.4
* bootstrap-typeahead.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1794,7 +1797,7 @@
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))

if ($.browser.webkit || $.browser.msie) {
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}

Expand Down Expand Up @@ -1919,7 +1922,7 @@

}(window.jQuery);
/* ==========================================================
* bootstrap-affix.js v2.1.0
* bootstrap-affix.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down
Loading

0 comments on commit a561279

Please sign in to comment.