sass-rails-bootstrap 2.0.2 → 2.0.3a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/README.md +5 -5
  2. data/lib/sass-rails-bootstrap/version.rb +1 -1
  3. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  4. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  5. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +28 -32
  6. data/vendor/assets/javascripts/twitter/bootstrap/button.js +32 -36
  7. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +28 -20
  8. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +46 -27
  9. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +18 -10
  10. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +25 -17
  11. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +4 -6
  12. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +44 -18
  13. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +12 -7
  14. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +40 -35
  15. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +31 -21
  16. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +25 -11
  17. data/vendor/assets/stylesheets/twitter/_bootstrap-responsive.scss +41 -0
  18. data/vendor/assets/stylesheets/twitter/_bootstrap.scss +3 -4
  19. data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.sass +5 -0
  20. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.sass +56 -35
  21. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.sass +16 -10
  22. data/vendor/assets/stylesheets/twitter/bootstrap/_close.sass +11 -1
  23. data/vendor/assets/stylesheets/twitter/bootstrap/_code.sass +4 -4
  24. data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.sass +4 -4
  25. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.sass +15 -19
  26. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.sass +58 -28
  27. data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.sass +77 -0
  28. data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.sass +1 -1
  29. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.sass +49 -34
  30. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.sass +66 -37
  31. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.sass +31 -28
  32. data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.sass +16 -7
  33. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.sass +3 -3
  34. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.sass +20 -0
  35. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.sass +134 -0
  36. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.sass +15 -0
  37. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-navbar.sass +139 -0
  38. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-utilities.sass +50 -0
  39. data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.sass +45 -4
  40. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.sass +22 -6
  41. data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.sass +11 -2
  42. data/vendor/assets/stylesheets/twitter/bootstrap/_type.sass +7 -6
  43. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.sass +11 -4
  44. metadata +14 -75
  45. data/lib/tasks/sass-rails-bootstrap_tasks.rake +0 -4
  46. data/test/dummy/README.rdoc +0 -261
  47. data/test/dummy/Rakefile +0 -7
  48. data/test/dummy/app/assets/javascripts/application.js +0 -15
  49. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  50. data/test/dummy/app/controllers/application_controller.rb +0 -3
  51. data/test/dummy/app/helpers/application_helper.rb +0 -2
  52. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  53. data/test/dummy/config/application.rb +0 -56
  54. data/test/dummy/config/boot.rb +0 -10
  55. data/test/dummy/config/database.yml +0 -25
  56. data/test/dummy/config/environment.rb +0 -5
  57. data/test/dummy/config/environments/development.rb +0 -37
  58. data/test/dummy/config/environments/production.rb +0 -67
  59. data/test/dummy/config/environments/test.rb +0 -37
  60. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  61. data/test/dummy/config/initializers/inflections.rb +0 -15
  62. data/test/dummy/config/initializers/mime_types.rb +0 -5
  63. data/test/dummy/config/initializers/secret_token.rb +0 -7
  64. data/test/dummy/config/initializers/session_store.rb +0 -8
  65. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  66. data/test/dummy/config/locales/en.yml +0 -5
  67. data/test/dummy/config/routes.rb +0 -58
  68. data/test/dummy/config.ru +0 -4
  69. data/test/dummy/db/test.sqlite3 +0 -0
  70. data/test/dummy/log/test.log +0 -2
  71. data/test/dummy/public/404.html +0 -26
  72. data/test/dummy/public/422.html +0 -26
  73. data/test/dummy/public/500.html +0 -25
  74. data/test/dummy/public/favicon.ico +0 -0
  75. data/test/dummy/script/rails +0 -6
  76. data/test/sass-rails-bootstrap_test.rb +0 -7
  77. data/test/test_helper.rb +0 -10
  78. data/vendor/assets/stylesheets/twitter/bootstrap/_badges.sass +0 -44
  79. data/vendor/assets/stylesheets/twitter/bootstrap/_labels.sass +0 -45
  80. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive.sass +0 -333
data/README.md CHANGED
@@ -20,7 +20,7 @@ end
20
20
  Then include the following line in your Gemfile and you're all set:
21
21
 
22
22
  ```ruby
23
- gem 'sass-rails-bootstrap', :git => 'git://github.com/voidseeker/sass-rails-bootstrap.git'
23
+ gem 'sass-rails-bootstrap'
24
24
  ```
25
25
 
26
26
 
@@ -50,7 +50,7 @@ As per the Bootstrap project, `twitter/bootstrap` doesn't include the responsive
50
50
  You'd have to import the file manually to get them:
51
51
 
52
52
  ```css
53
- @import "twitter/bootstrap/responsive"
53
+ @import "twitter/bootstrap-responsive"
54
54
  ```
55
55
 
56
56
 
@@ -63,7 +63,7 @@ that goes into your `application.js` file:
63
63
  //= require twitter/bootstrap
64
64
  ```
65
65
 
66
- Or, you could include only the files you need:
66
+ Alternatively, you could include only the files you need:
67
67
 
68
68
  ```javascript
69
69
  //= require twitter/bootstrap/alert
@@ -76,8 +76,8 @@ Or, you could include only the files you need:
76
76
 
77
77
  This gem will directly track the semantic versioning releases of the Twitter Bootstrap project. Our major and minor versions will always match to theirs.
78
78
 
79
- Currently, the gem reflects the Bootstrap version 2.0.1 up to the commit:
80
- https://github.com/twitter/bootstrap/commit/3d58b4622671bc51c22c857641db3b988e73632a
79
+ Currently, this gem reflects the Bootstrap version 2.0.3 up to the commit:
80
+ https://github.com/twitter/bootstrap/commit/b261f9781bbf31f499cb55c49451dc0c0ad43062
81
81
 
82
82
 
83
83
  ## Copyright and license
@@ -1,3 +1,3 @@
1
1
  module SassRailsBootstrap
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3a"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.2
2
+ * bootstrap-alert.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -18,61 +18,57 @@
18
18
  * ========================================================== */
19
19
 
20
20
 
21
- !function( $ ){
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
22
24
 
23
- "use strict"
24
25
 
25
26
  /* ALERT CLASS DEFINITION
26
27
  * ====================== */
27
28
 
28
29
  var dismiss = '[data-dismiss="alert"]'
29
- , Alert = function ( el ) {
30
+ , Alert = function (el) {
30
31
  $(el).on('click', dismiss, this.close)
31
32
  }
32
33
 
33
- Alert.prototype = {
34
-
35
- constructor: Alert
34
+ Alert.prototype.close = function (e) {
35
+ var $this = $(this)
36
+ , selector = $this.attr('data-target')
37
+ , $parent
36
38
 
37
- , close: function ( e ) {
38
- var $this = $(this)
39
- , selector = $this.attr('data-target')
40
- , $parent
39
+ if (!selector) {
40
+ selector = $this.attr('href')
41
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42
+ }
41
43
 
42
- if (!selector) {
43
- selector = $this.attr('href')
44
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
45
- }
44
+ $parent = $(selector)
46
45
 
47
- $parent = $(selector)
48
- $parent.trigger('close')
46
+ e && e.preventDefault()
49
47
 
50
- e && e.preventDefault()
48
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
51
49
 
52
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
50
+ $parent.trigger(e = $.Event('close'))
53
51
 
54
- $parent
55
- .trigger('close')
56
- .removeClass('in')
52
+ if (e.isDefaultPrevented()) return
57
53
 
58
- function removeElement() {
59
- $parent
60
- .trigger('closed')
61
- .remove()
62
- }
54
+ $parent.removeClass('in')
63
55
 
64
- $.support.transition && $parent.hasClass('fade') ?
65
- $parent.on($.support.transition.end, removeElement) :
66
- removeElement()
56
+ function removeElement() {
57
+ $parent
58
+ .trigger('closed')
59
+ .remove()
67
60
  }
68
61
 
62
+ $.support.transition && $parent.hasClass('fade') ?
63
+ $parent.on($.support.transition.end, removeElement) :
64
+ removeElement()
69
65
  }
70
66
 
71
67
 
72
68
  /* ALERT PLUGIN DEFINITION
73
69
  * ======================= */
74
70
 
75
- $.fn.alert = function ( option ) {
71
+ $.fn.alert = function (option) {
76
72
  return this.each(function () {
77
73
  var $this = $(this)
78
74
  , data = $this.data('alert')
@@ -91,4 +87,4 @@
91
87
  $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
92
88
  })
93
89
 
94
- }( window.jQuery );
90
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.2
2
+ * bootstrap-button.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,58 +17,54 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
23
25
 
24
26
  /* BUTTON PUBLIC CLASS DEFINITION
25
27
  * ============================== */
26
28
 
27
- var Button = function ( element, options ) {
29
+ var Button = function (element, options) {
28
30
  this.$element = $(element)
29
31
  this.options = $.extend({}, $.fn.button.defaults, options)
30
32
  }
31
33
 
32
- Button.prototype = {
33
-
34
- constructor: Button
34
+ Button.prototype.setState = function (state) {
35
+ var d = 'disabled'
36
+ , $el = this.$element
37
+ , data = $el.data()
38
+ , val = $el.is('input') ? 'val' : 'html'
35
39
 
36
- , setState: function ( state ) {
37
- var d = 'disabled'
38
- , $el = this.$element
39
- , data = $el.data()
40
- , val = $el.is('input') ? 'val' : 'html'
40
+ state = state + 'Text'
41
+ data.resetText || $el.data('resetText', $el[val]())
41
42
 
42
- state = state + 'Text'
43
- data.resetText || $el.data('resetText', $el[val]())
43
+ $el[val](data[state] || this.options[state])
44
44
 
45
- $el[val](data[state] || this.options[state])
46
-
47
- // push to event loop to allow forms to submit
48
- setTimeout(function () {
49
- state == 'loadingText' ?
50
- $el.addClass(d).attr(d, d) :
51
- $el.removeClass(d).removeAttr(d)
52
- }, 0)
53
- }
54
-
55
- , toggle: function () {
56
- var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
45
+ // push to event loop to allow forms to submit
46
+ setTimeout(function () {
47
+ state == 'loadingText' ?
48
+ $el.addClass(d).attr(d, d) :
49
+ $el.removeClass(d).removeAttr(d)
50
+ }, 0)
51
+ }
57
52
 
58
- $parent && $parent
59
- .find('.active')
60
- .removeClass('active')
53
+ Button.prototype.toggle = function () {
54
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
61
55
 
62
- this.$element.toggleClass('active')
63
- }
56
+ $parent && $parent
57
+ .find('.active')
58
+ .removeClass('active')
64
59
 
60
+ this.$element.toggleClass('active')
65
61
  }
66
62
 
67
63
 
68
64
  /* BUTTON PLUGIN DEFINITION
69
65
  * ======================== */
70
66
 
71
- $.fn.button = function ( option ) {
67
+ $.fn.button = function (option) {
72
68
  return this.each(function () {
73
69
  var $this = $(this)
74
70
  , data = $this.data('button')
@@ -91,10 +87,10 @@
91
87
 
92
88
  $(function () {
93
89
  $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
94
- var $btn = $(e.target)
95
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
96
- $btn.button('toggle')
90
+ var $btn = $(e.target)
91
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92
+ $btn.button('toggle')
97
93
  })
98
94
  })
99
95
 
100
- }( window.jQuery );
96
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.2
2
+ * bootstrap-carousel.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -18,16 +18,17 @@
18
18
  * ========================================================== */
19
19
 
20
20
 
21
- !function( $ ){
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
22
24
 
23
- "use strict"
24
25
 
25
26
  /* CAROUSEL CLASS DEFINITION
26
27
  * ========================= */
27
28
 
28
29
  var Carousel = function (element, options) {
29
30
  this.$element = $(element)
30
- this.options = $.extend({}, $.fn.carousel.defaults, options)
31
+ this.options = options
31
32
  this.options.slide && this.slide(this.options.slide)
32
33
  this.options.pause == 'hover' && this.$element
33
34
  .on('mouseenter', $.proxy(this.pause, this))
@@ -36,8 +37,11 @@
36
37
 
37
38
  Carousel.prototype = {
38
39
 
39
- cycle: function () {
40
- this.interval = setInterval($.proxy(this.next, this), this.options.interval)
40
+ cycle: function (e) {
41
+ if (!e) this.paused = false
42
+ this.options.interval
43
+ && !this.paused
44
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
41
45
  return this
42
46
  }
43
47
 
@@ -62,7 +66,8 @@
62
66
  return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
63
67
  }
64
68
 
65
- , pause: function () {
69
+ , pause: function (e) {
70
+ if (!e) this.paused = true
66
71
  clearInterval(this.interval)
67
72
  this.interval = null
68
73
  return this
@@ -85,33 +90,36 @@
85
90
  , direction = type == 'next' ? 'left' : 'right'
86
91
  , fallback = type == 'next' ? 'first' : 'last'
87
92
  , that = this
93
+ , e = $.Event('slide')
88
94
 
89
95
  this.sliding = true
90
96
 
91
97
  isCycling && this.pause()
92
98
 
93
99
  $next = $next.length ? $next : this.$element.find('.item')[fallback]()
94
-
100
+
95
101
  if ($next.hasClass('active')) return
96
102
 
97
- if (!$.support.transition && this.$element.hasClass('slide')) {
98
- this.$element.trigger('slide')
99
- $active.removeClass('active')
100
- $next.addClass('active')
101
- this.sliding = false
102
- this.$element.trigger('slid')
103
- } else {
103
+ if ($.support.transition && this.$element.hasClass('slide')) {
104
+ this.$element.trigger(e)
105
+ if (e.isDefaultPrevented()) return
104
106
  $next.addClass(type)
105
107
  $next[0].offsetWidth // force reflow
106
108
  $active.addClass(direction)
107
109
  $next.addClass(direction)
108
- this.$element.trigger('slide')
109
110
  this.$element.one($.support.transition.end, function () {
110
111
  $next.removeClass([type, direction].join(' ')).addClass('active')
111
112
  $active.removeClass(['active', direction].join(' '))
112
113
  that.sliding = false
113
114
  setTimeout(function () { that.$element.trigger('slid') }, 0)
114
115
  })
116
+ } else {
117
+ this.$element.trigger(e)
118
+ if (e.isDefaultPrevented()) return
119
+ $active.removeClass('active')
120
+ $next.addClass('active')
121
+ this.sliding = false
122
+ this.$element.trigger('slid')
115
123
  }
116
124
 
117
125
  isCycling && this.cycle()
@@ -125,15 +133,15 @@
125
133
  /* CAROUSEL PLUGIN DEFINITION
126
134
  * ========================== */
127
135
 
128
- $.fn.carousel = function ( option ) {
136
+ $.fn.carousel = function (option) {
129
137
  return this.each(function () {
130
138
  var $this = $(this)
131
139
  , data = $this.data('carousel')
132
- , options = typeof option == 'object' && option
140
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
133
141
  if (!data) $this.data('carousel', (data = new Carousel(this, options)))
134
142
  if (typeof option == 'number') data.to(option)
135
143
  else if (typeof option == 'string' || (option = options.slide)) data[option]()
136
- else data.cycle()
144
+ else if (options.interval) data.cycle()
137
145
  })
138
146
  }
139
147
 
@@ -158,4 +166,4 @@
158
166
  })
159
167
  })
160
168
 
161
- }( window.jQuery );
169
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.2
2
+ * bootstrap-collapse.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,16 +17,21 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function ($) {
23
22
 
24
- var Collapse = function ( element, options ) {
25
- this.$element = $(element)
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+ * ================================ */
28
+
29
+ var Collapse = function (element, options) {
30
+ this.$element = $(element)
26
31
  this.options = $.extend({}, $.fn.collapse.defaults, options)
27
32
 
28
- if (this.options["parent"]) {
29
- this.$parent = $(this.options["parent"])
33
+ if (this.options.parent) {
34
+ this.$parent = $(this.options.parent)
30
35
  }
31
36
 
32
37
  this.options.toggle && this.toggle()
@@ -42,31 +47,39 @@
42
47
  }
43
48
 
44
49
  , show: function () {
45
- var dimension = this.dimension()
46
- , scroll = $.camelCase(['scroll', dimension].join('-'))
47
- , actives = this.$parent && this.$parent.find('.in')
50
+ var dimension
51
+ , scroll
52
+ , actives
48
53
  , hasData
49
54
 
55
+ if (this.transitioning) return
56
+
57
+ dimension = this.dimension()
58
+ scroll = $.camelCase(['scroll', dimension].join('-'))
59
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
50
61
  if (actives && actives.length) {
51
62
  hasData = actives.data('collapse')
63
+ if (hasData && hasData.transitioning) return
52
64
  actives.collapse('hide')
53
65
  hasData || actives.data('collapse', null)
54
66
  }
55
67
 
56
68
  this.$element[dimension](0)
57
- this.transition('addClass', 'show', 'shown')
69
+ this.transition('addClass', $.Event('show'), 'shown')
58
70
  this.$element[dimension](this.$element[0][scroll])
59
-
60
71
  }
61
72
 
62
73
  , hide: function () {
63
- var dimension = this.dimension()
74
+ var dimension
75
+ if (this.transitioning) return
76
+ dimension = this.dimension()
64
77
  this.reset(this.$element[dimension]())
65
- this.transition('removeClass', 'hide', 'hidden')
78
+ this.transition('removeClass', $.Event('hide'), 'hidden')
66
79
  this.$element[dimension](0)
67
80
  }
68
81
 
69
- , reset: function ( size ) {
82
+ , reset: function (size) {
70
83
  var dimension = this.dimension()
71
84
 
72
85
  this.$element
@@ -74,37 +87,43 @@
74
87
  [dimension](size || 'auto')
75
88
  [0].offsetWidth
76
89
 
77
- this.$element[size ? 'addClass' : 'removeClass']('collapse')
78
-
90
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91
+
79
92
  return this
80
93
  }
81
94
 
82
- , transition: function ( method, startEvent, completeEvent ) {
95
+ , transition: function (method, startEvent, completeEvent) {
83
96
  var that = this
84
97
  , complete = function () {
85
- if (startEvent == 'show') that.reset()
98
+ if (startEvent.type == 'show') that.reset()
99
+ that.transitioning = 0
86
100
  that.$element.trigger(completeEvent)
87
101
  }
88
102
 
89
- this.$element
90
- .trigger(startEvent)
91
- [method]('in')
103
+ this.$element.trigger(startEvent)
104
+
105
+ if (startEvent.isDefaultPrevented()) return
106
+
107
+ this.transitioning = 1
108
+
109
+ this.$element[method]('in')
92
110
 
93
111
  $.support.transition && this.$element.hasClass('collapse') ?
94
112
  this.$element.one($.support.transition.end, complete) :
95
113
  complete()
96
- }
114
+ }
97
115
 
98
116
  , toggle: function () {
99
117
  this[this.$element.hasClass('in') ? 'hide' : 'show']()
100
- }
118
+ }
101
119
 
102
120
  }
103
121
 
104
- /* COLLAPSIBLE PLUGIN DEFINITION
122
+
123
+ /* COLLAPSIBLE PLUGIN DEFINITION
105
124
  * ============================== */
106
125
 
107
- $.fn.collapse = function ( option ) {
126
+ $.fn.collapse = function (option) {
108
127
  return this.each(function () {
109
128
  var $this = $(this)
110
129
  , data = $this.data('collapse')
@@ -135,4 +154,4 @@
135
154
  })
136
155
  })
137
156
 
138
- }( window.jQuery );
157
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.0.2
2
+ * bootstrap-dropdown.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -18,15 +18,16 @@
18
18
  * ============================================================ */
19
19
 
20
20
 
21
- !function( $ ){
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
22
24
 
23
- "use strict"
24
25
 
25
26
  /* DROPDOWN CLASS DEFINITION
26
27
  * ========================= */
27
28
 
28
29
  var toggle = '[data-toggle="dropdown"]'
29
- , Dropdown = function ( element ) {
30
+ , Dropdown = function (element) {
30
31
  var $el = $(element).on('click.dropdown.data-api', this.toggle)
31
32
  $('html').on('click.dropdown.data-api', function () {
32
33
  $el.parent().removeClass('open')
@@ -37,11 +38,15 @@
37
38
 
38
39
  constructor: Dropdown
39
40
 
40
- , toggle: function ( e ) {
41
+ , toggle: function (e) {
41
42
  var $this = $(this)
42
- , selector = $this.attr('data-target')
43
43
  , $parent
44
+ , selector
44
45
  , isActive
46
+
47
+ if ($this.is('.disabled, :disabled')) return
48
+
49
+ selector = $this.attr('data-target')
45
50
 
46
51
  if (!selector) {
47
52
  selector = $this.attr('href')
@@ -54,7 +59,8 @@
54
59
  isActive = $parent.hasClass('open')
55
60
 
56
61
  clearMenus()
57
- !isActive && $parent.toggleClass('open')
62
+
63
+ if (!isActive) $parent.toggleClass('open')
58
64
 
59
65
  return false
60
66
  }
@@ -69,7 +75,7 @@
69
75
  /* DROPDOWN PLUGIN DEFINITION
70
76
  * ========================== */
71
77
 
72
- $.fn.dropdown = function ( option ) {
78
+ $.fn.dropdown = function (option) {
73
79
  return this.each(function () {
74
80
  var $this = $(this)
75
81
  , data = $this.data('dropdown')
@@ -86,7 +92,9 @@
86
92
 
87
93
  $(function () {
88
94
  $('html').on('click.dropdown.data-api', clearMenus)
89
- $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
95
+ $('body')
96
+ .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
90
98
  })
91
99
 
92
- }( window.jQuery );
100
+ }(window.jQuery);