Update bootstrap to version 2.2.2
This commit is contained in:
parent
0190a83253
commit
2e092f0c99
11 changed files with 22 additions and 9105 deletions
1040
css/bootstrap-responsive.css
vendored
1040
css/bootstrap-responsive.css
vendored
File diff suppressed because it is too large
Load diff
9
css/bootstrap-responsive.min.css
vendored
Normal file
9
css/bootstrap-responsive.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
5624
css/bootstrap.css
vendored
5624
css/bootstrap.css
vendored
File diff suppressed because it is too large
Load diff
9
css/bootstrap.min.css
vendored
Normal file
9
css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
90
js/bootstrap-alert.js
vendored
90
js/bootstrap-alert.js
vendored
|
@ -1,90 +0,0 @@
|
||||||
/* ==========================================================
|
|
||||||
* bootstrap-alert.js v2.0.4
|
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
|
||||||
* ==========================================================
|
|
||||||
* Copyright 2012 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"; // jshint ;_;
|
|
||||||
|
|
||||||
|
|
||||||
/* ALERT CLASS DEFINITION
|
|
||||||
* ====================== */
|
|
||||||
|
|
||||||
var dismiss = '[data-dismiss="alert"]'
|
|
||||||
, Alert = function (el) {
|
|
||||||
$(el).on('click', dismiss, this.close)
|
|
||||||
}
|
|
||||||
|
|
||||||
Alert.prototype.close = function (e) {
|
|
||||||
var $this = $(this)
|
|
||||||
, selector = $this.attr('data-target')
|
|
||||||
, $parent
|
|
||||||
|
|
||||||
if (!selector) {
|
|
||||||
selector = $this.attr('href')
|
|
||||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
|
||||||
}
|
|
||||||
|
|
||||||
$parent = $(selector)
|
|
||||||
|
|
||||||
e && e.preventDefault()
|
|
||||||
|
|
||||||
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
|
||||||
|
|
||||||
$parent.trigger(e = $.Event('close'))
|
|
||||||
|
|
||||||
if (e.isDefaultPrevented()) return
|
|
||||||
|
|
||||||
$parent.removeClass('in')
|
|
||||||
|
|
||||||
function removeElement() {
|
|
||||||
$parent
|
|
||||||
.trigger('closed')
|
|
||||||
.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
$.support.transition && $parent.hasClass('fade') ?
|
|
||||||
$parent.on($.support.transition.end, removeElement) :
|
|
||||||
removeElement()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ALERT PLUGIN DEFINITION
|
|
||||||
* ======================= */
|
|
||||||
|
|
||||||
$.fn.alert = function (option) {
|
|
||||||
return this.each(function () {
|
|
||||||
var $this = $(this)
|
|
||||||
, data = $this.data('alert')
|
|
||||||
if (!data) $this.data('alert', (data = new Alert(this)))
|
|
||||||
if (typeof option == 'string') data[option].call($this)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
$.fn.alert.Constructor = Alert
|
|
||||||
|
|
||||||
|
|
||||||
/* ALERT DATA-API
|
|
||||||
* ============== */
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
|
||||||
})
|
|
||||||
|
|
||||||
}(window.jQuery);
|
|
100
js/bootstrap-dropdown.js
vendored
100
js/bootstrap-dropdown.js
vendored
|
@ -1,100 +0,0 @@
|
||||||
/* ============================================================
|
|
||||||
* bootstrap-dropdown.js v2.0.4
|
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
|
||||||
* ============================================================
|
|
||||||
* Copyright 2012 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"; // jshint ;_;
|
|
||||||
|
|
||||||
|
|
||||||
/* DROPDOWN CLASS DEFINITION
|
|
||||||
* ========================= */
|
|
||||||
|
|
||||||
var toggle = '[data-toggle="dropdown"]'
|
|
||||||
, Dropdown = function (element) {
|
|
||||||
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
|
||||||
$('html').on('click.dropdown.data-api', function () {
|
|
||||||
$el.parent().removeClass('open')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
Dropdown.prototype = {
|
|
||||||
|
|
||||||
constructor: Dropdown
|
|
||||||
|
|
||||||
, toggle: function (e) {
|
|
||||||
var $this = $(this)
|
|
||||||
, $parent
|
|
||||||
, selector
|
|
||||||
, isActive
|
|
||||||
|
|
||||||
if ($this.is('.disabled, :disabled')) return
|
|
||||||
|
|
||||||
selector = $this.attr('data-target')
|
|
||||||
|
|
||||||
if (!selector) {
|
|
||||||
selector = $this.attr('href')
|
|
||||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
|
||||||
}
|
|
||||||
|
|
||||||
$parent = $(selector)
|
|
||||||
$parent.length || ($parent = $this.parent())
|
|
||||||
|
|
||||||
isActive = $parent.hasClass('open')
|
|
||||||
|
|
||||||
clearMenus()
|
|
||||||
|
|
||||||
if (!isActive) $parent.toggleClass('open')
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function clearMenus() {
|
|
||||||
$(toggle).parent().removeClass('open')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* DROPDOWN PLUGIN DEFINITION
|
|
||||||
* ========================== */
|
|
||||||
|
|
||||||
$.fn.dropdown = function (option) {
|
|
||||||
return this.each(function () {
|
|
||||||
var $this = $(this)
|
|
||||||
, data = $this.data('dropdown')
|
|
||||||
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
|
||||||
if (typeof option == 'string') data[option].call($this)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
$.fn.dropdown.Constructor = Dropdown
|
|
||||||
|
|
||||||
|
|
||||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
|
||||||
* =================================== */
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
$('html').on('click.dropdown.data-api', clearMenus)
|
|
||||||
$('body')
|
|
||||||
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
|
|
||||||
.on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
|
||||||
})
|
|
||||||
|
|
||||||
}(window.jQuery);
|
|
218
js/bootstrap-modal.js
vendored
218
js/bootstrap-modal.js
vendored
|
@ -1,218 +0,0 @@
|
||||||
/* =========================================================
|
|
||||||
* bootstrap-modal.js v2.0.4
|
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
|
||||||
* =========================================================
|
|
||||||
* Copyright 2012 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"; // jshint ;_;
|
|
||||||
|
|
||||||
|
|
||||||
/* MODAL CLASS DEFINITION
|
|
||||||
* ====================== */
|
|
||||||
|
|
||||||
var Modal = function (content, options) {
|
|
||||||
this.options = options
|
|
||||||
this.$element = $(content)
|
|
||||||
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
|
||||||
}
|
|
||||||
|
|
||||||
Modal.prototype = {
|
|
||||||
|
|
||||||
constructor: Modal
|
|
||||||
|
|
||||||
, toggle: function () {
|
|
||||||
return this[!this.isShown ? 'show' : 'hide']()
|
|
||||||
}
|
|
||||||
|
|
||||||
, show: function () {
|
|
||||||
var that = this
|
|
||||||
, e = $.Event('show')
|
|
||||||
|
|
||||||
this.$element.trigger(e)
|
|
||||||
|
|
||||||
if (this.isShown || e.isDefaultPrevented()) return
|
|
||||||
|
|
||||||
$('body').addClass('modal-open')
|
|
||||||
|
|
||||||
this.isShown = true
|
|
||||||
|
|
||||||
escape.call(this)
|
|
||||||
backdrop.call(this, function () {
|
|
||||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
|
||||||
|
|
||||||
if (!that.$element.parent().length) {
|
|
||||||
that.$element.appendTo(document.body) //don't move modals dom position
|
|
||||||
}
|
|
||||||
|
|
||||||
that.$element
|
|
||||||
.show()
|
|
||||||
|
|
||||||
if (transition) {
|
|
||||||
that.$element[0].offsetWidth // force reflow
|
|
||||||
}
|
|
||||||
|
|
||||||
that.$element.addClass('in')
|
|
||||||
|
|
||||||
transition ?
|
|
||||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
|
||||||
that.$element.trigger('shown')
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
, hide: function (e) {
|
|
||||||
e && e.preventDefault()
|
|
||||||
|
|
||||||
var that = this
|
|
||||||
|
|
||||||
e = $.Event('hide')
|
|
||||||
|
|
||||||
this.$element.trigger(e)
|
|
||||||
|
|
||||||
if (!this.isShown || e.isDefaultPrevented()) return
|
|
||||||
|
|
||||||
this.isShown = false
|
|
||||||
|
|
||||||
$('body').removeClass('modal-open')
|
|
||||||
|
|
||||||
escape.call(this)
|
|
||||||
|
|
||||||
this.$element.removeClass('in')
|
|
||||||
|
|
||||||
$.support.transition && this.$element.hasClass('fade') ?
|
|
||||||
hideWithTransition.call(this) :
|
|
||||||
hideModal.call(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* MODAL PRIVATE METHODS
|
|
||||||
* ===================== */
|
|
||||||
|
|
||||||
function hideWithTransition() {
|
|
||||||
var that = this
|
|
||||||
, timeout = setTimeout(function () {
|
|
||||||
that.$element.off($.support.transition.end)
|
|
||||||
hideModal.call(that)
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
this.$element.one($.support.transition.end, 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' : ''
|
|
||||||
|
|
||||||
if (this.isShown && this.options.backdrop) {
|
|
||||||
var doAnimate = $.support.transition && animate
|
|
||||||
|
|
||||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
|
||||||
.appendTo(document.body)
|
|
||||||
|
|
||||||
if (this.options.backdrop != 'static') {
|
|
||||||
this.$backdrop.click($.proxy(this.hide, this))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
|
||||||
|
|
||||||
this.$backdrop.addClass('in')
|
|
||||||
|
|
||||||
doAnimate ?
|
|
||||||
this.$backdrop.one($.support.transition.end, callback) :
|
|
||||||
callback()
|
|
||||||
|
|
||||||
} else if (!this.isShown && this.$backdrop) {
|
|
||||||
this.$backdrop.removeClass('in')
|
|
||||||
|
|
||||||
$.support.transition && this.$element.hasClass('fade')?
|
|
||||||
this.$backdrop.one($.support.transition.end, $.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.options.keyboard) {
|
|
||||||
$(document).on('keyup.dismiss.modal', function ( e ) {
|
|
||||||
e.which == 27 && that.hide()
|
|
||||||
})
|
|
||||||
} else if (!this.isShown) {
|
|
||||||
$(document).off('keyup.dismiss.modal')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* MODAL PLUGIN DEFINITION
|
|
||||||
* ======================= */
|
|
||||||
|
|
||||||
$.fn.modal = function (option) {
|
|
||||||
return this.each(function () {
|
|
||||||
var $this = $(this)
|
|
||||||
, data = $this.data('modal')
|
|
||||||
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
|
|
||||||
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
|
||||||
if (typeof option == 'string') data[option]()
|
|
||||||
else if (options.show) data.show()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
$.fn.modal.defaults = {
|
|
||||||
backdrop: true
|
|
||||||
, keyboard: true
|
|
||||||
, show: true
|
|
||||||
}
|
|
||||||
|
|
||||||
$.fn.modal.Constructor = Modal
|
|
||||||
|
|
||||||
|
|
||||||
/* MODAL DATA-API
|
|
||||||
* ============== */
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
|
||||||
var $this = $(this), href
|
|
||||||
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
|
||||||
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
|
|
||||||
|
|
||||||
e.preventDefault()
|
|
||||||
$target.modal(option)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
}(window.jQuery);
|
|
2027
js/bootstrap.js
vendored
2027
js/bootstrap.js
vendored
File diff suppressed because it is too large
Load diff
2
js/bootstrap.min.js
vendored
2
js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -6,8 +6,6 @@
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="/js/bootstrap-modal.js"></script>
|
<script src="/js/bootstrap.min.js"></script>
|
||||||
<script src="/js/bootstrap-dropdown.js"></script>
|
|
||||||
<script src="/js/bootstrap-alert.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<link href="/img/favicon.ico" rel="icon" type="image/x-icon" />
|
<link href="/img/favicon.ico" rel="icon" type="image/x-icon" />
|
||||||
<link href="/css/bootstrap.css" rel="stylesheet">
|
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="/css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.centered { text-align:center; }
|
.centered { text-align:center; }
|
||||||
.down { vertical-align:text-bottom; }
|
.down { vertical-align:text-bottom; }
|
||||||
|
|
Reference in a new issue