jombo 1.0.6 → 1.0.7

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.
@@ -1,11 +1,53 @@
1
+ Git/Update Sequence
2
+ ===================
3
+
4
+ - Merge "master" with "work"
5
+ - Switch to "work"
6
+ - Asset updates on "work"
7
+ - Switch to "build
8
+ - Merge "work with "build"
9
+ - Update version to <VERSION NUMBER>.beta<NUMBER>
10
+ - rm -rf pkg/
11
+ - rake build
12
+ - Test using the Bootpolish app
13
+
14
+ - Switch to "update" branch
15
+ - Merge "update" with "build"
16
+ - Finalise the version update
17
+
18
+ - Switch to "release" branch
19
+ - Merge "release" with "update"
20
+ - rm -rf pkg/
21
+ - Release the gem to rubygems
22
+ rake release
23
+
24
+ CSS
25
+ ===
26
+
1
27
  When converting bootstrap.css to bootstrap.css.erb:
2
28
 
3
29
  Find:
4
- "../img/glyphicons-halflings.png"
30
+ ../img/glyphicons-halflings.png
5
31
  Replace with:
6
32
  <%= asset_path "glyphicons-halflings.png" %>
7
33
 
8
34
  Find:
9
- "../img/glyphicons-halflings-white.png"
35
+ ../img/glyphicons-halflings-white.png
10
36
  Replace with:
11
37
  <%= asset_path "glyphicons-halflings-white.png" %>
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+ Javascript
48
+ ==========
49
+
50
+ rm vendor/assets/javascripts/bootstrap/application.js
51
+ rm vendor/assets/javascripts/bootstrap/bootstrap.js
52
+ rm vendor/assets/javascripts/bootstrap/bootstrap.min.js
53
+ rm vendor/assets/javascripts/bootstrap/jquery.js
@@ -1,3 +1,3 @@
1
1
  module Jombo
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -0,0 +1,102 @@
1
+ /* ==========================================================
2
+ * bootstrap-affix.js v2.1.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#affix
4
+ * ==========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* AFFIX CLASS DEFINITION
27
+ * ====================== */
28
+
29
+ var Affix = function (element, options) {
30
+ this.options = $.extend({}, $.fn.affix.defaults, options)
31
+ this.$window = $(window)
32
+ .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
33
+ .on('resize.affix.data-api', $.proxy(this.refresh, this))
34
+ this.$element = $(element)
35
+ this.refresh()
36
+ }
37
+
38
+ Affix.prototype.refresh = function () {
39
+ this.position = this.$element.offset()
40
+ }
41
+
42
+ Affix.prototype.checkPosition = function () {
43
+ if (!this.$element.is(':visible')) return
44
+
45
+ var scrollLeft = this.$window.scrollLeft()
46
+ , scrollTop = this.$window.scrollTop()
47
+ , position = this.position
48
+ , offset = this.options.offset
49
+ , affix
50
+
51
+ if (typeof offset != 'object') offset = { x: offset, y: offset }
52
+
53
+ affix = (offset.x == null || (position.left - scrollLeft <= offset.x))
54
+ && (offset.y == null || (position.top - scrollTop <= offset.y))
55
+
56
+ if (affix == this.affixed) return
57
+
58
+ this.affixed = affix
59
+
60
+ this.$element[affix ? 'addClass' : 'removeClass']('affix')
61
+ }
62
+
63
+
64
+ /* AFFIX PLUGIN DEFINITION
65
+ * ======================= */
66
+
67
+ $.fn.affix = function (option) {
68
+ return this.each(function () {
69
+ var $this = $(this)
70
+ , data = $this.data('affix')
71
+ , options = typeof option == 'object' && option
72
+ if (!data) $this.data('affix', (data = new Affix(this, options)))
73
+ if (typeof option == 'string') data[option]()
74
+ })
75
+ }
76
+
77
+ $.fn.affix.Constructor = Affix
78
+
79
+ $.fn.affix.defaults = {
80
+ offset: 0
81
+ }
82
+
83
+
84
+ /* AFFIX DATA-API
85
+ * ============== */
86
+
87
+ $(function () {
88
+ $('[data-spy="affix"]').each(function () {
89
+ var $spy = $(this)
90
+ , data = $spy.data()
91
+
92
+ data.offset = data.offset || {}
93
+
94
+ data.offsetX && (data.offset.x = data.offsetX)
95
+ data.offsetY && (data.offset.y = data.offsetY)
96
+
97
+ $spy.affix(data)
98
+ })
99
+ })
100
+
101
+
102
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.3
2
+ * bootstrap-alert.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.3
2
+ * bootstrap-button.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.3
2
+ * bootstrap-carousel.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  , to: function (pos) {
49
- var $active = this.$element.find('.active')
49
+ var $active = this.$element.find('.item.active')
50
50
  , children = $active.parent().children()
51
51
  , activePos = children.index($active)
52
52
  , that = this
@@ -68,6 +68,10 @@
68
68
 
69
69
  , pause: function (e) {
70
70
  if (!e) this.paused = true
71
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
72
+ this.$element.trigger($.support.transition.end)
73
+ this.cycle()
74
+ }
71
75
  clearInterval(this.interval)
72
76
  this.interval = null
73
77
  return this
@@ -84,13 +88,15 @@
84
88
  }
85
89
 
86
90
  , slide: function (type, next) {
87
- var $active = this.$element.find('.active')
91
+ var $active = this.$element.find('.item.active')
88
92
  , $next = next || $active[type]()
89
93
  , isCycling = this.interval
90
94
  , direction = type == 'next' ? 'left' : 'right'
91
95
  , fallback = type == 'next' ? 'first' : 'last'
92
96
  , that = this
93
- , e = $.Event('slide')
97
+ , e = $.Event('slide', {
98
+ relatedTarget: $next[0]
99
+ })
94
100
 
95
101
  this.sliding = true
96
102
 
@@ -138,9 +144,10 @@
138
144
  var $this = $(this)
139
145
  , data = $this.data('carousel')
140
146
  , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
147
+ , action = typeof option == 'string' ? option : options.slide
141
148
  if (!data) $this.data('carousel', (data = new Carousel(this, options)))
142
149
  if (typeof option == 'number') data.to(option)
143
- else if (typeof option == 'string' || (option = options.slide)) data[option]()
150
+ else if (action) data[action]()
144
151
  else if (options.interval) data.cycle()
145
152
  })
146
153
  }
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.3
2
+ * bootstrap-collapse.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -67,7 +67,7 @@
67
67
 
68
68
  this.$element[dimension](0)
69
69
  this.transition('addClass', $.Event('show'), 'shown')
70
- this.$element[dimension](this.$element[0][scroll])
70
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
71
71
  }
72
72
 
73
73
  , hide: function () {
@@ -144,12 +144,13 @@
144
144
  * ==================== */
145
145
 
146
146
  $(function () {
147
- $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
147
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
148
148
  var $this = $(this), href
149
149
  , target = $this.attr('data-target')
150
150
  || e.preventDefault()
151
151
  || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
152
  , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
153
154
  $(target).collapse(option)
154
155
  })
155
156
  })
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.0.3
2
+ * bootstrap-dropdown.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -26,7 +26,7 @@
26
26
  /* DROPDOWN CLASS DEFINITION
27
27
  * ========================= */
28
28
 
29
- var toggle = '[data-toggle="dropdown"]'
29
+ var toggle = '[data-toggle=dropdown]'
30
30
  , Dropdown = function (element) {
31
31
  var $el = $(element).on('click.dropdown.data-api', this.toggle)
32
32
  $('html').on('click.dropdown.data-api', function () {
@@ -41,34 +41,82 @@
41
41
  , toggle: function (e) {
42
42
  var $this = $(this)
43
43
  , $parent
44
- , selector
45
44
  , isActive
46
45
 
47
46
  if ($this.is('.disabled, :disabled')) return
48
47
 
49
- selector = $this.attr('data-target')
48
+ $parent = getParent($this)
50
49
 
51
- if (!selector) {
52
- selector = $this.attr('href')
53
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
50
+ isActive = $parent.hasClass('open')
51
+
52
+ clearMenus()
53
+
54
+ if (!isActive) {
55
+ $parent.toggleClass('open')
56
+ $this.focus()
54
57
  }
55
58
 
56
- $parent = $(selector)
57
- $parent.length || ($parent = $this.parent())
59
+ return false
60
+ }
61
+
62
+ , keydown: function (e) {
63
+ var $this
64
+ , $items
65
+ , $active
66
+ , $parent
67
+ , isActive
68
+ , index
69
+
70
+ if (!/(38|40|27)/.test(e.keyCode)) return
71
+
72
+ $this = $(this)
73
+
74
+ e.preventDefault()
75
+ e.stopPropagation()
76
+
77
+ if ($this.is('.disabled, :disabled')) return
78
+
79
+ $parent = getParent($this)
58
80
 
59
81
  isActive = $parent.hasClass('open')
60
82
 
61
- clearMenus()
83
+ if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
62
84
 
63
- if (!isActive) $parent.toggleClass('open')
85
+ $items = $('[role=menu] li:not(.divider) a', $parent)
64
86
 
65
- return false
87
+ if (!$items.length) return
88
+
89
+ index = $items.index($items.filter(':focus'))
90
+
91
+ if (e.keyCode == 38 && index > 0) index-- // up
92
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
93
+ if (!~index) index = 0
94
+
95
+ $items
96
+ .eq(index)
97
+ .focus()
66
98
  }
67
99
 
68
100
  }
69
101
 
70
102
  function clearMenus() {
71
- $(toggle).parent().removeClass('open')
103
+ getParent($(toggle))
104
+ .removeClass('open')
105
+ }
106
+
107
+ function getParent($this) {
108
+ var selector = $this.attr('data-target')
109
+ , $parent
110
+
111
+ if (!selector) {
112
+ selector = $this.attr('href')
113
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
114
+ }
115
+
116
+ $parent = $(selector)
117
+ $parent.length || ($parent = $this.parent())
118
+
119
+ return $parent
72
120
  }
73
121
 
74
122
 
@@ -91,10 +139,12 @@
91
139
  * =================================== */
92
140
 
93
141
  $(function () {
94
- $('html').on('click.dropdown.data-api', clearMenus)
142
+ $('html')
143
+ .on('click.dropdown.data-api', clearMenus)
95
144
  $('body')
96
145
  .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97
- .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
146
+ .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
147
+ .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
98
148
  })
99
149
 
100
150
  }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v2.0.3
2
+ * bootstrap-modal.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modals
4
4
  * =========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -26,10 +26,11 @@
26
26
  /* MODAL CLASS DEFINITION
27
27
  * ====================== */
28
28
 
29
- var Modal = function (content, options) {
29
+ var Modal = function (element, options) {
30
30
  this.options = options
31
- this.$element = $(content)
31
+ this.$element = $(element)
32
32
  .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
33
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
33
34
  }
34
35
 
35
36
  Modal.prototype = {
@@ -52,8 +53,9 @@
52
53
 
53
54
  this.isShown = true
54
55
 
55
- escape.call(this)
56
- backdrop.call(this, function () {
56
+ this.escape()
57
+
58
+ this.backdrop(function () {
57
59
  var transition = $.support.transition && that.$element.hasClass('fade')
58
60
 
59
61
  if (!that.$element.parent().length) {
@@ -69,6 +71,8 @@
69
71
 
70
72
  that.$element.addClass('in')
71
73
 
74
+ that.enforceFocus()
75
+
72
76
  transition ?
73
77
  that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
74
78
  that.$element.trigger('shown')
@@ -91,90 +95,96 @@
91
95
 
92
96
  $('body').removeClass('modal-open')
93
97
 
94
- escape.call(this)
98
+ this.escape()
99
+
100
+ $(document).off('focusin.modal')
95
101
 
96
102
  this.$element.removeClass('in')
97
103
 
98
104
  $.support.transition && this.$element.hasClass('fade') ?
99
- hideWithTransition.call(this) :
100
- hideModal.call(this)
105
+ this.hideWithTransition() :
106
+ this.hideModal()
101
107
  }
102
108
 
103
- }
104
-
105
-
106
- /* MODAL PRIVATE METHODS
107
- * ===================== */
108
-
109
- function hideWithTransition() {
110
- var that = this
111
- , timeout = setTimeout(function () {
112
- that.$element.off($.support.transition.end)
113
- hideModal.call(that)
114
- }, 500)
109
+ , enforceFocus: function () {
110
+ var that = this
111
+ $(document).on('focusin.modal', function (e) {
112
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
113
+ that.$element.focus()
114
+ }
115
+ })
116
+ }
115
117
 
116
- this.$element.one($.support.transition.end, function () {
117
- clearTimeout(timeout)
118
- hideModal.call(that)
119
- })
120
- }
118
+ , escape: function () {
119
+ var that = this
120
+ if (this.isShown && this.options.keyboard) {
121
+ $(document).on('keyup.dismiss.modal', function ( e ) {
122
+ e.which == 27 && that.hide()
123
+ })
124
+ } else if (!this.isShown) {
125
+ $(document).off('keyup.dismiss.modal')
126
+ }
127
+ }
121
128
 
122
- function hideModal(that) {
123
- this.$element
124
- .hide()
125
- .trigger('hidden')
129
+ , hideWithTransition: function () {
130
+ var that = this
131
+ , timeout = setTimeout(function () {
132
+ that.$element.off($.support.transition.end)
133
+ that.hideModal()
134
+ }, 500)
135
+
136
+ this.$element.one($.support.transition.end, function () {
137
+ clearTimeout(timeout)
138
+ that.hideModal()
139
+ })
140
+ }
126
141
 
127
- backdrop.call(this)
128
- }
142
+ , hideModal: function (that) {
143
+ this.$element
144
+ .hide()
145
+ .trigger('hidden')
129
146
 
130
- function backdrop(callback) {
131
- var that = this
132
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
147
+ this.backdrop()
148
+ }
133
149
 
134
- if (this.isShown && this.options.backdrop) {
135
- var doAnimate = $.support.transition && animate
150
+ , removeBackdrop: function () {
151
+ this.$backdrop.remove()
152
+ this.$backdrop = null
153
+ }
136
154
 
137
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
138
- .appendTo(document.body)
155
+ , backdrop: function (callback) {
156
+ var that = this
157
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
139
158
 
140
- if (this.options.backdrop != 'static') {
141
- this.$backdrop.click($.proxy(this.hide, this))
142
- }
159
+ if (this.isShown && this.options.backdrop) {
160
+ var doAnimate = $.support.transition && animate
143
161
 
144
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
162
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
163
+ .appendTo(document.body)
145
164
 
146
- this.$backdrop.addClass('in')
165
+ if (this.options.backdrop != 'static') {
166
+ this.$backdrop.click($.proxy(this.hide, this))
167
+ }
147
168
 
148
- doAnimate ?
149
- this.$backdrop.one($.support.transition.end, callback) :
150
- callback()
169
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
151
170
 
152
- } else if (!this.isShown && this.$backdrop) {
153
- this.$backdrop.removeClass('in')
171
+ this.$backdrop.addClass('in')
154
172
 
155
- $.support.transition && this.$element.hasClass('fade')?
156
- this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
157
- removeBackdrop.call(this)
173
+ doAnimate ?
174
+ this.$backdrop.one($.support.transition.end, callback) :
175
+ callback()
158
176
 
159
- } else if (callback) {
160
- callback()
161
- }
162
- }
177
+ } else if (!this.isShown && this.$backdrop) {
178
+ this.$backdrop.removeClass('in')
163
179
 
164
- function removeBackdrop() {
165
- this.$backdrop.remove()
166
- this.$backdrop = null
167
- }
180
+ $.support.transition && this.$element.hasClass('fade')?
181
+ this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
182
+ this.removeBackdrop()
168
183
 
169
- function escape() {
170
- var that = this
171
- if (this.isShown && this.options.keyboard) {
172
- $(document).on('keyup.dismiss.modal', function ( e ) {
173
- e.which == 27 && that.hide()
174
- })
175
- } else if (!this.isShown) {
176
- $(document).off('keyup.dismiss.modal')
177
- }
184
+ } else if (callback) {
185
+ callback()
186
+ }
187
+ }
178
188
  }
179
189
 
180
190
 
@@ -206,9 +216,10 @@
206
216
 
207
217
  $(function () {
208
218
  $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
209
- var $this = $(this), href
210
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
211
- , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
219
+ var $this = $(this)
220
+ , href = $this.attr('href')
221
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
222
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
212
223
 
213
224
  e.preventDefault()
214
225
  $target.modal(option)