1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-04 04:07:59 +02:00

Update Twitter Bootstrap to Version 2.2.1 #59

This commit is contained in:
Awilum
2012-11-02 11:08:00 +02:00
parent 80950151d3
commit 866a329d2c
3 changed files with 518 additions and 371 deletions

View File

@@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Responsive v2.1.1 * Bootstrap Responsive v2.2.1
* *
* Copyright 2012 Twitter, Inc * Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0 * Licensed under the Apache License v2.0
@@ -215,6 +215,9 @@
.row-fluid [class*="span"]:first-child { .row-fluid [class*="span"]:first-child {
margin-left: 0; margin-left: 0;
} }
.row-fluid .controls-row [class*="span"] + [class*="span"] {
margin-left: 2.564102564102564%;
}
.row-fluid .span12 { .row-fluid .span12 {
width: 100%; width: 100%;
*width: 99.94680851063829%; *width: 99.94680851063829%;
@@ -562,6 +565,9 @@
.row-fluid [class*="span"]:first-child { .row-fluid [class*="span"]:first-child {
margin-left: 0; margin-left: 0;
} }
.row-fluid .controls-row [class*="span"] + [class*="span"] {
margin-left: 2.7624309392265194%;
}
.row-fluid .span12 { .row-fluid .span12 {
width: 100%; width: 100%;
*width: 99.94680851063829%; *width: 99.94680851063829%;
@@ -814,6 +820,7 @@
margin-left: 0; margin-left: 0;
} }
[class*="span"], [class*="span"],
.uneditable-input[class*="span"],
.row-fluid [class*="span"] { .row-fluid [class*="span"] {
display: block; display: block;
float: none; float: none;
@@ -830,6 +837,9 @@
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.row-fluid [class*="offset"]:first-child {
margin-left: 0;
}
.input-large, .input-large,
.input-xlarge, .input-xlarge,
.input-xxlarge, .input-xxlarge,
@@ -862,8 +872,11 @@
width: auto; width: auto;
margin: 0; margin: 0;
} }
.modal.fade {
top: -100px;
}
.modal.fade.in { .modal.fade.in {
top: auto; top: 20px;
} }
} }
@@ -895,6 +908,16 @@
padding-right: 10px; padding-right: 10px;
padding-left: 10px; padding-left: 10px;
} }
.media .pull-left,
.media .pull-right {
display: block;
float: none;
margin-bottom: 10px;
}
.media-object {
margin-right: 0;
margin-left: 0;
}
.modal { .modal {
top: 10px; top: 10px;
right: 10px; right: 10px;
@@ -979,6 +1002,10 @@
.nav-collapse .dropdown-menu a:hover { .nav-collapse .dropdown-menu a:hover {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.navbar-inverse .nav-collapse .nav > li > a,
.navbar-inverse .nav-collapse .dropdown-menu a {
color: #999999;
}
.navbar-inverse .nav-collapse .nav > li > a:hover, .navbar-inverse .nav-collapse .nav > li > a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:hover { .navbar-inverse .nav-collapse .dropdown-menu a:hover {
background-color: #111111; background-color: #111111;
@@ -991,7 +1018,7 @@
position: static; position: static;
top: auto; top: auto;
left: auto; left: auto;
display: block; display: none;
float: none; float: none;
max-width: none; max-width: none;
padding: 0; padding: 0;
@@ -1005,6 +1032,9 @@
-moz-box-shadow: none; -moz-box-shadow: none;
box-shadow: none; box-shadow: none;
} }
.nav-collapse .open > .dropdown-menu {
display: block;
}
.nav-collapse .dropdown-menu:before, .nav-collapse .dropdown-menu:before,
.nav-collapse .dropdown-menu:after { .nav-collapse .dropdown-menu:after {
display: none; display: none;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* =================================================== /* ===================================================
* bootstrap-transition.js v2.1.1 * bootstrap-transition.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#transitions * http://twitter.github.com/bootstrap/javascript.html#transitions
* =================================================== * ===================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -20,14 +20,14 @@
!function ($) { !function ($) {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$(function () { $(function () {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$.support.transition = (function () { $.support.transition = (function () {
var transitionEnd = (function () { var transitionEnd = (function () {
@@ -58,7 +58,7 @@
}) })
}(window.jQuery);/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-alert.js v2.1.1 * bootstrap-alert.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#alerts * http://twitter.github.com/bootstrap/javascript.html#alerts
* ========================================================== * ==========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -142,12 +142,10 @@
/* ALERT DATA-API /* ALERT DATA-API
* ============== */ * ============== */
$(function () { $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
})
}(window.jQuery);/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-button.js v2.1.1 * bootstrap-button.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#buttons * http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================ * ============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -233,16 +231,14 @@
/* BUTTON DATA-API /* BUTTON DATA-API
* =============== */ * =============== */
$(function () { $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { var $btn = $(e.target)
var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') $btn.button('toggle')
$btn.button('toggle')
})
}) })
}(window.jQuery);/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-carousel.js v2.1.1 * bootstrap-carousel.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#carousel * http://twitter.github.com/bootstrap/javascript.html#carousel
* ========================================================== * ==========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -337,9 +333,7 @@
, direction = type == 'next' ? 'left' : 'right' , direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last' , fallback = type == 'next' ? 'first' : 'last'
, that = this , that = this
, e = $.Event('slide', { , e
relatedTarget: $next[0]
})
this.sliding = true this.sliding = true
@@ -347,6 +341,10 @@
$next = $next.length ? $next : this.$element.find('.item')[fallback]() $next = $next.length ? $next : this.$element.find('.item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
})
if ($next.hasClass('active')) return if ($next.hasClass('active')) return
if ($.support.transition && this.$element.hasClass('slide')) { if ($.support.transition && this.$element.hasClass('slide')) {
@@ -406,18 +404,16 @@
/* CAROUSEL DATA-API /* CAROUSEL DATA-API
* ================= */ * ================= */
$(function () { $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { var $this = $(this), href
var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 , options = $.extend({}, $target.data(), $this.data())
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) $target.carousel(options)
$target.carousel(options) e.preventDefault()
e.preventDefault()
})
}) })
}(window.jQuery);/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-collapse.js v2.1.1 * bootstrap-collapse.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#collapse * http://twitter.github.com/bootstrap/javascript.html#collapse
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -561,20 +557,18 @@
/* COLLAPSIBLE DATA-API /* COLLAPSIBLE DATA-API
* ==================== */ * ==================== */
$(function () { $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { var $this = $(this), href
var $this = $(this), href , target = $this.attr('data-target')
, target = $this.attr('data-target') || e.preventDefault()
|| e.preventDefault() || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 , option = $(target).data('collapse') ? 'toggle' : $this.data()
, option = $(target).data('collapse') ? 'toggle' : $this.data() $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') $(target).collapse(option)
$(target).collapse(option)
})
}) })
}(window.jQuery);/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-dropdown.js v2.1.1 * bootstrap-dropdown.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#dropdowns * http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================ * ============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -675,8 +669,9 @@
} }
function clearMenus() { function clearMenus() {
getParent($(toggle)) $(toggle).each(function () {
.removeClass('open') getParent($(this)).removeClass('open')
})
} }
function getParent($this) { function getParent($this) {
@@ -713,17 +708,14 @@
/* APPLY TO STANDARD DROPDOWN ELEMENTS /* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */ * =================================== */
$(function () { $(document)
$('html') .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
$('body') .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
.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);/* ========================================================= }(window.jQuery);/* =========================================================
* bootstrap-modal.js v2.1.1 * bootstrap-modal.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#modals * http://twitter.github.com/bootstrap/javascript.html#modals
* ========================================================= * =========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -773,8 +765,6 @@
if (this.isShown || e.isDefaultPrevented()) return if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open')
this.isShown = true this.isShown = true
this.escape() this.escape()
@@ -796,13 +786,12 @@
that.$element that.$element
.addClass('in') .addClass('in')
.attr('aria-hidden', false) .attr('aria-hidden', false)
.focus()
that.enforceFocus() that.enforceFocus()
transition ? transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.trigger('shown') that.$element.focus().trigger('shown')
}) })
} }
@@ -820,8 +809,6 @@
this.isShown = false this.isShown = false
$('body').removeClass('modal-open')
this.escape() this.escape()
$(document).off('focusin.modal') $(document).off('focusin.modal')
@@ -891,9 +878,11 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body) .appendTo(document.body)
if (this.options.backdrop != 'static') { this.$backdrop.click(
this.$backdrop.click($.proxy(this.hide, this)) this.options.backdrop == 'static' ?
} $.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
@@ -943,25 +932,24 @@
/* MODAL DATA-API /* MODAL DATA-API
* ============== */ * ============== */
$(function () { $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { var $this = $(this)
var $this = $(this) , href = $this.attr('href')
, href = $this.attr('href') , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
, option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault() e.preventDefault()
$target $target
.modal(option) .modal(option)
.one('hide', function () { .one('hide', function () {
$this.focus() $this.focus()
}) })
})
}) })
}(window.jQuery);/* =========================================================== }(window.jQuery);
* bootstrap-tooltip.js v2.1.1 /* ===========================================================
* bootstrap-tooltip.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#tooltips * http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
* =========================================================== * ===========================================================
@@ -1081,9 +1069,9 @@
inside = /in/.test(placement) inside = /in/.test(placement)
$tip $tip
.remove() .detach()
.css({ top: 0, left: 0, display: 'block' }) .css({ top: 0, left: 0, display: 'block' })
.appendTo(inside ? this.$element : document.body) .insertAfter(this.$element)
pos = this.getPosition(inside) pos = this.getPosition(inside)
@@ -1106,7 +1094,7 @@
} }
$tip $tip
.css(tp) .offset(tp)
.addClass(placement) .addClass(placement)
.addClass('in') .addClass('in')
} }
@@ -1128,18 +1116,18 @@
function removeWithAnimation() { function removeWithAnimation() {
var timeout = setTimeout(function () { var timeout = setTimeout(function () {
$tip.off($.support.transition.end).remove() $tip.off($.support.transition.end).detach()
}, 500) }, 500)
$tip.one($.support.transition.end, function () { $tip.one($.support.transition.end, function () {
clearTimeout(timeout) clearTimeout(timeout)
$tip.remove() $tip.detach()
}) })
} }
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() : removeWithAnimation() :
$tip.remove() $tip.detach()
return this return this
} }
@@ -1197,8 +1185,9 @@
this.enabled = !this.enabled this.enabled = !this.enabled
} }
, toggle: function () { , toggle: function (e) {
this[this.tip().hasClass('in') ? 'hide' : 'show']() var self = $(e.currentTarget)[this.type](this._options).data(this.type)
self[self.tip().hasClass('in') ? 'hide' : 'show']()
} }
, destroy: function () { , destroy: function () {
@@ -1231,12 +1220,11 @@
, trigger: 'hover' , trigger: 'hover'
, title: '' , title: ''
, delay: 0 , delay: 0
, html: true , html: false
} }
}(window.jQuery); }(window.jQuery);/* ===========================================================
/* =========================================================== * bootstrap-popover.js v2.2.1
* bootstrap-popover.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#popovers * http://twitter.github.com/bootstrap/javascript.html#popovers
* =========================================================== * ===========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -1338,7 +1326,7 @@
}) })
}(window.jQuery);/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-scrollspy.js v2.1.1 * bootstrap-scrollspy.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#scrollspy * http://twitter.github.com/bootstrap/javascript.html#scrollspy
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -1488,7 +1476,7 @@
}) })
}(window.jQuery);/* ======================================================== }(window.jQuery);/* ========================================================
* bootstrap-tab.js v2.1.1 * bootstrap-tab.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#tabs * http://twitter.github.com/bootstrap/javascript.html#tabs
* ======================================================== * ========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -1538,7 +1526,7 @@
if ( $this.parent('li').hasClass('active') ) return if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active a').last()[0] previous = $ul.find('.active:last a')[0]
e = $.Event('show', { e = $.Event('show', {
relatedTarget: previous relatedTarget: previous
@@ -1614,15 +1602,13 @@
/* TAB DATA-API /* TAB DATA-API
* ============ */ * ============ */
$(function () { $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { e.preventDefault()
e.preventDefault() $(this).tab('show')
$(this).tab('show')
})
}) })
}(window.jQuery);/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-typeahead.js v2.1.1 * bootstrap-typeahead.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#typeahead * http://twitter.github.com/bootstrap/javascript.html#typeahead
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -1797,7 +1783,7 @@
.on('keypress', $.proxy(this.keypress, this)) .on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this)) .on('keyup', $.proxy(this.keyup, this))
if ($.browser.chrome || $.browser.webkit || $.browser.msie) { if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this)) this.$element.on('keydown', $.proxy(this.keydown, this))
} }
@@ -1806,6 +1792,15 @@
.on('mouseenter', 'li', $.proxy(this.mouseenter, this)) .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
} }
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] === 'function'
}
return isSupported
}
, move: function (e) { , move: function (e) {
if (!this.shown) return if (!this.shown) return
@@ -1844,6 +1839,9 @@
switch(e.keyCode) { switch(e.keyCode) {
case 40: // down arrow case 40: // down arrow
case 38: // up arrow case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break break
case 9: // tab case 9: // tab
@@ -1911,18 +1909,16 @@
/* TYPEAHEAD DATA-API /* TYPEAHEAD DATA-API
* ================== */ * ================== */
$(function () { $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { var $this = $(this)
var $this = $(this) if ($this.data('typeahead')) return
if ($this.data('typeahead')) return e.preventDefault()
e.preventDefault() $this.typeahead($this.data())
$this.typeahead($this.data())
})
}) })
}(window.jQuery); }(window.jQuery);
/* ========================================================== /* ==========================================================
* bootstrap-affix.js v2.1.1 * bootstrap-affix.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#affix * http://twitter.github.com/bootstrap/javascript.html#affix
* ========================================================== * ==========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -1951,7 +1947,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options) this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element) this.$element = $(element)
this.checkPosition() this.checkPosition()
} }