bootstrapped 1.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/.gitmodules +3 -0
  2. data/README.rdoc +7 -1
  3. data/bootstrapped.gemspec +1 -1
  4. data/lib/bootstrapped/engine.rb +1 -1
  5. data/lib/bootstrapped/version.rb +2 -1
  6. data/vendor/assets/javascripts/bootstrap-alert.js +28 -29
  7. data/vendor/assets/javascripts/bootstrap-button.js +32 -34
  8. data/vendor/assets/javascripts/bootstrap-carousel.js +34 -19
  9. data/vendor/assets/javascripts/bootstrap-collapse.js +47 -26
  10. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  11. data/vendor/assets/javascripts/bootstrap-modal.js +26 -18
  12. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  13. data/vendor/assets/javascripts/bootstrap-scrollspy.js +43 -17
  14. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  15. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  16. data/vendor/assets/javascripts/bootstrap-transition.js +31 -21
  17. data/vendor/assets/javascripts/bootstrap-typeahead.js +30 -16
  18. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap-responsive.css +808 -0
  19. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap.css +2314 -850
  20. data/vendor/less/twitter/bootstrap/less/accordion.less +5 -0
  21. data/vendor/less/twitter/bootstrap/less/alerts.less +2 -14
  22. data/vendor/less/twitter/bootstrap/less/bootstrap.less +2 -2
  23. data/vendor/less/twitter/bootstrap/less/breadcrumbs.less +3 -1
  24. data/vendor/less/twitter/bootstrap/less/button-groups.less +78 -34
  25. data/vendor/less/twitter/bootstrap/less/buttons.less +53 -27
  26. data/vendor/less/twitter/bootstrap/less/carousel.less +0 -0
  27. data/vendor/less/twitter/bootstrap/less/close.less +12 -1
  28. data/vendor/less/twitter/bootstrap/less/code.less +18 -5
  29. data/vendor/less/twitter/bootstrap/less/component-animations.less +9 -7
  30. data/vendor/less/twitter/bootstrap/less/dropdowns.less +59 -47
  31. data/vendor/less/twitter/bootstrap/less/forms.less +167 -98
  32. data/vendor/less/twitter/bootstrap/less/grid.less +2 -5
  33. data/vendor/less/twitter/bootstrap/less/hero-unit.less +3 -1
  34. data/vendor/less/twitter/bootstrap/less/labels-badges.less +55 -0
  35. data/vendor/less/twitter/bootstrap/less/layouts.less +1 -1
  36. data/vendor/less/twitter/bootstrap/less/mixins.less +261 -167
  37. data/vendor/less/twitter/bootstrap/less/modals.less +22 -4
  38. data/vendor/less/twitter/bootstrap/less/navbar.less +147 -75
  39. data/vendor/less/twitter/bootstrap/less/navs.less +72 -53
  40. data/vendor/less/twitter/bootstrap/less/pager.less +6 -0
  41. data/vendor/less/twitter/bootstrap/less/pagination.less +1 -0
  42. data/vendor/less/twitter/bootstrap/less/popovers.less +0 -0
  43. data/vendor/less/twitter/bootstrap/less/progress-bars.less +27 -5
  44. data/vendor/less/twitter/bootstrap/less/reset.less +4 -4
  45. data/vendor/less/twitter/bootstrap/less/responsive-1200px-min.less +26 -0
  46. data/vendor/less/twitter/bootstrap/less/responsive-767px-max.less +149 -0
  47. data/vendor/less/twitter/bootstrap/less/responsive-768px-979px.less +17 -0
  48. data/vendor/less/twitter/bootstrap/less/responsive-navbar.less +146 -0
  49. data/vendor/less/twitter/bootstrap/less/responsive-utilities.less +41 -0
  50. data/vendor/less/twitter/bootstrap/less/responsive.less +14 -289
  51. data/vendor/less/twitter/bootstrap/less/scaffolding.less +4 -4
  52. data/vendor/less/twitter/bootstrap/less/sprites.less +47 -12
  53. data/vendor/less/twitter/bootstrap/less/tables.less +59 -22
  54. data/vendor/less/twitter/bootstrap/less/thumbnails.less +15 -3
  55. data/vendor/less/twitter/bootstrap/less/tooltip.less +0 -0
  56. data/vendor/less/twitter/bootstrap/less/type.less +30 -12
  57. data/vendor/less/twitter/bootstrap/less/utilities.less +0 -0
  58. data/vendor/less/twitter/bootstrap/less/variables.less +119 -13
  59. data/vendor/less/twitter/bootstrap/less/wells.less +10 -0
  60. metadata +30 -22
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-typeahead.js v2.0.0
2
+ * bootstrap-typeahead.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,16 +17,22 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function($){
23
22
 
24
- var Typeahead = function ( element, options ) {
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
27
+ * ================================= */
28
+
29
+ var Typeahead = function (element, options) {
25
30
  this.$element = $(element)
26
31
  this.options = $.extend({}, $.fn.typeahead.defaults, options)
27
32
  this.matcher = this.options.matcher || this.matcher
28
33
  this.sorter = this.options.sorter || this.sorter
29
34
  this.highlighter = this.options.highlighter || this.highlighter
35
+ this.updater = this.options.updater || this.updater
30
36
  this.$menu = $(this.options.menu).appendTo('body')
31
37
  this.source = this.options.source
32
38
  this.shown = false
@@ -39,12 +45,18 @@
39
45
 
40
46
  , select: function () {
41
47
  var val = this.$menu.find('.active').attr('data-value')
42
- this.$element.val(val)
48
+ this.$element
49
+ .val(this.updater(val))
50
+ .change()
43
51
  return this.hide()
44
52
  }
45
53
 
54
+ , updater: function (item) {
55
+ return item
56
+ }
57
+
46
58
  , show: function () {
47
- var pos = $.extend({}, this.$element.offset(), {
59
+ var pos = $.extend({}, this.$element.position(), {
48
60
  height: this.$element[0].offsetHeight
49
61
  })
50
62
 
@@ -76,7 +88,7 @@
76
88
  }
77
89
 
78
90
  items = $.grep(this.source, function (item) {
79
- if (that.matcher(item)) return item
91
+ return that.matcher(item)
80
92
  })
81
93
 
82
94
  items = this.sorter(items)
@@ -108,7 +120,8 @@
108
120
  }
109
121
 
110
122
  , highlighter: function (item) {
111
- return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
123
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
124
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
112
125
  return '<strong>' + match + '</strong>'
113
126
  })
114
127
  }
@@ -165,9 +178,6 @@
165
178
  }
166
179
 
167
180
  , keyup: function (e) {
168
- e.stopPropagation()
169
- e.preventDefault()
170
-
171
181
  switch(e.keyCode) {
172
182
  case 40: // down arrow
173
183
  case 38: // up arrow
@@ -180,6 +190,7 @@
180
190
  break
181
191
 
182
192
  case 27: // escape
193
+ if (!this.shown) return
183
194
  this.hide()
184
195
  break
185
196
 
@@ -187,10 +198,11 @@
187
198
  this.lookup()
188
199
  }
189
200
 
201
+ e.stopPropagation()
202
+ e.preventDefault()
190
203
  }
191
204
 
192
205
  , keypress: function (e) {
193
- e.stopPropagation()
194
206
  if (!this.shown) return
195
207
 
196
208
  switch(e.keyCode) {
@@ -201,21 +213,23 @@
201
213
  break
202
214
 
203
215
  case 38: // up arrow
216
+ if (e.type != 'keydown') break
204
217
  e.preventDefault()
205
218
  this.prev()
206
219
  break
207
220
 
208
221
  case 40: // down arrow
222
+ if (e.type != 'keydown') break
209
223
  e.preventDefault()
210
224
  this.next()
211
225
  break
212
226
  }
227
+
228
+ e.stopPropagation()
213
229
  }
214
230
 
215
231
  , blur: function (e) {
216
232
  var that = this
217
- e.stopPropagation()
218
- e.preventDefault()
219
233
  setTimeout(function () { that.hide() }, 150)
220
234
  }
221
235
 
@@ -236,7 +250,7 @@
236
250
  /* TYPEAHEAD PLUGIN DEFINITION
237
251
  * =========================== */
238
252
 
239
- $.fn.typeahead = function ( option ) {
253
+ $.fn.typeahead = function (option) {
240
254
  return this.each(function () {
241
255
  var $this = $(this)
242
256
  , data = $this.data('typeahead')
@@ -268,4 +282,4 @@
268
282
  })
269
283
  })
270
284
 
271
- }( window.jQuery )
285
+ }(window.jQuery);