Permalink
Browse files

Merge branch 'master' of github.com:Mon7/mon7-bootstrap

  • Loading branch information...
2 parents cacea31 + 489eaee commit 227c872bb1b656b4c2a1ba3f56a045a0d2ce9d17 @carlhoerberg carlhoerberg committed Jan 17, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alerts.js v1.3.0
+ * bootstrap-alerts.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ){
+ "use strict"
+
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
@@ -38,11 +40,11 @@
if ( $.support.transition ) {
transitionEnd = "TransitionEnd"
if ( $.browser.webkit ) {
- transitionEnd = "webkitTransitionEnd"
+ transitionEnd = "webkitTransitionEnd"
} else if ( $.browser.mozilla ) {
- transitionEnd = "transitionend"
+ transitionEnd = "transitionend"
} else if ( $.browser.opera ) {
- transitionEnd = "oTransitionEnd"
+ transitionEnd = "oTransitionEnd"
}
}
@@ -0,0 +1,62 @@
+/* ============================================================
+ * bootstrap-buttons.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+!function( $ ){
+
+ "use strict"
+
+ function setState(el, state) {
+ var d = 'disabled'
+ , $el = $(el)
+ , data = $el.data()
+
+ state = state + 'Text'
+ data.resetText || $el.data('resetText', $el.html())
+
+ $el.html( data[state] || $.fn.button.defaults[state] )
+
+ state == 'loadingText' ?
+ $el.addClass(d).attr(d, d) :
+ $el.removeClass(d).removeAttr(d)
+ }
+
+ function toggle(el) {
+ $(el).toggleClass('active')
+ }
+
+ $.fn.button = function(options) {
+ return this.each(function () {
+ if (options == 'toggle') {
+ return toggle(this)
+ }
+ options && setState(this, options)
+ })
+ }
+
+ $.fn.button.defaults = {
+ loadingText: 'loading...'
+ }
+
+ $(function () {
+ $('body').delegate('.btn[data-toggle]', 'click', function () {
+ $(this).button('toggle')
+ })
+ })
+
+}( window.jQuery || window.ender );
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-dropdown.js v1.3.0
+ * bootstrap-dropdown.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#dropdown
* ============================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ){
+ "use strict"
+
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
@@ -1,5 +1,5 @@
/* =========================================================
- * bootstrap-modal.js v1.3.0
+ * bootstrap-modal.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#modal
* =========================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ){
+ "use strict"
+
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
@@ -87,8 +89,7 @@
that.$element[0].offsetWidth // force reflow
}
- that.$element
- .addClass('in')
+ that.$element.addClass('in')
transition ?
that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
@@ -115,17 +116,9 @@
.trigger('hide')
.removeClass('in')
- function removeElement () {
- that.$element
- .hide()
- .trigger('hidden')
-
- backdrop.call(that)
- }
-
$.support.transition && this.$element.hasClass('fade') ?
- this.$element.one(transitionEnd, removeElement) :
- removeElement()
+ hideWithTransition.call(this) :
+ hideModal.call(this)
return this
}
@@ -136,6 +129,28 @@
/* MODAL PRIVATE METHODS
* ===================== */
+ function hideWithTransition() {
+ // firefox drops transitionEnd events :{o
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.unbind(transitionEnd)
+ hideModal.call(that)
+ }, 500)
+
+ this.$element.one(transitionEnd, function () {
+ clearTimeout(timeout)
+ hideModal.call(that)
+ })
+ }
+
+ function hideModal (that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(this)
+ }
+
function backdrop ( callback ) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
@@ -162,19 +177,20 @@
} else if ( !this.isShown && this.$backdrop ) {
this.$backdrop.removeClass('in')
- function removeElement() {
- that.$backdrop.remove()
- that.$backdrop = null
- }
-
$.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one(transitionEnd, removeElement) :
- removeElement()
+ this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
+ removeBackdrop.call(this)
+
} else if ( callback ) {
callback()
}
}
+ function removeBackdrop() {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
function escape() {
var that = this
if ( this.isShown && this.settings.keyboard ) {
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-popover.js v1.3.0
+ * bootstrap-popover.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#popover
* ===========================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ) {
+ "use strict"
+
var Popover = function ( element, options ) {
this.$element = $(element)
this.options = options
@@ -35,27 +37,32 @@
setContent: function () {
var $tip = this.tip()
$tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
- $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
+ $tip.find('.content > *')[this.options.html ? 'html' : 'text'](this.getContent())
$tip[0].className = 'popover'
}
+ , hasContent: function () {
+ return this.getTitle() || this.getContent()
+ }
+
, getContent: function () {
var content
, $e = this.$element
, o = this.options
if (typeof this.options.content == 'string') {
- content = $e.attr(o.content)
+ content = $e.attr(this.options.content)
} else if (typeof this.options.content == 'function') {
content = this.options.content.call(this.$element[0])
}
+
return content
}
, tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="popover" />')
- .html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
+ .html(this.options.template)
}
return this.$tip
}
@@ -72,6 +79,12 @@
return this
}
- $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
+ placement: 'right'
+ , content: 'data-content'
+ , template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
+ })
+
+ $.fn.twipsy.rejectAttrOptions.push( 'content' )
-}( window.jQuery || window.ender );
+}( window.jQuery || window.ender );
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-scrollspy.js v1.3.0
+ * bootstrap-scrollspy.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function ( $ ) {
+ "use strict"
+
var $window = $(window)
function ScrollSpy( topbar, selector ) {
@@ -1,5 +1,5 @@
/* ========================================================
- * bootstrap-tabs.js v1.3.0
+ * bootstrap-tabs.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ){
+ "use strict"
+
function activate ( element, container ) {
container
.find('> .active')
@@ -39,6 +41,7 @@
, $ul = $this.closest('ul:not(.dropdown-menu)')
, href = $this.attr('href')
, previous
+ , $href
if ( /^#\w+/.test(href) ) {
e.preventDefault()
Oops, something went wrong.

0 comments on commit 227c872

Please sign in to comment.