Permalink
Browse files

merge conflict resolved

  • Loading branch information...
2 parents 3951063 + 3706ccb commit cd1cfeab50f9cb7b471206767694c53b2b142736 @toadkicker toadkicker committed Oct 31, 2012
Showing with 569 additions and 335 deletions.
  1. +2 −1 README.md
  2. +5 −1 lib/generators/bootstrap/install/install_generator.rb
  3. +5 −0 lib/generators/bootstrap/install/templates/bootstrap.js
  4. +3 −0 lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less
  5. +1 −1 lib/twitter/bootstrap/rails/version.rb
  6. +31 −32 twitter-bootstrap-rails.gemspec
  7. +4 −2 vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js
  8. +2 −4 vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js
  9. +5 −7 vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js
  10. +12 −12 vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js
  11. +9 −11 vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js
  12. +9 −11 vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js
  13. +20 −25 vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js
  14. +1 −1 vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js
  15. +1 −1 vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js
  16. +5 −7 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js
  17. +12 −11 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js
  18. +5 −5 vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js
  19. +19 −9 vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js
  20. +6 −5 vendor/toolkit/fontawesome.less
  21. +1 −1 vendor/toolkit/twitter/bootstrap/accordion.less
  22. +1 −1 vendor/toolkit/twitter/bootstrap/alerts.less
  23. +2 −2 vendor/toolkit/twitter/bootstrap/bootstrap.less
  24. +1 −1 vendor/toolkit/twitter/bootstrap/breadcrumbs.less
  25. +5 −8 vendor/toolkit/twitter/bootstrap/button-groups.less
  26. +17 −16 vendor/toolkit/twitter/bootstrap/buttons.less
  27. +1 −1 vendor/toolkit/twitter/bootstrap/code.less
  28. +32 −5 vendor/toolkit/twitter/bootstrap/dropdowns.less
  29. +47 −14 vendor/toolkit/twitter/bootstrap/forms.less
  30. +6 −5 vendor/toolkit/twitter/bootstrap/hero-unit.less
  31. +4 −2 vendor/toolkit/twitter/bootstrap/labels-badges.less
  32. +55 −0 vendor/toolkit/twitter/bootstrap/media.less
  33. +15 −10 vendor/toolkit/twitter/bootstrap/mixins.less
  34. +7 −11 vendor/toolkit/twitter/bootstrap/modals.less
  35. +6 −6 vendor/toolkit/twitter/bootstrap/navbar.less
  36. +3 −2 vendor/toolkit/twitter/bootstrap/navs.less
  37. +10 −9 vendor/toolkit/twitter/bootstrap/pager.less
  38. +69 −12 vendor/toolkit/twitter/bootstrap/pagination.less
  39. +2 −2 vendor/toolkit/twitter/bootstrap/popovers.less
  40. +2 −2 vendor/toolkit/twitter/bootstrap/progress-bars.less
  41. +5 −4 vendor/toolkit/twitter/bootstrap/reset.less
  42. +20 −1 vendor/toolkit/twitter/bootstrap/responsive-767px-max.less
  43. +12 −4 vendor/toolkit/twitter/bootstrap/responsive-navbar.less
  44. +1 −1 vendor/toolkit/twitter/bootstrap/responsive.less
  45. +10 −10 vendor/toolkit/twitter/bootstrap/sprites.less
  46. +20 −29 vendor/toolkit/twitter/bootstrap/tables.less
  47. +1 −1 vendor/toolkit/twitter/bootstrap/thumbnails.less
  48. +1 −1 vendor/toolkit/twitter/bootstrap/tooltip.less
  49. +30 −24 vendor/toolkit/twitter/bootstrap/type.less
  50. +23 −1 vendor/toolkit/twitter/bootstrap/variables.less
  51. +3 −3 vendor/toolkit/twitter/bootstrap/wells.less
View
@@ -70,7 +70,7 @@ Layout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supporte
Usage:
- rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
+ rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
Example:
@@ -203,6 +203,7 @@ gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootst
<li>Released gem v.2.1.2 (minor fixes and updated to Twitter Bootstrap 2.1.0)</li>
<li>Released gem v.2.1.3 (minor fixes and updated to Twitter Bootstrap 2.1.1)</li>
<li>Released gem v.2.1.4 (minor fixes)</li>
+ <li>Released gem v.2.1.5 (minor fixes, install generator detects javascript template engine, updated to Twitter Bootstrap 2.2.1)</li>
</ul>
@@ -31,7 +31,11 @@ def add_assets
end
def add_bootstrap
- copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
+ if Rails.configuration.app_generators.rails[:javascript_engine] == :coffee
+ copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
+ else
+ copy_file "bootstrap.js", "app/assets/javascripts/bootstrap.js"
+ end
copy_file "bootstrap_and_overrides.less", "app/assets/stylesheets/bootstrap_and_overrides.css.less"
end
@@ -0,0 +1,5 @@
+jQuery(function() {
+ $("a[rel=popover]").popover();
+ $(".tooltip").tooltip();
+ $("a[rel=tooltip]").tooltip();
+});
@@ -16,6 +16,9 @@
// Font Awesome
@import "fontawesome";
+// Glyphicons
+//@import "twitter/bootstrap/sprites.less";
+
// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
@@ -1,7 +1,7 @@
module Twitter
module Bootstrap
module Rails
- VERSION = "2.1.4"
+ VERSION = "2.1.5"
end
end
end
@@ -1,34 +1,33 @@
-# -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
-require "twitter/bootstrap/rails/version"
-
-Gem::Specification.new do |s|
- s.name = "twitter-bootstrap-rails"
- s.version = Twitter::Bootstrap::Rails::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["Seyhun Akyurek"]
- s.email = ["seyhunak@gmail.com"]
- s.homepage = "https://github.com/seyhunak/twitter-bootstrap-rails"
- s.summary = %q{Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
- s.description = %q{twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
-
- s.rubyforge_project = "twitter-bootstrap-rails"
- s.files = Dir["lib/**/*"] + Dir["vendor/**/*"] + Dir["app/**/*"] + ["Rakefile", "README.md"]
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.require_paths = ["lib"]
-
- s.add_dependency 'railties', '>= 3.1'
- s.add_dependency 'actionpack', '>= 3.1'
+$:.push File.expand_path("../lib", __FILE__)
+require "twitter/bootstrap/rails/version"
+
+Gem::Specification.new do |s|
+ s.name = "twitter-bootstrap-rails"
+ s.version = Twitter::Bootstrap::Rails::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Seyhun Akyurek"]
+ s.email = ["seyhunak@gmail.com"]
+ s.homepage = "https://github.com/seyhunak/twitter-bootstrap-rails"
+ s.summary = %q{Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
+ s.description = %q{twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
+
+ s.rubyforge_project = "twitter-bootstrap-rails"
+ s.files = Dir["lib/**/*"] + Dir["vendor/**/*"] + Dir["app/**/*"] + ["Rakefile", "README.md"]
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_dependency 'railties', '>= 3.1'
+ s.add_dependency 'actionpack', '>= 3.1'
s.add_runtime_dependency 'execjs'
- s.add_development_dependency 'rails', '>= 3.1'
- s.post_install_message = "Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS. \n\n" \
- "**********************************************\n\n" \
- "ExecJS supports these runtimes:\n\n" \
- "therubyracer - Google V8 embedded within Ruby\n\n" \
- "therubyrhino - Mozilla Rhino embedded within JRuby\n\n" \
+ s.add_development_dependency 'rails', '>= 3.1'
+ s.post_install_message = "Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS. \n\n" \
+ "**********************************************\n\n" \
+ "ExecJS supports these runtimes:\n\n" \
+ "therubyracer - Google V8 embedded within Ruby\n\n" \
+ "therubyrhino - Mozilla Rhino embedded within JRuby\n\n" \
"Node.js\n\n" \
- "Apple JavaScriptCore - Included with Mac OS X\n\n" \
- "Microsoft Windows Script Host (JScript)\n\n" \
- "**********************************************"
-end
+ "Apple JavaScriptCore - Included with Mac OS X\n\n" \
+ "Microsoft Windows Script Host (JScript)\n\n" \
+ "**********************************************"
+end
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-affix.js v2.1.1
+ * bootstrap-affix.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -28,7 +28,9 @@
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.$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.checkPosition()
}
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alert.js v2.1.1
+ * bootstrap-alert.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -83,8 +83,6 @@
/* ALERT DATA-API
* ============== */
- $(function () {
- $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
- })
+ $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-button.js v2.1.1
+ * bootstrap-button.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
@@ -85,12 +85,10 @@
/* BUTTON DATA-API
* =============== */
- $(function () {
- $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- $btn.button('toggle')
- })
+ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
})
}(window.jQuery);
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-carousel.js v2.1.1
+ * bootstrap-carousel.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
@@ -94,16 +94,18 @@
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
- , e = $.Event('slide', {
- relatedTarget: $next[0]
- })
+ , e
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
+ e = $.Event('slide', {
+ relatedTarget: $next[0]
+ })
+
if ($next.hasClass('active')) return
if ($.support.transition && this.$element.hasClass('slide')) {
@@ -163,14 +165,12 @@
/* CAROUSEL DATA-API
* ================= */
- $(function () {
- $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
- $target.carousel(options)
- e.preventDefault()
- })
+ $(document).on('click.carousel.data-api', '[data-slide]', 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())
+ $target.carousel(options)
+ e.preventDefault()
})
}(window.jQuery);
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-collapse.js v2.1.1
+ * bootstrap-collapse.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
@@ -143,16 +143,14 @@
/* COLLAPSIBLE DATA-API
* ==================== */
- $(function () {
- $('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)
- })
+ $(document).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)
})
}(window.jQuery);
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-dropdown.js v2.1.1
+ * bootstrap-dropdown.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
@@ -100,8 +100,9 @@
}
function clearMenus() {
- getParent($(toggle))
- .removeClass('open')
+ $(toggle).each(function () {
+ getParent($(this)).removeClass('open')
+ })
}
function getParent($this) {
@@ -138,13 +139,10 @@
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
- $(function () {
- $('html')
- .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
- $('body')
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', 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)
- })
+ $(document)
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
+ .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', 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);
@@ -1,5 +1,5 @@
/* =========================================================
- * bootstrap-modal.js v2.1.1
+ * bootstrap-modal.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
@@ -49,8 +49,6 @@
if (this.isShown || e.isDefaultPrevented()) return
- $('body').addClass('modal-open')
-
this.isShown = true
this.escape()
@@ -72,13 +70,12 @@
that.$element
.addClass('in')
.attr('aria-hidden', false)
- .focus()
that.enforceFocus()
transition ?
- that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
- that.$element.trigger('shown')
+ that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
+ that.$element.focus().trigger('shown')
})
}
@@ -96,8 +93,6 @@
this.isShown = false
- $('body').removeClass('modal-open')
-
this.escape()
$(document).off('focusin.modal')
@@ -167,9 +162,11 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
- if (this.options.backdrop != 'static') {
- this.$backdrop.click($.proxy(this.hide, this))
- }
+ this.$backdrop.click(
+ this.options.backdrop == 'static' ?
+ $.proxy(this.$element[0].focus, this.$element[0])
+ : $.proxy(this.hide, this)
+ )
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
@@ -219,21 +216,19 @@
/* MODAL DATA-API
* ============== */
- $(function () {
- $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
- 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())
+ $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+ 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()
+ e.preventDefault()
- $target
- .modal(option)
- .one('hide', function () {
- $this.focus()
- })
- })
+ $target
+ .modal(option)
+ .one('hide', function () {
+ $this.focus()
+ })
})
-}(window.jQuery);
+}(window.jQuery);
Oops, something went wrong.

0 comments on commit cd1cfea

Please sign in to comment.