Skip to content
Browse files

Merge branch 'master' of git://github.com/seyhunak/twitter-bootstrap-…

…rails
  • Loading branch information...
2 parents 7b171cf + ac20f06 commit 8fb51222a3acd57f848903d93ea096aebefcd0a9 @maukoquiroga maukoquiroga committed Sep 28, 2012
Showing with 2,302 additions and 1,060 deletions.
  1. +5 −2 README.md
  2. +12 −0 app/helpers/glyph_helper.rb
  3. +3 −3 app/views/twitter-bootstrap/_breadcrumbs.html.erb
  4. +8 −12 lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less
  5. +15 −17 lib/generators/bootstrap/layout/templates/layout.html.erb
  6. +12 −13 lib/generators/bootstrap/layout/templates/layout.html.haml
  7. +12 −13 lib/generators/bootstrap/layout/templates/layout.html.slim
  8. +1 −1 lib/twitter/bootstrap/rails/version.rb
  9. +5 −5 twitter-bootstrap-rails.gemspec
  10. BIN vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png
  11. +1 −0 vendor/assets/javascripts/twitter/bootstrap.js
  12. +104 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js
  13. +1 −1 vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js
  14. +2 −2 vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js
  15. +12 −5 vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js
  16. +4 −3 vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js
  17. +66 −16 vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js
  18. +95 −74 vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js
  19. +9 −4 vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js
  20. +9 −9 vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js
  21. +2 −2 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js
  22. +15 −15 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js
  23. +2 −3 vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js
  24. +52 −41 vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js
  25. +245 −0 vendor/toolkit/font-awesome-ie7.less
  26. +7 −24 vendor/toolkit/fontawesome.less
  27. +3 −2 vendor/toolkit/twitter/bootstrap/accordion.less
  28. +16 −9 vendor/toolkit/twitter/bootstrap/alerts.less
  29. +1 −1 vendor/toolkit/twitter/bootstrap/bootstrap.less
  30. +10 −10 vendor/toolkit/twitter/bootstrap/breadcrumbs.less
  31. +79 −25 vendor/toolkit/twitter/bootstrap/button-groups.less
  32. +107 −67 vendor/toolkit/twitter/bootstrap/buttons.less
  33. +13 −3 vendor/toolkit/twitter/bootstrap/carousel.less
  34. +4 −2 vendor/toolkit/twitter/bootstrap/close.less
  35. +6 −5 vendor/toolkit/twitter/bootstrap/code.less
  36. +4 −2 vendor/toolkit/twitter/bootstrap/component-animations.less
  37. +82 −15 vendor/toolkit/twitter/bootstrap/dropdowns.less
  38. +124 −57 vendor/toolkit/twitter/bootstrap/forms.less
  39. +17 −1 vendor/toolkit/twitter/bootstrap/grid.less
  40. +4 −2 vendor/toolkit/twitter/bootstrap/hero-unit.less
  41. +19 −2 vendor/toolkit/twitter/bootstrap/labels-badges.less
  42. +1 −2 vendor/toolkit/twitter/bootstrap/layouts.less
  43. +112 −77 vendor/toolkit/twitter/bootstrap/mixins.less
  44. +12 −4 vendor/toolkit/twitter/bootstrap/modals.less
  45. +245 −128 vendor/toolkit/twitter/bootstrap/navbar.less
  46. +38 −17 vendor/toolkit/twitter/bootstrap/navs.less
  47. +11 −7 vendor/toolkit/twitter/bootstrap/pager.less
  48. +23 −15 vendor/toolkit/twitter/bootstrap/pagination.less
  49. +101 −33 vendor/toolkit/twitter/bootstrap/popovers.less
  50. +18 −13 vendor/toolkit/twitter/bootstrap/progress-bars.less
  51. +10 −4 vendor/toolkit/twitter/bootstrap/reset.less
  52. +9 −7 vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less
  53. +95 −70 vendor/toolkit/twitter/bootstrap/responsive-767px-max.less
  54. +7 −5 vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less
  55. +30 −6 vendor/toolkit/twitter/bootstrap/responsive-navbar.less
  56. +17 −15 vendor/toolkit/twitter/bootstrap/responsive-utilities.less
  57. +5 −5 vendor/toolkit/twitter/bootstrap/responsive.less
  58. +27 −4 vendor/toolkit/twitter/bootstrap/scaffolding.less
  59. +21 −19 vendor/toolkit/twitter/bootstrap/sprites.less
  60. +81 −12 vendor/toolkit/twitter/bootstrap/tables.less
  61. +9 −4 vendor/toolkit/twitter/bootstrap/thumbnails.less
  62. +47 −12 vendor/toolkit/twitter/bootstrap/tooltip.less
  63. +75 −95 vendor/toolkit/twitter/bootstrap/type.less
  64. +9 −2 vendor/toolkit/twitter/bootstrap/utilities.less
  65. +104 −31 vendor/toolkit/twitter/bootstrap/variables.less
  66. +7 −5 vendor/toolkit/twitter/bootstrap/wells.less
View
7 README.md
@@ -5,7 +5,7 @@ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 A
[![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png)](http://travis-ci.org/seyhunak/twitter-bootstrap-rails)
[![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails)
-[![Code Climate](https://codeclimate.com/badge.png)](https://github.com/seyhunak/twitter-bootstrap-rails)
+[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/seyhunak/twitter-bootstrap-rails)
## Screencasts
#### Installing twitter-bootstrap-rails, generators, usage and more
@@ -83,7 +83,7 @@ Example:
rake db:migrate
rails g bootstrap:themed Posts
-
+Notice the plural usage of the resource to generate bootstrap:themed.
## Using with Less
@@ -188,6 +188,8 @@ gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootst
<li>Released gem v.2.1.0 (JRuby support)</li>
<li>Released gem v.2.1.1 (minor fixes)</li>
<li>Flash block message helper added</li>
+ <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>
</ul>
@@ -208,6 +210,7 @@ gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootst
<li>Sébastien Grosjean</li>
<li>Nick DeSteffen</li>
<li>Christian Joudrey</li>
+ <li>Todd Baur</li>
</ul>
View
12 app/helpers/glyph_helper.rb
@@ -0,0 +1,12 @@
+module GlyphHelper
+ # ==== Examples
+ # glyph(:share_alt)
+ # # => <i class="icon-share-alt"></i>
+ # glyph(:lock, :white)
+ # # => <i class="icon-lock icon-white"></i>
+
+ def glyph(*names)
+ content_tag :i, nil, class: names.map{|name| "icon-#{name.to_s.gsub('_','-')}" }
+ end
+end
+
View
6 app/views/twitter-bootstrap/_breadcrumbs.html.erb
@@ -3,12 +3,12 @@
<% separator = divider %>
<% @breadcrumbs[0..-2].each do |crumb| %>
<li>
- <%= link_to crumb[:name], crumb[:url], crumb[:options] %>
+ <%= link_to crumb[:name], crumb[:url], crumb[:options] %>
<span class="divider"><%= separator %></span>
</li>
<% end %>
<li class="active">
- <%= link_to @breadcrumbs.last[:name], @breadcrumbs.last[:url], @breadcrumbs.last[:options] %>
+ <%= @breadcrumbs.last[:name] %>
</li>
</ul>
-<% end %>
+<% end %>
View
20 lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less
@@ -1,21 +1,17 @@
@import "twitter/bootstrap/bootstrap";
-body {
- padding-top: 60px;
-}
-
@import "twitter/bootstrap/responsive";
// Set the correct sprite paths
-@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
-@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
+@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png");
+@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png");
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
-// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
+// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
// have the proper paths. So for now we use the absolute path.
-@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
-@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
-@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
-@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';
+@fontAwesomeEotPath: "/assets/fontawesome-webfont.eot";
+@fontAwesomeWoffPath: "/assets/fontawesome-webfont.woff";
+@fontAwesomeTtfPath: "/assets/fontawesome-webfont.ttf";
+@fontAwesomeSvgPath: "/assets/fontawesome-webfont.svg";
// Font Awesome
@import "fontawesome";
@@ -26,7 +22,7 @@ body {
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
-// See http://twitter.github.com/bootstrap/less.html for their names and documentation
+// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
//
// Example:
// @linkColor: #ff0000;
View
32 lib/generators/bootstrap/layout/templates/layout.html.erb
@@ -70,29 +70,27 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
- <%%= bootstap_flash %>
+ <%%= bootstrap_flash %>
<%%= yield %>
</div>
</div><!--/row-->
<%- else -%>
- <div class="content">
<div class="row">
- <div class="span9">
- <%%= yield %>
- </div>
- <div class="span3">
- <div class="well sidebar-nav">
- <h3>Sidebar</h3>
- <ul class="nav nav-list">
- <li class="nav-header">Sidebar</li>
- <li><%%= link_to "Link1", "/path1" %></li>
- <li><%%= link_to "Link2", "/path2" %></li>
- <li><%%= link_to "Link3", "/path3" %></li>
- </ul>
- </div><!--/.well -->
- </div><!--/span-->
+ <div class="span9">
+ <%%= yield %>
+ </div>
+ <div class="span3">
+ <div class="well sidebar-nav">
+ <h3>Sidebar</h3>
+ <ul class="nav nav-list">
+ <li class="nav-header">Sidebar</li>
+ <li><%%= link_to "Link1", "/path1" %></li>
+ <li><%%= link_to "Link2", "/path2" %></li>
+ <li><%%= link_to "Link3", "/path3" %></li>
+ </ul>
+ </div><!--/.well -->
+ </div><!--/span-->
</div><!--/row-->
- </div><!--/content-->
<%- end -%>
<footer>
View
25 lib/generators/bootstrap/layout/templates/layout.html.haml
@@ -46,19 +46,18 @@
.span9
= yield
<% else %>
- .content
- .row
- .span9
- = bootstap_flash
- = yield
- .span3
- .well.sidebar-nav
- %h3 Sidebar
- %ul.nav.nav-list
- %li.nav-header Sidebar
- %li= link_to "Link 1", "/path1"
- %li= link_to "Link 2", "/path2"
- %li= link_to "Link 3", "/path3"
+ .row
+ .span9
+ = bootstrap_flash
+ = yield
+ .span3
+ .well.sidebar-nav
+ %h3 Sidebar
+ %ul.nav.nav-list
+ %li.nav-header Sidebar
+ %li= link_to "Link 1", "/path1"
+ %li= link_to "Link 2", "/path2"
+ %li= link_to "Link 3", "/path3"
<% end %>
%footer
%p &copy; Company 2012
View
25 lib/generators/bootstrap/layout/templates/layout.html.slim
@@ -46,19 +46,18 @@ html lang="en"
.span9
= yield
<% else %>
- .content
- .row
- .span9
- = bootstap_flash
- = yield
- .span3
- .well.sidebar-nav
- h3 Sidebar
- ul.nav.nav-list
- li.nav-header Sidebar
- li= link_to "Link 1", "/path1"
- li= link_to "Link 2", "/path2"
- li= link_to "Link 3", "/path3"
+ .row
+ .span9
+ = bootstrap_flash
+ = yield
+ .span3
+ .well.sidebar-nav
+ h3 Sidebar
+ ul.nav.nav-list
+ li.nav-header Sidebar
+ li= link_to "Link 1", "/path1"
+ li= link_to "Link 2", "/path2"
+ li= link_to "Link 3", "/path3"
<% end %>
footer
p &copy; Company 2012
View
2 lib/twitter/bootstrap/rails/version.rb
@@ -1,7 +1,7 @@
module Twitter
module Bootstrap
module Rails
- VERSION = "2.1.1"
+ VERSION = "2.1.3"
end
end
end
View
10 twitter-bootstrap-rails.gemspec
@@ -20,13 +20,13 @@ Gem::Specification.new do |s|
s.add_dependency 'railties', '>= 3.1'
s.add_dependency 'actionpack', '>= 3.1'
-
+
if (RUBY_PLATFORM == 'java')
- s.add_dependency 'therubyrhino', '~> 1.73.4'
- elsif (RUBY_PLATFORM != 'i386-mingw32')
- s.add_dependency 'therubyracer', '0.10.1'
+ s.add_dependency 'therubyrhino', '~> 1.73.4'
+ else
+ s.add_dependency 'therubyracer', '>= 0.10.2'
end
-
+
s.add_runtime_dependency 'less-rails', '~> 2.2.3'
s.add_development_dependency 'rails', '>= 3.1'
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
@@ -10,3 +10,4 @@
//= require twitter/bootstrap/bootstrap-collapse
//= require twitter/bootstrap/bootstrap-carousel
//= require twitter/bootstrap/bootstrap-typeahead
+//= require twitter/bootstrap/bootstrap-affix
View
104 vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js
@@ -0,0 +1,104 @@
+/* ==========================================================
+ * bootstrap-affix.js v2.1.1
+ * 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/bootstrap-alert.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alert.js v2.0.4
+ * bootstrap-alert.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
View
4 vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-button.js v2.0.4
+ * bootstrap-button.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
@@ -51,7 +51,7 @@
}
Button.prototype.toggle = function () {
- var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
+ var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
View
17 vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-carousel.js v2.0.4
+ * bootstrap-carousel.js v2.1.1
* 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/bootstrap-collapse.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-collapse.js v2.0.4
+ * bootstrap-collapse.js v2.1.1
* 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/bootstrap-dropdown.js
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-dropdown.js v2.0.4
+ * bootstrap-dropdown.js v2.1.1
* 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 && /#/.test(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 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);
View
169 vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js
@@ -1,5 +1,5 @@
/* =========================================================
- * bootstrap-modal.js v2.0.4
+ * bootstrap-modal.js v2.1.1
* 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/bootstrap-popover.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-popover.js v2.0.4
+ * bootstrap-popover.js v2.1.1
* 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/bootstrap-scrollspy.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-scrollspy.js v2.0.4
+ * bootstrap-scrollspy.js v2.1.1
* 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/bootstrap-tab.js
@@ -1,5 +1,5 @@
/* ========================================================
- * bootstrap-tab.js v2.0.4
+ * bootstrap-tab.js v2.1.1
* 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/bootstrap-tooltip.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-tooltip.js v2.0.4
+ * bootstrap-tooltip.js v2.1.1
* 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/bootstrap-transition.js
@@ -1,5 +1,5 @@
/* ===================================================
- * bootstrap-transition.js v2.0.4
+ * bootstrap-transition.js v2.1.1
* 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
93 vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js
@@ -1,5 +1,5 @@
/* =============================================================
- * bootstrap-typeahead.js v2.0.4
+ * bootstrap-typeahead.js v2.1.1
* 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)
})
@@ -168,15 +174,49 @@
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
- if ($.browser.webkit || $.browser.msie) {
- this.$element.on('keydown', $.proxy(this.keypress, this))
+ if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
+ 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,39 +242,9 @@
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 () {
- if (!that.$menu.is(':hover')) {
- that.hide();
- }
- }, 150)
+ setTimeout(function () { that.hide() }, 150)
}
, click: function (e) {
@@ -269,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 () {
@@ -286,4 +297,4 @@
})
})
-}(window.jQuery);
+}(window.jQuery);
View
245 vendor/toolkit/font-awesome-ie7.less
@@ -0,0 +1,245 @@
+[class^="icon-"],
+[class*=" icon-"] {
+ font-family: FontAwesome;
+ font-style: normal;
+ font-weight: normal;
+}
+
+.btn.dropdown-toggle [class^="icon-"], .btn.dropdown-toggle [class*=" icon-"] {
+/* keeps button heights with and without icons the same */
+ line-height: 1.4em;
+}
+
+.icon-large {
+ font-size: 1.3333em;
+}
+
+.ie7icon(@inner) {
+ *zoom: ~"expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '@{inner}&nbsp;')";
+}
+
+.icon-glass { .ie7icon('&#xf000;'); }
+.icon-music { .ie7icon('&#xf001;'); }
+.icon-search { .ie7icon('&#xf002;'); }
+.icon-envelope { .ie7icon('&#xf003;'); }
+.icon-heart { .ie7icon('&#xf004;'); }
+.icon-star { .ie7icon('&#xf005;'); }
+.icon-star-empty { .ie7icon('&#xf006;'); }
+.icon-user { .ie7icon('&#xf007;'); }
+.icon-film { .ie7icon('&#xf008;'); }
+.icon-th-large { .ie7icon('&#xf009;'); }
+.icon-th { .ie7icon('&#xf00a;'); }
+.icon-th-list { .ie7icon('&#xf00b;'); }
+.icon-ok { .ie7icon('&#xf00c;'); }
+.icon-remove { .ie7icon('&#xf00d;'); }
+.icon-zoom-in { .ie7icon('&#xf00e;'); }
+
+.icon-zoom-out { .ie7icon('&#xf010;'); }
+.icon-off { .ie7icon('&#xf011;'); }
+.icon-signal { .ie7icon('&#xf012;'); }
+.icon-cog { .ie7icon('&#xf013;'); }
+.icon-trash { .ie7icon('&#xf014;'); }
+.icon-home { .ie7icon('&#xf015;'); }
+.icon-file { .ie7icon('&#xf016;'); }
+.icon-time { .ie7icon('&#xf017;'); }
+.icon-road { .ie7icon('&#xf018;'); }
+.icon-download-alt { .ie7icon('&#xf019;'); }
+.icon-download { .ie7icon('&#xf01a;'); }
+.icon-upload { .ie7icon('&#xf01b;'); }
+.icon-inbox { .ie7icon('&#xf01c;'); }
+.icon-play-circle { .ie7icon('&#xf01d;'); }
+.icon-repeat { .ie7icon('&#xf01e;'); }
+
+.icon-refresh { .ie7icon('&#xf021;'); }
+.icon-list-alt { .ie7icon('&#xf022;'); }
+.icon-lock { .ie7icon('&#xf023;'); }
+.icon-flag { .ie7icon('&#xf024;'); }
+.icon-headphones { .ie7icon('&#xf025;'); }
+.icon-volume-off { .ie7icon('&#xf026;'); }
+.icon-volume-down { .ie7icon('&#xf027;'); }
+.icon-volume-up { .ie7icon('&#xf028;'); }
+.icon-qrcode { .ie7icon('&#xf029;'); }
+.icon-barcode { .ie7icon('&#xf02a;'); }
+.icon-tag { .ie7icon('&#xf02b;'); }
+.icon-tags { .ie7icon('&#xf02c;'); }
+.icon-book { .ie7icon('&#xf02d;'); }
+.icon-bookmark { .ie7icon('&#xf02e;'); }
+.icon-print { .ie7icon('&#xf02f;'); }
+
+.icon-camera { .ie7icon('&#xf030;'); }
+.icon-font { .ie7icon('&#xf031;'); }
+.icon-bold { .ie7icon('&#xf032;'); }
+.icon-italic { .ie7icon('&#xf033;'); }
+.icon-text-height { .ie7icon('&#xf034;'); }
+.icon-text-width { .ie7icon('&#xf035;'); }
+.icon-align-left { .ie7icon('&#xf036;'); }
+.icon-align-center { .ie7icon('&#xf037;'); }
+.icon-align-right { .ie7icon('&#xf038;'); }
+.icon-align-justify { .ie7icon('&#xf039;'); }
+.icon-list { .ie7icon('&#xf03a;'); }
+.icon-indent-left { .ie7icon('&#xf03b;'); }
+.icon-indent-right { .ie7icon('&#xf03c;'); }
+.icon-facetime-video { .ie7icon('&#xf03d;'); }
+.icon-picture { .ie7icon('&#xf03e;'); }
+
+.icon-pencil { .ie7icon('&#xf040;'); }
+.icon-map-marker { .ie7icon('&#xf041;'); }
+.icon-adjust { .ie7icon('&#xf042;'); }
+.icon-tint { .ie7icon('&#xf043;'); }
+.icon-edit { .ie7icon('&#xf044;'); }
+.icon-share { .ie7icon('&#xf045;'); }
+.icon-check { .ie7icon('&#xf046;'); }
+.icon-move { .ie7icon('&#xf047;'); }
+.icon-step-backward { .ie7icon('&#xf048;'); }
+.icon-fast-backward { .ie7icon('&#xf049;'); }
+.icon-backward { .ie7icon('&#xf04a;'); }
+.icon-play { .ie7icon('&#xf04b;'); }
+.icon-pause { .ie7icon('&#xf04c;'); }
+.icon-stop { .ie7icon('&#xf04d;'); }
+.icon-forward { .ie7icon('&#xf04e;'); }
+
+.icon-fast-forward { .ie7icon('&#xf050;'); }
+.icon-step-forward { .ie7icon('&#xf051;'); }
+.icon-eject { .ie7icon('&#xf052;'); }
+.icon-chevron-left { .ie7icon('&#xf053;'); }
+.icon-chevron-right { .ie7icon('&#xf054;'); }
+.icon-plus-sign { .ie7icon('&#xf055;'); }
+.icon-minus-sign { .ie7icon('&#xf056;'); }
+.icon-remove-sign { .ie7icon('&#xf057;'); }
+.icon-ok-sign { .ie7icon('&#xf058;'); }
+.icon-question-sign { .ie7icon('&#xf059;'); }
+.icon-info-sign { .ie7icon('&#xf05a;'); }
+.icon-screenshot { .ie7icon('&#xf05b;'); }
+.icon-remove-circle { .ie7icon('&#xf05c;'); }
+.icon-ok-circle { .ie7icon('&#xf05d;'); }
+.icon-ban-circle { .ie7icon('&#xf05e;'); }
+
+.icon-arrow-left { .ie7icon('&#xf060;'); }
+.icon-arrow-right { .ie7icon('&#xf061;'); }
+.icon-arrow-up { .ie7icon('&#xf062;'); }
+.icon-arrow-down { .ie7icon('&#xf063;'); }
+.icon-share-alt { .ie7icon('&#xf064;'); }
+.icon-resize-full { .ie7icon('&#xf065;'); }
+.icon-resize-small { .ie7icon('&#xf066;'); }
+.icon-plus { .ie7icon('&#xf067;'); }
+.icon-minus { .ie7icon('&#xf068;'); }
+.icon-asterisk { .ie7icon('&#xf069;'); }
+.icon-exclamation-sign { .ie7icon('&#xf06a;'); }
+.icon-gift { .ie7icon('&#xf06b;'); }
+.icon-leaf { .ie7icon('&#xf06c;'); }
+.icon-fire { .ie7icon('&#xf06d;'); }
+.icon-eye-open { .ie7icon('&#xf06e;'); }
+
+.icon-eye-close { .ie7icon('&#xf070;'); }
+.icon-warning-sign { .ie7icon('&#xf071;'); }
+.icon-plane { .ie7icon('&#xf072;'); }
+.icon-calendar { .ie7icon('&#xf073;'); }
+.icon-random { .ie7icon('&#xf074;'); }
+.icon-comment { .ie7icon('&#xf075;'); }
+.icon-magnet { .ie7icon('&#xf076;'); }
+.icon-chevron-up { .ie7icon('&#xf077;'); }
+.icon-chevron-down { .ie7icon('&#xf078;'); }
+.icon-retweet { .ie7icon('&#xf079;'); }
+.icon-shopping-cart { .ie7icon('&#xf07a;'); }
+.icon-folder-close { .ie7icon('&#xf07b;'); }
+.icon-folder-open { .ie7icon('&#xf07c;'); }
+.icon-resize-vertical { .ie7icon('&#xf07d;'); }
+.icon-resize-horizontal { .ie7icon('&#xf07e;'); }
+
+.icon-bar-chart { .ie7icon('&#xf080;'); }
+.icon-twitter-sign { .ie7icon('&#xf081;'); }
+.icon-facebook-sign { .ie7icon('&#xf082;'); }
+.icon-camera-retro { .ie7icon('&#xf083;'); }
+.icon-key { .ie7icon('&#xf084;'); }
+.icon-cogs { .ie7icon('&#xf085;'); }
+.icon-comments { .ie7icon('&#xf086;'); }
+.icon-thumbs-up { .ie7icon('&#xf087;'); }
+.icon-thumbs-down { .ie7icon('&#xf088;'); }
+.icon-star-half { .ie7icon('&#xf089;'); }
+.icon-heart-empty { .ie7icon('&#xf08a;'); }
+.icon-signout { .ie7icon('&#xf08b;'); }
+.icon-linkedin-sign { .ie7icon('&#xf08c;'); }
+.icon-pushpin { .ie7icon('&#xf08d;'); }
+.icon-external-link { .ie7icon('&#xf08e;'); }
+
+.icon-signin { .ie7icon('&#xf090;'); }
+.icon-trophy { .ie7icon('&#xf091;'); }
+.icon-github-sign { .ie7icon('&#xf092;'); }
+.icon-upload-alt { .ie7icon('&#xf093;'); }
+.icon-lemon { .ie7icon('&#xf094;'); }
+.icon-phone { .ie7icon('&#xf095;'); }
+.icon-check-empty { .ie7icon('&#xf096;'); }
+.icon-bookmark-empty { .ie7icon('&#xf097;'); }
+.icon-phone-sign { .ie7icon('&#xf098;'); }
+.icon-twitter { .ie7icon('&#xf099;'); }
+.icon-facebook { .ie7icon('&#xf09a;'); }
+.icon-github { .ie7icon('&#xf09b;'); }
+.icon-unlock { .ie7icon('&#xf09c;'); }
+.icon-credit-card { .ie7icon('&#xf09d;'); }
+.icon-rss { .ie7icon('&#xf09e;'); }
+
+.icon-hdd { .ie7icon('&#xf0a0;'); }
+.icon-bullhorn { .ie7icon('&#xf0a1;'); }
+.icon-bell { .ie7icon('&#xf0a2;'); }
+.icon-certificate { .ie7icon('&#xf0a3;'); }
+.icon-hand-right { .ie7icon('&#xf0a4;'); }
+.icon-hand-left { .ie7icon('&#xf0a5;'); }
+.icon-hand-up { .ie7icon('&#xf0a6;'); }
+.icon-hand-down { .ie7icon('&#xf0a7;'); }
+.icon-circle-arrow-left { .ie7icon('&#xf0a8;'); }
+.icon-circle-arrow-right { .ie7icon('&#xf0a9;'); }
+.icon-circle-arrow-up { .ie7icon('&#xf0aa;'); }
+.icon-circle-arrow-down { .ie7icon('&#xf0ab;'); }
+.icon-globe { .ie7icon('&#xf0ac;'); }
+.icon-wrench { .ie7icon('&#xf0ad;'); }
+.icon-tasks { .ie7icon('&#xf0ae;'); }
+
+.icon-filter { .ie7icon('&#xf0b0;'); }
+.icon-briefcase { .ie7icon('&#xf0b1;'); }
+.icon-fullscreen { .ie7icon('&#xf0b2;'); }
+
+.icon-group { .ie7icon('&#xf0c0;'); }
+.icon-link { .ie7icon('&#xf0c1;'); }
+.icon-cloud { .ie7icon('&#xf0c2;'); }
+.icon-beaker { .ie7icon('&#xf0c3;'); }
+.icon-cut { .ie7icon('&#xf0c4;'); }
+.icon-copy { .ie7icon('&#xf0c5;'); }
+.icon-paper-clip { .ie7icon('&#xf0c6;'); }
+.icon-save { .ie7icon('&#xf0c7;'); }
+.icon-sign-blank { .ie7icon('&#xf0c8;'); }
+.icon-reorder { .ie7icon('&#xf0c9;'); }
+.icon-list-ul { .ie7icon('&#xf0ca;'); }
+.icon-list-ol { .ie7icon('&#xf0cb;'); }
+.icon-strikethrough { .ie7icon('&#xf0cc;'); }
+.icon-underline { .ie7icon('&#xf0cd;'); }
+.icon-table { .ie7icon('&#xf0ce;'); }
+
+.icon-magic { .ie7icon('&#xf0d0;'); }
+.icon-truck { .ie7icon('&#xf0d1;'); }
+.icon-pinterest { .ie7icon('&#xf0d2;'); }
+.icon-pinterest-sign { .ie7icon('&#xf0d3;'); }
+.icon-google-plus-sign { .ie7icon('&#xf0d4;'); }
+.icon-google-plus { .ie7icon('&#xf0d5;'); }
+.icon-money { .ie7icon('&#xf0d6;'); }
+.icon-caret-down { .ie7icon('&#xf0d7;'); }
+.icon-caret-up { .ie7icon('&#xf0d8;'); }
+.icon-caret-left { .ie7icon('&#xf0d9;'); }
+.icon-caret-right { .ie7icon('&#xf0da;'); }
+.icon-columns { .ie7icon('&#xf0db;'); }
+.icon-sort { .ie7icon('&#xf0dc;'); }
+.icon-sort-down { .ie7icon('&#xf0dd;'); }
+.icon-sort-up { .ie7icon('&#xf0de;'); }
+
+.icon-envelope-alt { .ie7icon('&#xf0e0;'); }
+.icon-linkedin { .ie7icon('&#xf0e1;'); }
+.icon-undo { .ie7icon('&#xf0e2;'); }
+.icon-legal { .ie7icon('&#xf0e3;'); }
+.icon-dashboard { .ie7icon('&#xf0e4;'); }
+.icon-comment-alt { .ie7icon('&#xf0e5;'); }
+.icon-comments-alt { .ie7icon('&#xf0e6;'); }
+.icon-bolt { .ie7icon('&#xf0e7;'); }
+.icon-sitemap { .ie7icon('&#xf0e8;'); }
+.icon-umbrella { .ie7icon('&#xf0e9;'); }
+.icon-paste { .ie7icon('&#xf0ea;'); }
+
+.icon-user-md { .ie7icon('&#xf200;'); }
View
31 vendor/toolkit/fontawesome.less
@@ -23,33 +23,16 @@
*/
@font-face {
- font-family: 'FontAwesome';
- src: url(@fontAwesomeEotPath);
- src: url('@{fontAwesomeEotPath}?#iefix'),
- url(@fontAwesomeWoffPath),
- url(@fontAwesomeTtfPath),
- url('@{fontAwesomeSvgPath}#FontAwesome');
+ font-family: "FontAwesome";
+ src: url("@{fontAwesomeEotPath}");
+ src: url("@{fontAwesomeEotPath}?#iefix") format("embedded-opentype"),
+ url("@{fontAwesomeWoffPath}") format("woff"),
+ url("@{fontAwesomeTtfPath}") format("truetype"),
+ url("@{fontAwesomeSvgPath}") format("svg");
font-weight: normal;
font-style: normal;
}
-/* sprites.less reset */
-[class^="icon-"],
-[class*=" icon-"] {
- display: inline;
- width: auto;
- height: auto;
- line-height: inherit;
- vertical-align: baseline;
- background-image: none;
- background-position: 0% 0%;
- background-repeat: repeat;
-}
-li[class^="icon-"],
-li[class*=" icon-"] {
- display: block;
-}
-
/* Font Awesome styles
------------------------------------------------------- */
[class^="icon-"]:before,
@@ -148,7 +131,7 @@ ul.icons {
.icon-play-circle:before { content: "\f01d"; }
.icon-repeat:before { content: "\f01e"; }
-/* \f020 is not a valid unicode character. all shifted one down */
+/* \f020 doesn't work in Safari. all shifted one down */
.icon-refresh:before { content: "\f021"; }
.icon-list-alt:before { content: "\f022"; }
.icon-lock:before { content: "\f023"; }
View
5 vendor/toolkit/twitter/bootstrap/accordion.less
@@ -1,5 +1,6 @@
-// ACCORDION
-// ---------
+//
+// Accordion
+// --------------------------------------------------
// Parent container
View
25 vendor/toolkit/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
2 vendor/toolkit/twitter/bootstrap/bootstrap.less
@@ -1,5 +1,5 @@
/*!
- * Bootstrap v2.0.4
+ * Bootstrap v2.1.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
View
20 vendor/toolkit/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
104 vendor/toolkit/twitter/bootstrap/button-groups.less
@@ -1,11 +1,14 @@
-// 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
+ vertical-align: middle; // match .btn alignment given font-size hack above
+ 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 +19,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 +117,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;
+ .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: 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 {
@@ -117,7 +147,7 @@
// Remove the gradient and set the same inset shadow as the :active state
.dropdown-toggle {
background-image: none;
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
+ .box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
}
// Keep the hover's background when dropdown is open
@@ -147,22 +177,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 +209,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: