Skip to content
This repository has been archived by the owner on Feb 11, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:Mon7/mon7-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Jan 17, 2012
2 parents cacea31 + 489eaee commit 227c872
Show file tree
Hide file tree
Showing 9 changed files with 387 additions and 165 deletions.
354 changes: 229 additions & 125 deletions vendor/assets/twitter-bootstrap/bootstrap.css

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions vendor/assets/twitter-bootstrap/js/bootstrap-alerts.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function( $ ){

"use strict"

/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */

Expand All @@ -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"
}
}

Expand Down
62 changes: 62 additions & 0 deletions vendor/assets/twitter-bootstrap/js/bootstrap-buttons.js
@@ -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 );
4 changes: 3 additions & 1 deletion vendor/assets/twitter-bootstrap/js/bootstrap-dropdown.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function( $ ){

"use strict"

/* DROPDOWN PLUGIN DEFINITION
* ========================== */

Expand Down
56 changes: 36 additions & 20 deletions vendor/assets/twitter-bootstrap/js/bootstrap-modal.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function( $ ){

"use strict"

/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */

Expand Down Expand Up @@ -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') }) :
Expand All @@ -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
}
Expand All @@ -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' : ''
Expand All @@ -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 ) {
Expand Down
25 changes: 19 additions & 6 deletions vendor/assets/twitter-bootstrap/js/bootstrap-popover.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function( $ ) {

"use strict"

var Popover = function ( element, options ) {
this.$element = $(element)
this.options = options
Expand All @@ -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
}
Expand All @@ -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 );
4 changes: 3 additions & 1 deletion vendor/assets/twitter-bootstrap/js/bootstrap-scrollspy.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function ( $ ) {

"use strict"

var $window = $(window)

function ScrollSpy( topbar, selector ) {
Expand Down
5 changes: 4 additions & 1 deletion vendor/assets/twitter-bootstrap/js/bootstrap-tabs.js
@@ -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.
Expand All @@ -20,6 +20,8 @@

!function( $ ){

"use strict"

function activate ( element, container ) {
container
.find('> .active')
Expand All @@ -39,6 +41,7 @@
, $ul = $this.closest('ul:not(.dropdown-menu)')
, href = $this.attr('href')
, previous
, $href

if ( /^#\w+/.test(href) ) {
e.preventDefault()
Expand Down

0 comments on commit 227c872

Please sign in to comment.