Permalink
Browse files

upgrade to bootstrap-sass 2.3.0

  • Loading branch information...
1 parent 0a4f466 commit 3a214c120e1dd0e4a602ceb55baff32f5c9ef389 @clkao committed Feb 16, 2013
Showing with 978 additions and 433 deletions.
  1. +48 −0 app/styles/_responsive.scss
  2. +13 −10 app/styles/app.scss
  3. +12 −1 vendor/scripts/bootstrap/bootstrap-affix.js
  4. +12 −1 vendor/scripts/bootstrap/bootstrap-alert.js
  5. +12 −1 vendor/scripts/bootstrap/bootstrap-button.js
  6. +41 −10 vendor/scripts/bootstrap/bootstrap-carousel.js
  7. +18 −7 vendor/scripts/bootstrap/bootstrap-collapse.js
  8. +28 −11 vendor/scripts/bootstrap/bootstrap-dropdown.js
  9. +24 −11 vendor/scripts/bootstrap/bootstrap-modal.js
  10. +17 −6 vendor/scripts/bootstrap/bootstrap-popover.js
  11. +13 −2 vendor/scripts/bootstrap/bootstrap-scrollspy.js
  12. +12 −1 vendor/scripts/bootstrap/bootstrap-tab.js
  13. +106 −29 vendor/scripts/bootstrap/bootstrap-tooltip.js
  14. +1 −1 vendor/scripts/bootstrap/bootstrap-transition.js
  15. +38 −13 vendor/scripts/bootstrap/bootstrap-typeahead.js
  16. +14 −0 vendor/styles/bootstrap/_alerts.scss
  17. +5 −5 vendor/styles/bootstrap/_breadcrumbs.scss
  18. +31 −44 vendor/styles/bootstrap/_button-groups.scss
  19. +13 −17 vendor/styles/bootstrap/_buttons.scss
  20. +47 −20 vendor/styles/bootstrap/_carousel.scss
  21. +2 −1 vendor/styles/bootstrap/_close.scss
  22. +3 −0 vendor/styles/bootstrap/_code.scss
  23. +21 −21 vendor/styles/bootstrap/_dropdowns.scss
  24. +17 −10 vendor/styles/bootstrap/_forms.scss
  25. +29 −17 vendor/styles/bootstrap/_labels-badges.scss
  26. +2 −2 vendor/styles/bootstrap/_media.scss
  27. +9 −3 vendor/styles/bootstrap/_mixins.scss
  28. +4 −4 vendor/styles/bootstrap/_modals.scss
  29. +36 −11 vendor/styles/bootstrap/_navbar.scss
  30. +45 −21 vendor/styles/bootstrap/_navs.scss
  31. +3 −1 vendor/styles/bootstrap/_pager.scss
  32. +3 −1 vendor/styles/bootstrap/_pagination.scss
  33. +55 −39 vendor/styles/bootstrap/_popovers.scss
  34. +82 −4 vendor/styles/bootstrap/_reset.scss
  35. +6 −2 vendor/styles/bootstrap/_responsive-navbar.scss
  36. +29 −13 vendor/styles/bootstrap/_responsive-utilities.scss
  37. +2 −1 vendor/styles/bootstrap/_scaffolding.scss
  38. +7 −3 vendor/styles/bootstrap/_sprites.scss
  39. +55 −47 vendor/styles/bootstrap/_tables.scss
  40. +3 −2 vendor/styles/bootstrap/_thumbnails.scss
  41. +6 −6 vendor/styles/bootstrap/_tooltip.scss
  42. +45 −25 vendor/styles/bootstrap/_type.scss
  43. +9 −9 vendor/styles/bootstrap/_variables.scss
@@ -0,0 +1,48 @@
+/*!
+ * Bootstrap Responsive v2.3.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+
+// Responsive
+// For phone and tablet devices
+// -------------------------------------------------------------
+
+
+// REPEAT VARIABLES & MIXINS
+// -------------------------
+// Required since we compile the responsive stuff separately
+
+@import "vendor/styles/bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
+@import "vendor/styles/bootstrap/mixins";
+
+
+// RESPONSIVE CLASSES
+// ------------------
+
+@import "vendor/styles/bootstrap/responsive-utilities";
+
+
+// MEDIA QUERIES
+// ------------------
+
+// Large desktops
+@import "vendor/styles/bootstrap/responsive-1200px-min";
+
+// Tablets to regular desktops
+@import "vendor/styles/bootstrap/responsive-768px-979px";
+
+// Phones to portrait tablets and narrow desktops
+@import "vendor/styles/bootstrap/responsive-767px-max";
+
+
+// RESPONSIVE NAVBAR
+// ------------------
+
+// From 979px and below, show a button to toggle navbar contents
+@import "vendor/styles/bootstrap/responsive-navbar";
View
@@ -1,12 +1,12 @@
-//
-// Bootstrap v2.2.1
-//
-// Copyright 2012 Twitter, Inc
-// Licensed under the Apache License v2.0
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Designed and built with all the love in the world @twitter by @mdo and @fat.
-// Converted to Sass by @thomasmcdonald_, and distributed as bootstrap-sass
+/*!
+ * Bootstrap v2.3.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
// Core variables and mixins
@import "vendor/styles/bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
@@ -36,7 +36,7 @@
// Components: Buttons & Alerts
@import "vendor/styles/bootstrap/buttons";
@import "vendor/styles/bootstrap/button-groups";
-@import "vendor/styles/bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in _buttons.scss
+@import "vendor/styles/bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons
// Components: Nav
@import "vendor/styles/bootstrap/navs";
@@ -61,3 +61,6 @@
// Utility classes
@import "vendor/styles/bootstrap/utilities"; // Has to be last to override when necessary
+
+// Enable Responsive
+//@import "_responsive";
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-affix.js v2.2.1
+ * bootstrap-affix.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -68,6 +68,8 @@
/* AFFIX PLUGIN DEFINITION
* ======================= */
+ var old = $.fn.affix
+
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
@@ -85,6 +87,15 @@
}
+ /* AFFIX NO CONFLICT
+ * ================= */
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
/* AFFIX DATA-API
* ============== */
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alert.js v2.2.1
+ * bootstrap-alert.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -68,6 +68,8 @@
/* ALERT PLUGIN DEFINITION
* ======================= */
+ var old = $.fn.alert
+
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
@@ -80,6 +82,15 @@
$.fn.alert.Constructor = Alert
+ /* ALERT NO CONFLICT
+ * ================= */
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
/* ALERT DATA-API
* ============== */
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-button.js v2.2.1
+ * bootstrap-button.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
@@ -64,6 +64,8 @@
/* BUTTON PLUGIN DEFINITION
* ======================== */
+ var old = $.fn.button
+
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
@@ -82,6 +84,15 @@
$.fn.button.Constructor = Button
+ /* BUTTON NO CONFLICT
+ * ================== */
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
/* BUTTON DATA-API
* =============== */
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-carousel.js v2.2.1
+ * bootstrap-carousel.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -28,8 +28,8 @@
var Carousel = function (element, options) {
this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
- this.options.slide && this.slide(this.options.slide)
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
@@ -39,31 +39,36 @@
cycle: function (e) {
if (!e) this.paused = false
+ if (this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
+ , getActiveIndex: function () {
+ this.$active = this.$element.find('.item.active')
+ this.$items = this.$active.parent().children()
+ return this.$items.index(this.$active)
+ }
+
, to: function (pos) {
- var $active = this.$element.find('.item.active')
- , children = $active.parent().children()
- , activePos = children.index($active)
+ var activeIndex = this.getActiveIndex()
, that = this
- if (pos > (children.length - 1) || pos < 0) return
+ if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
- if (activePos == pos) {
+ if (activeIndex == pos) {
return this.pause().cycle()
}
- return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
, pause: function (e) {
@@ -104,10 +109,19 @@
e = $.Event('slide', {
relatedTarget: $next[0]
+ , direction: direction
})
if ($next.hasClass('active')) return
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ this.$element.one('slid', function () {
+ var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+ $nextIndicator && $nextIndicator.addClass('active')
+ })
+ }
+
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
@@ -141,6 +155,8 @@
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
+ var old = $.fn.carousel
+
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
@@ -150,7 +166,7 @@
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
- else if (options.interval) data.cycle()
+ else if (options.interval) data.pause().cycle()
})
}
@@ -162,14 +178,29 @@
$.fn.carousel.Constructor = Carousel
+ /* CAROUSEL NO CONFLICT
+ * ==================== */
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
/* CAROUSEL DATA-API
* ================= */
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
$target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
e.preventDefault()
})
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-collapse.js v2.2.1
+ * bootstrap-collapse.js v2.3.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
@@ -52,7 +52,7 @@
, actives
, hasData
- if (this.transitioning) return
+ if (this.transitioning || this.$element.hasClass('in')) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
@@ -72,7 +72,7 @@
, hide: function () {
var dimension
- if (this.transitioning) return
+ if (this.transitioning || !this.$element.hasClass('in')) return
dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
@@ -120,14 +120,16 @@
}
- /* COLLAPSIBLE PLUGIN DEFINITION
- * ============================== */
+ /* COLLAPSE PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
- , options = typeof option == 'object' && option
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
@@ -140,9 +142,18 @@
$.fn.collapse.Constructor = Collapse
- /* COLLAPSIBLE DATA-API
+ /* COLLAPSE NO CONFLICT
* ==================== */
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ /* COLLAPSE DATA-API
+ * ================= */
+
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')
Oops, something went wrong.

0 comments on commit 3a214c1

Please sign in to comment.