Permalink
Browse files

Update to Bootstrap 2.1.0

  • Loading branch information...
1 parent c4bf5a5 commit cb964a6d3502936cced7634dd13dc2469c3441ec @vickash vickash committed Aug 21, 2012
Showing with 1,816 additions and 989 deletions.
  1. +2 −1 .gitignore
  2. +1 −1 lib/less/rails/bootstrap/version.rb
  3. BIN vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png
  4. +1 −0 vendor/assets/javascripts/twitter/bootstrap.js
  5. +104 −0 vendor/assets/javascripts/twitter/bootstrap/affix.js
  6. +1 −1 vendor/assets/javascripts/twitter/bootstrap/alert.js
  7. +1 −1 vendor/assets/javascripts/twitter/bootstrap/button.js
  8. +12 −5 vendor/assets/javascripts/twitter/bootstrap/carousel.js
  9. +4 −3 vendor/assets/javascripts/twitter/bootstrap/collapse.js
  10. +66 −16 vendor/assets/javascripts/twitter/bootstrap/dropdown.js
  11. +95 −74 vendor/assets/javascripts/twitter/bootstrap/modal.js
  12. +9 −4 vendor/assets/javascripts/twitter/bootstrap/popover.js
  13. +9 −9 vendor/assets/javascripts/twitter/bootstrap/scrollspy.js
  14. +2 −2 vendor/assets/javascripts/twitter/bootstrap/tab.js
  15. +15 −15 vendor/assets/javascripts/twitter/bootstrap/tooltip.js
  16. +2 −3 vendor/assets/javascripts/twitter/bootstrap/transition.js
  17. +50 −35 vendor/assets/javascripts/twitter/bootstrap/typeahead.js
  18. +3 −2 vendor/frameworks/twitter/bootstrap/accordion.less
  19. +16 −9 vendor/frameworks/twitter/bootstrap/alerts.less
  20. +0 −36 vendor/frameworks/twitter/bootstrap/badges.less
  21. +1 −1 vendor/frameworks/twitter/bootstrap/bootstrap.less
  22. +10 −10 vendor/frameworks/twitter/bootstrap/breadcrumbs.less
  23. +76 −23 vendor/frameworks/twitter/bootstrap/button-groups.less
  24. +85 −65 vendor/frameworks/twitter/bootstrap/buttons.less
  25. +13 −3 vendor/frameworks/twitter/bootstrap/carousel.less
  26. +4 −2 vendor/frameworks/twitter/bootstrap/close.less
  27. +6 −5 vendor/frameworks/twitter/bootstrap/code.less
  28. +5 −2 vendor/frameworks/twitter/bootstrap/component-animations.less
  29. +81 −14 vendor/frameworks/twitter/bootstrap/dropdowns.less
  30. +100 −48 vendor/frameworks/twitter/bootstrap/forms.less
  31. +17 −1 vendor/frameworks/twitter/bootstrap/grid.less
  32. +4 −2 vendor/frameworks/twitter/bootstrap/hero-unit.less
  33. +19 −2 vendor/frameworks/twitter/bootstrap/labels-badges.less
  34. +0 −38 vendor/frameworks/twitter/bootstrap/labels.less
  35. +1 −2 vendor/frameworks/twitter/bootstrap/layouts.less
  36. +98 −73 vendor/frameworks/twitter/bootstrap/mixins.less
  37. +9 −2 vendor/frameworks/twitter/bootstrap/modals.less
  38. +238 −127 vendor/frameworks/twitter/bootstrap/navbar.less
  39. +38 −17 vendor/frameworks/twitter/bootstrap/navs.less
  40. +5 −4 vendor/frameworks/twitter/bootstrap/pager.less
  41. +16 −8 vendor/frameworks/twitter/bootstrap/pagination.less
  42. +101 −33 vendor/frameworks/twitter/bootstrap/popovers.less
  43. +18 −13 vendor/frameworks/twitter/bootstrap/progress-bars.less
  44. +6 −3 vendor/frameworks/twitter/bootstrap/reset.less
  45. +9 −7 vendor/frameworks/twitter/bootstrap/responsive-1200px-min.less
  46. +86 −68 vendor/frameworks/twitter/bootstrap/responsive-767px-max.less
  47. +7 −5 vendor/frameworks/twitter/bootstrap/responsive-768px-979px.less
  48. +18 −5 vendor/frameworks/twitter/bootstrap/responsive-navbar.less
  49. +17 −15 vendor/frameworks/twitter/bootstrap/responsive-utilities.less
  50. +5 −5 vendor/frameworks/twitter/bootstrap/responsive.less
  51. +26 −4 vendor/frameworks/twitter/bootstrap/scaffolding.less
  52. +15 −19 vendor/frameworks/twitter/bootstrap/sprites.less
  53. +60 −11 vendor/frameworks/twitter/bootstrap/tables.less
  54. +9 −4 vendor/frameworks/twitter/bootstrap/thumbnails.less
  55. +47 −12 vendor/frameworks/twitter/bootstrap/tooltip.less
  56. +57 −83 vendor/frameworks/twitter/bootstrap/type.less
  57. +9 −2 vendor/frameworks/twitter/bootstrap/utilities.less
  58. +100 −29 vendor/frameworks/twitter/bootstrap/variables.less
  59. +7 −5 vendor/frameworks/twitter/bootstrap/wells.less
View
3 .gitignore
@@ -3,4 +3,5 @@
Gemfile.lock
pkg/*
test/dummy_app/log/*
-tmp/*
+tmp/*
+.DS_Store
View
2 lib/less/rails/bootstrap/version.rb
@@ -1,7 +1,7 @@
module Less
module Rails
module Bootstrap
- VERSION = "2.0.12"
+ VERSION = "2.1.0"
end
end
end
View
BIN vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1 vendor/assets/javascripts/twitter/bootstrap.js
@@ -1,3 +1,4 @@
+//= require twitter/bootstrap/affix.js
//= require twitter/bootstrap/alert.js
//= require twitter/bootstrap/button.js
//= require twitter/bootstrap/carousel.js
View
104 vendor/assets/javascripts/twitter/bootstrap/affix.js
@@ -0,0 +1,104 @@
+/* ==========================================================
+ * bootstrap-affix.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * 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 ;_;
+
+
+ /* AFFIX CLASS DEFINITION
+ * ====================== */
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, $.fn.affix.defaults, options)
+ this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+ this.$element = $(element)
+ this.checkPosition()
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var scrollHeight = $(document).height()
+ , scrollTop = this.$window.scrollTop()
+ , position = this.$element.offset()
+ , offset = this.options.offset
+ , offsetBottom = offset.bottom
+ , offsetTop = offset.top
+ , reset = 'affix affix-top affix-bottom'
+ , affix
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top()
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+ affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+ false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+ 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+ 'top' : false
+
+ if (this.affixed === affix) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+ this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+ }
+
+
+ /* AFFIX PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.affix = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('affix')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.affix.Constructor = Affix
+
+ $.fn.affix.defaults = {
+ offset: 0
+ }
+
+
+ /* AFFIX DATA-API
+ * ============== */
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ , data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+ data.offsetTop && (data.offset.top = data.offsetTop)
+
+ $spy.affix(data)
+ })
+ })
+
+
+}(window.jQuery);
View
2 vendor/assets/javascripts/twitter/bootstrap/alert.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alert.js v2.0.4
+ * bootstrap-alert.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
View
2 vendor/assets/javascripts/twitter/bootstrap/button.js
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-button.js v2.0.4
+ * bootstrap-button.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
View
17 vendor/assets/javascripts/twitter/bootstrap/carousel.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-carousel.js v2.0.4
+ * bootstrap-carousel.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -46,7 +46,7 @@
}
, to: function (pos) {
- var $active = this.$element.find('.active')
+ var $active = this.$element.find('.item.active')
, children = $active.parent().children()
, activePos = children.index($active)
, that = this
@@ -68,6 +68,10 @@
, pause: function (e) {
if (!e) this.paused = true
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle()
+ }
clearInterval(this.interval)
this.interval = null
return this
@@ -84,13 +88,15 @@
}
, slide: function (type, next) {
- var $active = this.$element.find('.active')
+ var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
- , e = $.Event('slide')
+ , e = $.Event('slide', {
+ relatedTarget: $next[0]
+ })
this.sliding = true
@@ -138,9 +144,10 @@
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+ , action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
- else if (typeof option == 'string' || (option = options.slide)) data[option]()
+ else if (action) data[action]()
else if (options.interval) data.cycle()
})
}
View
7 vendor/assets/javascripts/twitter/bootstrap/collapse.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-collapse.js v2.0.4
+ * bootstrap-collapse.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
@@ -67,7 +67,7 @@
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
- this.$element[dimension](this.$element[0][scroll])
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
@@ -144,12 +144,13 @@
* ==================== */
$(function () {
- $('body').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
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
})
View
82 vendor/assets/javascripts/twitter/bootstrap/dropdown.js
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-dropdown.js v2.0.4
+ * bootstrap-dropdown.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
@@ -26,7 +26,7 @@
/* DROPDOWN CLASS DEFINITION
* ========================= */
- var toggle = '[data-toggle="dropdown"]'
+ 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 () {
@@ -41,34 +41,82 @@
, toggle: function (e) {
var $this = $(this)
, $parent
- , selector
, isActive
if ($this.is('.disabled, :disabled')) return
- selector = $this.attr('data-target')
+ $parent = getParent($this)
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ $parent.toggleClass('open')
+ $this.focus()
}
- $parent = $(selector)
- $parent.length || ($parent = $this.parent())
+ return false
+ }
+
+ , keydown: function (e) {
+ var $this
+ , $items
+ , $active
+ , $parent
+ , isActive
+ , index
+
+ if (!/(38|40|27)/.test(e.keyCode)) return
+
+ $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ $parent = getParent($this)
isActive = $parent.hasClass('open')
- clearMenus()
+ if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
- if (!isActive) $parent.toggleClass('open')
+ $items = $('[role=menu] li:not(.divider) a', $parent)
- return false
+ if (!$items.length) return
+
+ index = $items.index($items.filter(':focus'))
+
+ if (e.keyCode == 38 && index > 0) index-- // up
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items
+ .eq(index)
+ .focus()
}
}
function clearMenus() {
- $(toggle).parent().removeClass('open')
+ getParent($(toggle))
+ .removeClass('open')
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+ $parent.length || ($parent = $this.parent())
+
+ return $parent
}
@@ -91,10 +139,12 @@
* =================================== */
$(function () {
- $('html').on('click.dropdown.data-api', clearMenus)
+ $('html')
+ .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('click.dropdown touchstart.dropdown.data-api', '.dropdown', 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);
View
169 vendor/assets/javascripts/twitter/bootstrap/modal.js
@@ -1,5 +1,5 @@
/* =========================================================
- * bootstrap-modal.js v2.0.4
+ * bootstrap-modal.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
@@ -26,10 +26,11 @@
/* MODAL CLASS DEFINITION
* ====================== */
- var Modal = function (content, options) {
+ var Modal = function (element, options) {
this.options = options
- this.$element = $(content)
+ this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype = {
@@ -52,8 +53,9 @@
this.isShown = true
- escape.call(this)
- backdrop.call(this, function () {
+ this.escape()
+
+ this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
@@ -67,7 +69,12 @@
that.$element[0].offsetWidth // force reflow
}
- that.$element.addClass('in')
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+ .focus()
+
+ that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
@@ -91,90 +98,98 @@
$('body').removeClass('modal-open')
- escape.call(this)
+ this.escape()
+
+ $(document).off('focusin.modal')
- this.$element.removeClass('in')
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ?
- hideWithTransition.call(this) :
- hideModal.call(this)
+ this.hideWithTransition() :
+ this.hideModal()
}
- }
-
-
- /* MODAL PRIVATE METHODS
- * ===================== */
-
- function hideWithTransition() {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- hideModal.call(that)
- }, 500)
+ , enforceFocus: function () {
+ var that = this
+ $(document).on('focusin.modal', function (e) {
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+ that.$element.focus()
+ }
+ })
+ }
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- hideModal.call(that)
- })
- }
+ , escape: function () {
+ var that = this
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keyup.dismiss.modal', function ( e ) {
+ e.which == 27 && that.hide()
+ })
+ } else if (!this.isShown) {
+ this.$element.off('keyup.dismiss.modal')
+ }
+ }
- function hideModal(that) {
- this.$element
- .hide()
- .trigger('hidden')
+ , hideWithTransition: function () {
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.off($.support.transition.end)
+ that.hideModal()
+ }, 500)
+
+ this.$element.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ that.hideModal()
+ })
+ }
- backdrop.call(this)
- }
+ , hideModal: function (that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
- function backdrop(callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
+ this.backdrop()
+ }
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
+ , removeBackdrop: function () {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
- .appendTo(document.body)
+ , backdrop: function (callback) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
- if (this.options.backdrop != 'static') {
- this.$backdrop.click($.proxy(this.hide, this))
- }
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .appendTo(document.body)
- this.$backdrop.addClass('in')
+ if (this.options.backdrop != 'static') {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
+ this.$backdrop.addClass('in')
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
- removeBackdrop.call(this)
+ doAnimate ?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
- } else if (callback) {
- callback()
- }
- }
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
- function removeBackdrop() {
- this.$backdrop.remove()
- this.$backdrop = null
- }
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
+ this.removeBackdrop()
- 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')
- }
+ } else if (callback) {
+ callback()
+ }
+ }
}
@@ -206,12 +221,18 @@
$(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())
+ var $this = $(this)
+ , href = $this.attr('href')
+ , $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())
e.preventDefault()
- $target.modal(option)
+
+ $target
+ .modal(option)
+ .one('hide', function () {
+ $this.focus()
+ })
})
})
View
13 vendor/assets/javascripts/twitter/bootstrap/popover.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-popover.js v2.0.4
+ * bootstrap-popover.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
@@ -26,7 +26,7 @@
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
- var Popover = function ( element, options ) {
+ var Popover = function (element, options) {
this.init('popover', element, options)
}
@@ -43,8 +43,8 @@
, title = this.getTitle()
, content = this.getContent()
- $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
- $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
@@ -71,6 +71,10 @@
return this.$tip
}
+ , destroy: function () {
+ this.hide().$element.off('.' + this.type).removeData(this.type)
+ }
+
})
@@ -91,6 +95,7 @@
$.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>'
})
View
18 vendor/assets/javascripts/twitter/bootstrap/scrollspy.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-scrollspy.js v2.0.4
+ * bootstrap-scrollspy.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
@@ -23,15 +23,15 @@
"use strict"; // jshint ;_;
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
+ /* SCROLLSPY CLASS DEFINITION
+ * ========================== */
- function ScrollSpy( element, options) {
+ function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll.data-api', process)
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
@@ -58,7 +58,7 @@
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
- && href.length
+ && $href.length
&& [[ $href.position().top, href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
@@ -108,7 +108,7 @@
.parent('li')
.addClass('active')
- if (active.parent('.dropdown-menu')) {
+ if (active.parent('.dropdown-menu').length) {
active = active.closest('li.dropdown').addClass('active')
}
@@ -121,7 +121,7 @@
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
- $.fn.scrollspy = function ( option ) {
+ $.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
@@ -141,7 +141,7 @@
/* SCROLLSPY DATA-API
* ================== */
- $(function () {
+ $(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
View
4 vendor/assets/javascripts/twitter/bootstrap/tab.js
@@ -1,5 +1,5 @@
/* ========================================================
- * bootstrap-tab.js v2.0.4
+ * bootstrap-tab.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
@@ -26,7 +26,7 @@
/* TAB CLASS DEFINITION
* ==================== */
- var Tab = function ( element ) {
+ var Tab = function (element) {
this.element = $(element)
}
View
30 vendor/assets/javascripts/twitter/bootstrap/tooltip.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-tooltip.js v2.0.4
+ * bootstrap-tooltip.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
@@ -44,11 +44,13 @@
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.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
+ 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))
}
this.options.selector ?
@@ -148,20 +150,11 @@
}
}
- , isHTML: function(text) {
- // html string detection logic adapted from jQuery
- return typeof text != 'string'
- || ( text.charAt(0) === "<"
- && text.charAt( text.length - 1 ) === ">"
- && text.length >= 3
- ) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
- }
-
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
- $tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
@@ -185,6 +178,8 @@
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.remove()
+
+ return this
}
, fixTitle: function () {
@@ -244,6 +239,10 @@
this[this.tip().hasClass('in') ? 'hide' : 'show']()
}
+ , destroy: function () {
+ this.hide().$element.off('.' + this.type).removeData(this.type)
+ }
+
}
@@ -270,6 +269,7 @@
, trigger: 'hover'
, title: ''
, delay: 0
+ , html: true
}
}(window.jQuery);
View
5 vendor/assets/javascripts/twitter/bootstrap/transition.js
@@ -1,5 +1,5 @@
/* ===================================================
- * bootstrap-transition.js v2.0.4
+ * bootstrap-transition.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
@@ -36,8 +36,7 @@
, transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd'
- , 'msTransition' : 'MSTransitionEnd'
+ , 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
, name
View
85 vendor/assets/javascripts/twitter/bootstrap/typeahead.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-typeahead.js v2.0.4
+ * bootstrap-typeahead.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
@@ -77,17 +77,23 @@
}
, lookup: function (event) {
- var that = this
- , items
- , q
+ var items
this.query = this.$element.val()
- if (!this.query) {
+ if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
- items = $.grep(this.source, function (item) {
+ items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+ return items ? this.process(items) : this
+ }
+
+ , process: function (items) {
+ var that = this
+
+ items = $.grep(items, function (item) {
return that.matcher(item)
})
@@ -169,14 +175,48 @@
.on('keyup', $.proxy(this.keyup, this))
if ($.browser.webkit || $.browser.msie) {
- this.$element.on('keydown', $.proxy(this.keypress, this))
+ this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
}
+ , move: function (e) {
+ if (!this.shown) return
+
+ switch(e.keyCode) {
+ case 9: // tab
+ case 13: // enter
+ case 27: // escape
+ e.preventDefault()
+ break
+
+ case 38: // up arrow
+ e.preventDefault()
+ this.prev()
+ break
+
+ case 40: // down arrow
+ e.preventDefault()
+ this.next()
+ break
+ }
+
+ e.stopPropagation()
+ }
+
+ , keydown: function (e) {
+ this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
+ this.move(e)
+ }
+
+ , keypress: function (e) {
+ if (this.suppressKeyPressRepeat) return
+ this.move(e)
+ }
+
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
@@ -202,32 +242,6 @@
e.preventDefault()
}
- , keypress: function (e) {
- if (!this.shown) return
-
- switch(e.keyCode) {
- case 9: // tab
- case 13: // enter
- case 27: // escape
- e.preventDefault()
- break
-
- case 38: // up arrow
- if (e.type != 'keydown') break
- e.preventDefault()
- this.prev()
- break
-
- case 40: // down arrow
- if (e.type != 'keydown') break
- e.preventDefault()
- this.next()
- break
- }
-
- e.stopPropagation()
- }
-
, blur: function (e) {
var that = this
setTimeout(function () { that.hide() }, 150)
@@ -265,12 +279,13 @@
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
+ , minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
- /* TYPEAHEAD DATA-API
+ /* TYPEAHEAD DATA-API
* ================== */
$(function () {
@@ -282,4 +297,4 @@
})
})
-}(window.jQuery);
+}(window.jQuery);
View
5 vendor/frameworks/twitter/bootstrap/accordion.less
@@ -1,5 +1,6 @@
-// ACCORDION
-// ---------
+//
+// Accordion
+// --------------------------------------------------
// Parent container
View
25 vendor/frameworks/twitter/bootstrap/alerts.less
@@ -1,7 +1,11 @@
-// ALERT STYLES
-// ------------
+//
+// Alerts
+// --------------------------------------------------
+
+
+// Base styles
+// -------------------------
-// Base alert styles
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: @baseLineHeight;
@@ -11,24 +15,25 @@
.border-radius(4px);
color: @warningText;
}
-.alert-heading {
- color: inherit;
+.alert h4 {
+ margin: 0;
}
// Adjust close link position
.alert .close {
position: relative;
top: -2px;
right: -21px;
- line-height: 18px;
+ line-height: @baseLineHeight;
}
+
// Alternate styles
-// ----------------
+// -------------------------
.alert-success {
background-color: @successBackground;
- border-color: @successBorder;
+ border-color: @successBorder;
color: @successText;
}
.alert-danger,
@@ -43,8 +48,10 @@
color: @infoText;
}
+
// Block alerts
-// ------------------------
+// -------------------------
+
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
View
36 vendor/frameworks/twitter/bootstrap/badges.less
@@ -1,36 +0,0 @@
-// BADGES
-// ------
-
-// Base
-.badge {
- padding: 1px 9px 2px;
- font-size: @baseFontSize * .925;
- font-weight: bold;
- white-space: nowrap;
- color: @white;
- background-color: @grayLight;
- .border-radius(9px);
-}
-
-// Hover state
-.badge:hover {
- color: @white;
- text-decoration: none;
- cursor: pointer;
-}
-
-// Colors
-.badge-error { background-color: @errorText; }
-.badge-error:hover { background-color: darken(@errorText, 10%); }
-
-.badge-warning { background-color: @orange; }
-.badge-warning:hover { background-color: darken(@orange, 10%); }
-
-.badge-success { background-color: @successText; }
-.badge-success:hover { background-color: darken(@successText, 10%); }
-
-.badge-info { background-color: @infoText; }
-.badge-info:hover { background-color: darken(@infoText, 10%); }
-
-.badge-inverse { background-color: @grayDark; }
-.badge-inverse:hover { background-color: darken(@grayDark, 10%); }
View
2 vendor/frameworks/twitter/bootstrap/bootstrap.less
@@ -1,5 +1,5 @@
/*!
- * Bootstrap v2.0.4
+ * Bootstrap v2.1.0
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
View
20 vendor/frameworks/twitter/bootstrap/breadcrumbs.less
@@ -1,24 +1,24 @@
-// BREADCRUMBS
-// -----------
+//
+// Breadcrumbs
+// --------------------------------------------------
+
.breadcrumb {
- padding: 7px 14px;
+ padding: 8px 15px;
margin: 0 0 @baseLineHeight;
list-style: none;
- #gradient > .vertical(@white, #f5f5f5);
- border: 1px solid #ddd;
- .border-radius(3px);
- .box-shadow(inset 0 1px 0 @white);
+ background-color: #f5f5f5;
+ .border-radius(4px);
li {
display: inline-block;
.ie7-inline-block();
text-shadow: 0 1px 0 @white;
}
.divider {
padding: 0 5px;
- color: @grayLight;
+ color: #ccc;
}
- .active a {
- color: @grayDark;
+ .active {
+ color: @grayLight;
}
}
View
99 vendor/frameworks/twitter/bootstrap/button-groups.less
@@ -1,11 +1,13 @@
-// BUTTON GROUPS
-// -------------
+//
+// Button groups
+// --------------------------------------------------
// Make the div behave like a button
.btn-group {
position: relative;
- .clearfix(); // clears the floated buttons
+ font-size: 0; // remove as part 1 of font-size inline-block hack
+ white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
.ie7-restore-left-whitespace();
}
@@ -16,21 +18,44 @@
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
+ font-size: 0; // Hack to remove whitespace that results from using inline-block
margin-top: @baseLineHeight / 2;
margin-bottom: @baseLineHeight / 2;
.btn-group {
display: inline-block;
.ie7-inline-block();
}
+ .btn + .btn,
+ .btn-group + .btn,
+ .btn + .btn-group {
+ margin-left: 5px;
+ }
}
// Float them, remove border radius, then re-add to first and last elements
.btn-group > .btn {
position: relative;
- float: left;
- margin-left: -1px;
.border-radius(0);
}
+.btn-group > .btn + .btn {
+ margin-left: -1px;
+}
+.btn-group > .btn,
+.btn-group > .dropdown-menu {
+ font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
+}
+
+// Reset fonts for other sizes
+.btn-group > .btn-mini {
+ font-size: 11px;
+}
+.btn-group > .btn-small {
+ font-size: 12px;
+}
+.btn-group > .btn-large {
+ font-size: 16px;
+}
+
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
@@ -91,24 +116,28 @@
// ----------------------
// Give the line between buttons some depth
-.btn-group > .dropdown-toggle {
+.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
.box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
- *padding-top: 4px;
- *padding-bottom: 4px;
+ *padding-top: 5px;
+ *padding-bottom: 5px;
}
-.btn-group > .btn-mini.dropdown-toggle {
+.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
padding-right: 5px;
+ *padding-top: 2px;
+ *padding-bottom: 2px;
}
-.btn-group > .btn-small.dropdown-toggle {
- *padding-top: 4px;
+.btn-group > .btn-small + .dropdown-toggle {
+ *padding-top: 5px;
*padding-bottom: 4px;
}
-.btn-group > .btn-large.dropdown-toggle {
+.btn-group > .btn-large + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
+ *padding-top: 7px;
+ *padding-bottom: 7px;
}
.btn-group.open {
@@ -147,22 +176,16 @@
// Reposition the caret
.btn .caret {
- margin-top: 7px;
+ margin-top: 8px;
margin-left: 0;
}
-.btn:hover .caret,
-.open.btn-group .caret {
- .opacity(100);
-}
// Carets in other button sizes
-.btn-mini .caret {
- margin-top: 5px;
-}
-.btn-small .caret {
+.btn-mini .caret,
+.btn-small .caret,
+.btn-large .caret {
margin-top: 6px;
}
.btn-large .caret {
- margin-top: 6px;
border-left-width: 5px;
border-right-width: 5px;
border-top-width: 5px;
@@ -185,7 +208,37 @@
.caret {
border-top-color: @white;
border-bottom-color: @white;
- .opacity(75);
}
}
+
+
+// Vertical button groups
+// ----------------------
+
+.btn-group-vertical {
+ display: inline-block; // makes buttons only take up the width they need
+ .ie7-inline-block();
+}
+.btn-group-vertical .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ .border-radius(0);
+}
+.btn-group-vertical .btn + .btn {
+ margin-left: 0;
+ margin-top: -1px;
+}
+.btn-group-vertical .btn:first-child {
+ .border-radius(4px 4px 0 0);
+}
+.btn-group-vertical .btn:last-child {
+ .border-radius(0 0 4px 4px);
+}
+.btn-group-vertical .btn-large:first-child {
+ .border-radius(6px 6px 0 0);
+}
+.btn-group-vertical .btn-large:last-child {
+ .border-radius(0 0 6px 6px);
+}
View
150 vendor/frameworks/twitter/bootstrap/buttons.less
@@ -1,5 +1,6 @@
-// BUTTON STYLES
-// -------------
+//
+// Buttons
+// --------------------------------------------------
// Base styles
@@ -9,64 +10,64 @@
.btn {
display: inline-block;
.ie7-inline-block();
- padding: 4px 10px 4px;
+ padding: 4px 14px;
margin-bottom: 0; // For input.btn
font-size: @baseFontSize;
line-height: @baseLineHeight;
- *line-height: 20px;
- color: @grayDark;
+ *line-height: @baseLineHeight;
text-align: center;
- text-shadow: 0 1px 1px rgba(255,255,255,.75);
vertical-align: middle;
cursor: pointer;
- .buttonBackground(@btnBackground, @btnBackgroundHighlight);
+ .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
border: 1px solid @btnBorder;
*border: 0; // Remove the border to prevent IE7's black border on input:focus
border-bottom-color: darken(@btnBorder, 10%);
.border-radius(4px);
.ie7-restore-left-whitespace(); // Give IE7 some love
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
-}
-// Hover state
-.btn:hover {
- color: @grayDark;
- text-decoration: none;
- background-color: darken(@white, 10%);
- *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
- background-position: 0 -15px;
+ // Hover state
+ &:hover {
+ color: @grayDark;
+ text-decoration: none;
+ background-color: darken(@white, 10%);
+ *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
+ background-position: 0 -15px;
+
+ // transition is only when going to hover, otherwise the background
+ // behind the gradient (there for IE<=9 fallback) gets mismatched
+ .transition(background-position .1s linear);
+ }
- // transition is only when going to hover, otherwise the background
- // behind the gradient (there for IE<=9 fallback) gets mismatched
- .transition(background-position .1s linear);
-}
+ // Focus state for keyboard and accessibility
+ &:focus {
+ .tab-focus();
+ }
-// Focus state for keyboard and accessibility
-.btn:focus {
- .tab-focus();
-}
+ // Active state
+ &.active,
+ &:active {
+ background-color: darken(@white, 10%);
+ background-color: darken(@white, 15%) e("\9");
+ background-image: none;
+ outline: 0;
+ .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
+ }
-// Active state
-.btn.active,
-.btn:active {
- background-color: darken(@white, 10%);
- background-color: darken(@white, 15%) e("\9");
- background-image: none;
- outline: 0;
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
-}
+ // Disabled state
+ &.disabled,
+ &[disabled] {
+ cursor: default;
+ background-color: darken(@white, 10%);
+ background-image: none;
+ .opacity(65);
+ .box-shadow(none);
+ }
-// Disabled state
-.btn.disabled,
-.btn[disabled] {
- cursor: default;
- background-color: darken(@white, 10%);
- background-image: none;
- .opacity(65);
- .box-shadow(none);
}
+
// Button Sizes
// --------------------------------------------------
@@ -78,47 +79,42 @@
.border-radius(5px);
}
.btn-large [class^="icon-"] {
- margin-top: 1px;
+ margin-top: 2px;
}
// Small
.btn-small {
- padding: 5px 9px;
+ padding: 3px 9px;
font-size: @baseFontSize - 2px;
line-height: @baseLineHeight - 2px;
}
.btn-small [class^="icon-"] {
- margin-top: -1px;
+ margin-top: 0;
}
// Mini
.btn-mini {
padding: 2px 6px;
- font-size: @baseFontSize - 2px;
+ font-size: @baseFontSize - 3px;
line-height: @baseLineHeight - 4px;
}
+// Block button
+.btn-block {
+ display: block;
+ width: 100%;
+ padding-left: 0;
+ padding-right: 0;
+ .box-sizing(border-box);
+}
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+
// Alternate buttons
// --------------------------------------------------
-// Set text color
-// -------------------------
-.btn-primary,
-.btn-primary:hover,
-.btn-warning,
-.btn-warning:hover,
-.btn-danger,
-.btn-danger:hover,
-.btn-success,
-.btn-success:hover,
-.btn-info,
-.btn-info:hover,
-.btn-inverse,
-.btn-inverse:hover {
- color: @white;
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
-}
// Provide *some* extra contrast for those who can get it
.btn-primary.active,
.btn-warning.active,
@@ -133,8 +129,8 @@
// -------------------------
.btn {
// reset here as of 2.0.3 due to Recess property order
- border-color: #ccc;
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
+ border-color: #c5c5c5;
+ border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
}
.btn-primary {
.buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
@@ -174,8 +170,9 @@ input[type="submit"].btn {
}
// IE7 has some default padding on button controls
- *padding-top: 2px;
- *padding-bottom: 2px;
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+
&.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
@@ -189,3 +186,26 @@ input[type="submit"].btn {
*padding-bottom: 1px;
}
}
+
+
+// Link buttons
+// --------------------------------------------------
+
+// Make a button look and behave like a link
+.btn-link,
+.btn-link:active {
+ background-color: transparent;
+ background-image: none;
+ .box-shadow(none);
+}
+.btn-link {
+ border-color: transparent;
+ cursor: pointer;
+ color: @linkColor;
+ .border-radius(0);
+}
+.btn-link:hover {
+ color: @linkColorHover;
+ text-decoration: underline;
+ background-color: transparent;
+}
View
16 vendor/frameworks/twitter/bootstrap/carousel.less
@@ -1,5 +1,7 @@
-// CAROUSEL
-// --------
+//
+// Carousel
+// --------------------------------------------------
+
.carousel {
position: relative;
@@ -103,6 +105,7 @@
}
}
+
// Caption for text below images
// -----------------------------
@@ -111,11 +114,18 @@
left: 0;
right: 0;
bottom: 0;
- padding: 10px 15px 5px;
+ padding: 15px;
background: @grayDark;
background: rgba(0,0,0,.75);
}
.carousel-caption h4,
.carousel-caption p {
color: @white;
+ line-height: @baseLineHeight;
+}
+.carousel-caption h4 {
+ margin: 0 0 5px;
+}
+.carousel-caption p {
+ margin-bottom: 0;
}
View
6 vendor/frameworks/twitter/bootstrap/close.less
@@ -1,5 +1,7 @@
-// CLOSE ICONS
-// -----------
+//
+// Close icons
+// --------------------------------------------------
+
.close {
float: right;
View
11 vendor/frameworks/twitter/bootstrap/code.less
@@ -1,13 +1,14 @@
-// Code.less
-// Code typography styles for the <code> and <pre> elements
-// --------------------------------------------------------
+//
+// Code (inline and blocK)
+// --------------------------------------------------
+
// Inline and block code styles
code,
pre {
padding: 0 3px 2px;
#font > #family > .monospace;
- font-size: @baseFontSize - 1;
+ font-size: @baseFontSize - 2;
color: @grayDark;
.border-radius(3px);
}
@@ -25,7 +26,7 @@ pre {
display: block;
padding: (@baseLineHeight - 1) / 2;
margin: 0 0 @baseLineHeight / 2;
- font-size: @baseFontSize * .925; // 13px to 12px
+ font-size: @baseFontSize - 1; // 14px to 13px
line-height: @baseLineHeight;
word-break: break-all;
word-wrap: break-word;
View
7 vendor/frameworks/twitter/bootstrap/component-animations.less
@@ -1,5 +1,7 @@
-// COMPONENT ANIMATIONS
-// --------------------
+//
+// Component animations
+// --------------------------------------------------
+
.fade {
opacity: 0;
@@ -13,6 +15,7 @@
position: relative;
height: 0;
overflow: hidden;
+ overflow: visible \9;
.transition(height .35s ease);
&.in {
height: auto;
View
95 vendor/frameworks/twitter/bootstrap/dropdowns.less
@@ -1,5 +1,7 @@
-// DROPDOWN MENUS
-// --------------
+//
+// Dropdown menus
+// --------------------------------------------------
+
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
.dropup,
@@ -26,18 +28,13 @@
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
- .opacity(30);
}
// Place the caret
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
-.dropdown:hover .caret,
-.open .caret {
- .opacity(100);
-}
// The dropdown menu (ul)
// ----------------------
@@ -49,15 +46,15 @@
display: none; // none by default, but block on "open" of the menu
float: left;
min-width: 160px;
- padding: 4px 0;
- margin: 1px 0 0; // override default ul
+ padding: 5px 0;
+ margin: 2px 0 0; // override default ul
list-style: none;
background-color: @dropdownBackground;
- border: 1px solid #ccc;
- border: 1px solid rgba(0,0,0,.2);
+ border: 1px solid #ccc; // Fallback for IE7-8
+ border: 1px solid @dropdownBorder;
*border-right-width: 2px;
*border-bottom-width: 2px;
- .border-radius(5px);
+ .border-radius(6px);
.box-shadow(0 5px 10px rgba(0,0,0,.2));
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
@@ -77,7 +74,7 @@
// Links within the dropdown menu
a {
display: block;
- padding: 3px 15px;
+ padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: @baseLineHeight;
@@ -89,11 +86,37 @@
// Hover state
// -----------
.dropdown-menu li > a:hover,
+.dropdown-menu li > a:focus,
+.dropdown-submenu:hover > a {
+ text-decoration: none;
+ color: @dropdownLinkColorHover;
+ background-color: @dropdownLinkBackgroundHover;
+ #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
+}
+
+// Active state
+// ------------
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
color: @dropdownLinkColorHover;
text-decoration: none;
- background-color: @dropdownLinkBackgroundHover;
+ outline: 0;
+ background-color: @dropdownLinkBackgroundActive;
+ #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%));
+}
+
+// Disabled state
+// --------------
+// Gray out text and ensure the hover state remains gray
+.dropdown-menu .disabled > a,
+.dropdown-menu .disabled > a:hover {
+ color: @grayLight;
+}
+// Nuke hover effects
+.dropdown-menu .disabled > a:hover {
+ text-decoration: none;
+ background-color: transparent;
+ cursor: default;
}
// Open state for the dropdown
@@ -135,6 +158,50 @@
}
}
+// Sub menus
+// ---------------------------
+.dropdown-submenu {
+ position: relative;
+}
+.dropdown-submenu > .dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -6px;
+ margin-left: -1px;
+ -webkit-border-radius: 0 6px 6px 6px;
+ -moz-border-radius: 0 6px 6px 6px;
+ border-radius: 0 6px 6px 6px;
+}
+.dropdown-submenu:hover .dropdown-menu {
+ display: block;
+}
+
+.dropdown-submenu > a:after {
+ display: block;
+ content: " ";
+ float: right;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 5px 0 5px 5px;
+ border-left-color: darken(@dropdownBackground, 20%);
+ margin-top: 5px;
+ margin-right: -10px;
+}
+.dropdown-submenu:hover > a:after {
+ border-left-color: @dropdownLinkColorHover;
+}
+
+
+// Tweak nav headers
+// -----------------
+// Increase padding from 15px to 20px on sides
+.dropdown .dropdown-menu .nav-header {
+ padding-left: 20px;
+ padding-right: 20px;
+}
+
// Typeahead
// ---------
.typeahead {
View
148 vendor/frameworks/twitter/bootstrap/forms.less
@@ -1,6 +1,6 @@
-// Forms.less
-// Base styles for various input types, form layouts, and states
-// -------------------------------------------------------------
+//
+// Forms
+// --------------------------------------------------
// GENERAL STYLES
@@ -22,7 +22,7 @@ legend {
display: block;
width: 100%;
padding: 0;
- margin-bottom: @baseLineHeight * 1.5;
+ margin-bottom: @baseLineHeight;
font-size: @baseFontSize * 1.5;
line-height: @baseLineHeight * 2;
color: @grayDark;
@@ -80,11 +80,12 @@ input[type="color"],
.uneditable-input {
display: inline-block;
height: @baseLineHeight;
- padding: 4px;
+ padding: 4px 6px;
margin-bottom: 9px;
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @gray;
+ .border-radius(@inputBorderRadius);
}
// Reset appearance properties for textual inputs and textarea
@@ -116,10 +117,8 @@ input[type="color"],
.uneditable-input {
background-color: @inputBackground;
border: 1px solid @inputBorder;
- .border-radius(@inputBorderRadius);
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
- @transition: border linear .2s, box-shadow linear .2s;
- .transition(@transition);
+ .transition(~"border linear .2s, box-shadow linear .2s");
// Focus state
&:focus {
@@ -133,13 +132,16 @@ input[type="color"],
// Position radios and checkboxes better
input[type="radio"],
input[type="checkbox"] {
- margin: 3px 0;
+ margin: 4px 0 0;
*margin-top: 0; /* IE7 */
+ margin-top: 1px \9; /* IE8-9 */
line-height: normal;
cursor: pointer;
}
-// Reset width of input buttons, radios, checkboxes
+// Reset width of input images, buttons, radios, checkboxes
+input[type="file"],
+input[type="image"],
input[type="submit"],
input[type="reset"],
input[type="button"],
@@ -148,24 +150,19 @@ input[type="checkbox"] {
width: auto; // Override of generic input selector
}
-// Make uneditable textareas behave like a textarea
-.uneditable-textarea {
- width: auto;
- height: auto;
-}
-
// Set the height of select and file controls to match text inputs
select,
input[type="file"] {
- height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
+ height: 30px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
- line-height: 28px;
+ line-height: 30px;
}
// Make select elements obey height by applying a border
select {
width: 220px; // default input width + 10px of padding that doesn't get applied
border: 1px solid #bbb;
+ background-color: @inputBackground; // Chrome on Linux and Mobile Safari need background-color
}
// Make multiple select elements height not fixed
@@ -183,6 +180,41 @@ input[type="checkbox"]:focus {
}
+// Uneditable inputs
+// -------------------------
+
+// Make uneditable inputs look inactive
+.uneditable-input,
+.uneditable-textarea {
+ color: @grayLight;
+ background-color: darken(@inputBackground, 1%);
+ border-color: @inputBorder;
+ .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
+ cursor: not-allowed;
+}
+
+// For text that needs to appear as an input but should not be an input
+.uneditable-input {
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
+ white-space: nowrap;
+}
+
+// Make uneditable textareas behave like a textarea
+.uneditable-textarea {
+ width: auto;
+ height: auto;
+}
+
+
+// Placeholder
+// -------------------------
+
+// Placeholder text gets special styles; can't be bundled together though for some reason
+input,
+textarea {
+ .placeholder();