less-rails-bootstrap 2.3.3 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +7 -11
  4. data/lib/less/rails/bootstrap/version.rb +1 -1
  5. data/scripts/update_bootstrap.sh +37 -8
  6. data/test/cases/usage_css_spec.rb +15 -12
  7. data/test/cases/usage_js_spec.rb +4 -4
  8. data/test/dummy_app/app/assets/stylesheets/fonts.css.less +2 -0
  9. data/test/dummy_app/app/assets/stylesheets/framework.css.less +4 -2
  10. data/test/dummy_app/app/assets/stylesheets/individual.css.less +2 -2
  11. data/test/spec_helper.rb +1 -2
  12. data/vendor/assets/javascripts/twitter/bootstrap.js +0 -1
  13. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +58 -49
  14. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +36 -37
  15. data/vendor/assets/javascripts/twitter/bootstrap/button.js +41 -39
  16. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +131 -125
  17. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +108 -96
  18. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +72 -87
  19. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +149 -155
  20. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +60 -59
  21. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +103 -107
  22. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +73 -82
  23. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +258 -255
  24. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +34 -38
  25. data/vendor/frameworks/twitter/bootstrap/accordion.less +9 -12
  26. data/vendor/frameworks/twitter/bootstrap/alerts.less +43 -53
  27. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +21 -21
  28. data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +7 -8
  29. data/vendor/frameworks/twitter/bootstrap/button-groups.less +93 -151
  30. data/vendor/frameworks/twitter/bootstrap/buttons.less +93 -164
  31. data/vendor/frameworks/twitter/bootstrap/carousel.less +110 -63
  32. data/vendor/frameworks/twitter/bootstrap/close.less +18 -17
  33. data/vendor/frameworks/twitter/bootstrap/code.less +14 -20
  34. data/vendor/frameworks/twitter/bootstrap/component-animations.less +10 -3
  35. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +66 -143
  36. data/vendor/frameworks/twitter/bootstrap/forms.less +281 -548
  37. data/vendor/frameworks/twitter/bootstrap/grid.less +194 -11
  38. data/vendor/frameworks/twitter/bootstrap/media.less +8 -7
  39. data/vendor/frameworks/twitter/bootstrap/mixins.less +290 -446
  40. data/vendor/frameworks/twitter/bootstrap/modals.less +92 -51
  41. data/vendor/frameworks/twitter/bootstrap/navbar.less +285 -402
  42. data/vendor/frameworks/twitter/bootstrap/navs.less +176 -348
  43. data/vendor/frameworks/twitter/bootstrap/pager.less +45 -33
  44. data/vendor/frameworks/twitter/bootstrap/pagination.less +89 -104
  45. data/vendor/frameworks/twitter/bootstrap/popovers.less +53 -51
  46. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +28 -45
  47. data/vendor/frameworks/twitter/bootstrap/responsive-utilities.less +92 -32
  48. data/vendor/frameworks/twitter/bootstrap/scaffolding.less +60 -18
  49. data/vendor/frameworks/twitter/bootstrap/tables.less +131 -164
  50. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +20 -31
  51. data/vendor/frameworks/twitter/bootstrap/tooltip.less +45 -20
  52. data/vendor/frameworks/twitter/bootstrap/type.less +84 -99
  53. data/vendor/frameworks/twitter/bootstrap/utilities.less +17 -5
  54. data/vendor/frameworks/twitter/bootstrap/variables.less +446 -179
  55. data/vendor/frameworks/twitter/bootstrap/wells.less +5 -5
  56. metadata +41 -44
  57. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  58. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  59. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +0 -335
  60. data/vendor/assets/stylesheets/twitter/bootstrap-responsive.css.less +0 -1
  61. data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
  62. data/vendor/frameworks/twitter/bootstrap.less +0 -1
  63. data/vendor/frameworks/twitter/bootstrap/hero-unit.less +0 -25
  64. data/vendor/frameworks/twitter/bootstrap/labels-badges.less +0 -84
  65. data/vendor/frameworks/twitter/bootstrap/layouts.less +0 -16
  66. data/vendor/frameworks/twitter/bootstrap/reset.less +0 -216
  67. data/vendor/frameworks/twitter/bootstrap/responsive-1200px-min.less +0 -28
  68. data/vendor/frameworks/twitter/bootstrap/responsive-767px-max.less +0 -193
  69. data/vendor/frameworks/twitter/bootstrap/responsive-768px-979px.less +0 -19
  70. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.less +0 -189
  71. data/vendor/frameworks/twitter/bootstrap/responsive.less +0 -48
  72. data/vendor/frameworks/twitter/bootstrap/sprites.less +0 -197
@@ -1,7 +1,7 @@
1
- /* =========================================================
2
- * bootstrap-modal.js v2.3.2
3
- * http://twitter.github.com/bootstrap/javascript.html#modals
4
- * =========================================================
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#modals
4
+ * ========================================================================
5
5
  * Copyright 2012 Twitter, Inc.
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,210 +15,200 @@
15
15
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
- * ========================================================= */
18
+ * ======================================================================== */
19
19
 
20
20
 
21
- !function ($) {
21
+ +function ($) { "use strict";
22
22
 
23
- "use strict"; // jshint ;_;
24
-
25
-
26
- /* MODAL CLASS DEFINITION
27
- * ====================== */
23
+ // MODAL CLASS DEFINITION
24
+ // ======================
28
25
 
29
26
  var Modal = function (element, options) {
30
- this.options = options
31
- this.$element = $(element)
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)
34
- }
27
+ this.options = options
28
+ this.$element = $(element).on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
29
+ this.$backdrop =
30
+ this.isShown = null
35
31
 
36
- Modal.prototype = {
37
-
38
- constructor: Modal
39
-
40
- , toggle: function () {
41
- return this[!this.isShown ? 'show' : 'hide']()
42
- }
43
-
44
- , show: function () {
45
- var that = this
46
- , e = $.Event('show')
47
-
48
- this.$element.trigger(e)
32
+ if (this.options.remote) this.$element.find('.modal-body').load(this.options.remote)
33
+ }
49
34
 
50
- if (this.isShown || e.isDefaultPrevented()) return
35
+ Modal.DEFAULTS = {
36
+ backdrop: true
37
+ , keyboard: true
38
+ , show: true
39
+ }
51
40
 
52
- this.isShown = true
41
+ Modal.prototype.toggle = function () {
42
+ return this[!this.isShown ? 'show' : 'hide']()
43
+ }
53
44
 
54
- this.escape()
45
+ Modal.prototype.show = function () {
46
+ var that = this
47
+ var e = $.Event('show.bs.modal')
55
48
 
56
- this.backdrop(function () {
57
- var transition = $.support.transition && that.$element.hasClass('fade')
49
+ this.$element.trigger(e)
58
50
 
59
- if (!that.$element.parent().length) {
60
- that.$element.appendTo(document.body) //don't move modals dom position
61
- }
51
+ if (this.isShown || e.isDefaultPrevented()) return
62
52
 
63
- that.$element.show()
53
+ this.isShown = true
64
54
 
65
- if (transition) {
66
- that.$element[0].offsetWidth // force reflow
67
- }
55
+ this.escape()
68
56
 
69
- that.$element
70
- .addClass('in')
71
- .attr('aria-hidden', false)
57
+ this.backdrop(function () {
58
+ var transition = $.support.transition && that.$element.hasClass('fade')
72
59
 
73
- that.enforceFocus()
60
+ if (!that.$element.parent().length) {
61
+ that.$element.appendTo(document.body) // don't move modals dom position
62
+ }
74
63
 
75
- transition ?
76
- that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
77
- that.$element.focus().trigger('shown')
64
+ that.$element.show()
78
65
 
79
- })
66
+ if (transition) {
67
+ that.$element[0].offsetWidth // force reflow
80
68
  }
81
69
 
82
- , hide: function (e) {
83
- e && e.preventDefault()
70
+ that.$element
71
+ .addClass('in')
72
+ .attr('aria-hidden', false)
84
73
 
85
- var that = this
74
+ that.enforceFocus()
86
75
 
87
- e = $.Event('hide')
76
+ transition ?
77
+ that.$element
78
+ .one($.support.transition.end, function () {
79
+ that.$element.focus().trigger('shown.bs.modal')
80
+ })
81
+ .emulateTransitionEnd(300) :
82
+ that.$element.focus().trigger('shown.bs.modal')
83
+ })
84
+ }
88
85
 
89
- this.$element.trigger(e)
86
+ Modal.prototype.hide = function (e) {
87
+ if (e) e.preventDefault()
90
88
 
91
- if (!this.isShown || e.isDefaultPrevented()) return
89
+ e = $.Event('hide.bs.modal')
92
90
 
93
- this.isShown = false
91
+ this.$element.trigger(e)
94
92
 
95
- this.escape()
93
+ if (!this.isShown || e.isDefaultPrevented()) return
96
94
 
97
- $(document).off('focusin.modal')
95
+ this.isShown = false
98
96
 
99
- this.$element
100
- .removeClass('in')
101
- .attr('aria-hidden', true)
97
+ this.escape()
102
98
 
103
- $.support.transition && this.$element.hasClass('fade') ?
104
- this.hideWithTransition() :
105
- this.hideModal()
106
- }
99
+ $(document).off('focusin.bs.modal')
107
100
 
108
- , enforceFocus: function () {
109
- var that = this
110
- $(document).on('focusin.modal', function (e) {
111
- if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
112
- that.$element.focus()
113
- }
114
- })
115
- }
101
+ this.$element
102
+ .removeClass('in')
103
+ .attr('aria-hidden', true)
116
104
 
117
- , escape: function () {
118
- var that = this
119
- if (this.isShown && this.options.keyboard) {
120
- this.$element.on('keyup.dismiss.modal', function ( e ) {
121
- e.which == 27 && that.hide()
122
- })
123
- } else if (!this.isShown) {
124
- this.$element.off('keyup.dismiss.modal')
105
+ $.support.transition && this.$element.hasClass('fade') ?
106
+ this.$element
107
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
108
+ .emulateTransitionEnd(300) :
109
+ this.hideModal()
110
+ }
111
+
112
+ Modal.prototype.enforceFocus = function () {
113
+ $(document)
114
+ .off('focusin.bs.modal') // guard against infinite focus loop
115
+ .on('focusin.bs.modal', $.proxy(function (e) {
116
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
117
+ this.$element.focus()
125
118
  }
126
- }
119
+ }, this))
120
+ }
127
121
 
128
- , hideWithTransition: function () {
129
- var that = this
130
- , timeout = setTimeout(function () {
131
- that.$element.off($.support.transition.end)
132
- that.hideModal()
133
- }, 500)
134
-
135
- this.$element.one($.support.transition.end, function () {
136
- clearTimeout(timeout)
137
- that.hideModal()
138
- })
139
- }
122
+ Modal.prototype.escape = function () {
123
+ if (this.isShown && this.options.keyboard) {
124
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
125
+ e.which == 27 && this.hide()
126
+ }, this))
127
+ } else if (!this.isShown) {
128
+ this.$element.off('keyup.dismiss.bs.modal')
129
+ }
130
+ }
140
131
 
141
- , hideModal: function () {
142
- var that = this
143
- this.$element.hide()
144
- this.backdrop(function () {
145
- that.removeBackdrop()
146
- that.$element.trigger('hidden')
147
- })
148
- }
132
+ Modal.prototype.hideModal = function () {
133
+ var that = this
134
+ this.$element.hide()
135
+ this.backdrop(function () {
136
+ that.removeBackdrop()
137
+ that.$element.trigger('hidden.bs.modal')
138
+ })
139
+ }
149
140
 
150
- , removeBackdrop: function () {
151
- this.$backdrop && this.$backdrop.remove()
152
- this.$backdrop = null
153
- }
141
+ Modal.prototype.removeBackdrop = function () {
142
+ this.$backdrop && this.$backdrop.remove()
143
+ this.$backdrop = null
144
+ }
154
145
 
155
- , backdrop: function (callback) {
156
- var that = this
157
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
146
+ Modal.prototype.backdrop = function (callback) {
147
+ var that = this
148
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
158
149
 
159
- if (this.isShown && this.options.backdrop) {
160
- var doAnimate = $.support.transition && animate
150
+ if (this.isShown && this.options.backdrop) {
151
+ var doAnimate = $.support.transition && animate
161
152
 
162
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
163
- .appendTo(document.body)
153
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
154
+ .appendTo(document.body)
164
155
 
165
- this.$backdrop.click(
166
- this.options.backdrop == 'static' ?
167
- $.proxy(this.$element[0].focus, this.$element[0])
168
- : $.proxy(this.hide, this)
169
- )
156
+ this.$element.on('click', $.proxy(function (e) {
157
+ if (e.target !== e.currentTarget) return
158
+ this.options.backdrop == 'static'
159
+ ? this.$element[0].focus.call(this.$element[0])
160
+ : this.hide.call(this)
161
+ }, this))
170
162
 
171
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
163
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
172
164
 
173
- this.$backdrop.addClass('in')
165
+ this.$backdrop.addClass('in')
174
166
 
175
- if (!callback) return
167
+ if (!callback) return
176
168
 
177
- doAnimate ?
178
- this.$backdrop.one($.support.transition.end, callback) :
179
- callback()
169
+ doAnimate ?
170
+ this.$backdrop
171
+ .one($.support.transition.end, callback)
172
+ .emulateTransitionEnd(150) :
173
+ callback()
180
174
 
181
- } else if (!this.isShown && this.$backdrop) {
182
- this.$backdrop.removeClass('in')
175
+ } else if (!this.isShown && this.$backdrop) {
176
+ this.$backdrop.removeClass('in')
183
177
 
184
- $.support.transition && this.$element.hasClass('fade')?
185
- this.$backdrop.one($.support.transition.end, callback) :
186
- callback()
178
+ $.support.transition && this.$element.hasClass('fade')?
179
+ this.$backdrop
180
+ .one($.support.transition.end, callback)
181
+ .emulateTransitionEnd(150) :
182
+ callback()
187
183
 
188
- } else if (callback) {
189
- callback()
190
- }
191
- }
184
+ } else if (callback) {
185
+ callback()
186
+ }
192
187
  }
193
188
 
194
189
 
195
- /* MODAL PLUGIN DEFINITION
196
- * ======================= */
190
+ // MODAL PLUGIN DEFINITION
191
+ // =======================
197
192
 
198
193
  var old = $.fn.modal
199
194
 
200
195
  $.fn.modal = function (option) {
201
196
  return this.each(function () {
202
- var $this = $(this)
203
- , data = $this.data('modal')
204
- , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
205
- if (!data) $this.data('modal', (data = new Modal(this, options)))
197
+ var $this = $(this)
198
+ var data = $this.data('bs.modal')
199
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
200
+
201
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
206
202
  if (typeof option == 'string') data[option]()
207
203
  else if (options.show) data.show()
208
204
  })
209
205
  }
210
206
 
211
- $.fn.modal.defaults = {
212
- backdrop: true
213
- , keyboard: true
214
- , show: true
215
- }
216
-
217
207
  $.fn.modal.Constructor = Modal
218
208
 
219
209
 
220
- /* MODAL NO CONFLICT
221
- * ================= */
210
+ // MODAL NO CONFLICT
211
+ // =================
222
212
 
223
213
  $.fn.modal.noConflict = function () {
224
214
  $.fn.modal = old
@@ -226,22 +216,26 @@
226
216
  }
227
217
 
228
218
 
229
- /* MODAL DATA-API
230
- * ============== */
219
+ // MODAL DATA-API
220
+ // ==============
231
221
 
232
- $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
233
- var $this = $(this)
234
- , href = $this.attr('href')
235
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
236
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
222
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
223
+ var $this = $(this)
224
+ var href = $this.attr('href')
225
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
226
+ var option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
237
227
 
238
228
  e.preventDefault()
239
229
 
240
230
  $target
241
231
  .modal(option)
242
232
  .one('hide', function () {
243
- $this.focus()
233
+ $this.is(':visible') && $this.focus()
244
234
  })
245
235
  })
246
236
 
237
+ var $body = $(document.body)
238
+ .on('shown.bs.modal', '.modal', function () { $body.addClass('modal-open') })
239
+ .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
240
+
247
241
  }(window.jQuery);
@@ -1,7 +1,7 @@
1
- /* ===========================================================
2
- * bootstrap-popover.js v2.3.2
3
- * http://twitter.github.com/bootstrap/javascript.html#popovers
4
- * ===========================================================
1
+ /* ========================================================================
2
+ * Bootstrap: popover.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#popovers
4
+ * ========================================================================
5
5
  * Copyright 2012 Twitter, Inc.
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,96 +15,97 @@
15
15
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
- * =========================================================== */
18
+ * ======================================================================== */
19
19
 
20
20
 
21
- !function ($) {
21
+ +function ($) { "use strict";
22
22
 
23
- "use strict"; // jshint ;_;
24
-
25
-
26
- /* POPOVER PUBLIC CLASS DEFINITION
27
- * =============================== */
23
+ // POPOVER PUBLIC CLASS DEFINITION
24
+ // ===============================
28
25
 
29
26
  var Popover = function (element, options) {
30
27
  this.init('popover', element, options)
31
28
  }
32
29
 
30
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
33
31
 
34
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35
- ========================================== */
32
+ Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
33
+ placement: 'right'
34
+ , trigger: 'click'
35
+ , content: ''
36
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
37
+ })
36
38
 
37
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38
39
 
39
- constructor: Popover
40
+ // NOTE: POPOVER EXTENDS tooltip.js
41
+ // ================================
40
42
 
41
- , setContent: function () {
42
- var $tip = this.tip()
43
- , title = this.getTitle()
44
- , content = this.getContent()
43
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
45
44
 
46
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
45
+ Popover.prototype.constructor = Popover
48
46
 
49
- $tip.removeClass('fade top bottom left right in')
50
- }
47
+ Popover.prototype.getDefaults = function () {
48
+ return Popover.DEFAULTS
49
+ }
51
50
 
52
- , hasContent: function () {
53
- return this.getTitle() || this.getContent()
54
- }
51
+ Popover.prototype.setContent = function () {
52
+ var $tip = this.tip()
53
+ var title = this.getTitle()
54
+ var content = this.getContent()
55
55
 
56
- , getContent: function () {
57
- var content
58
- , $e = this.$element
59
- , o = this.options
56
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
57
+ $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
60
58
 
61
- content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
62
- || $e.attr('data-content')
59
+ $tip.removeClass('fade top bottom left right in')
63
60
 
64
- return content
65
- }
61
+ $tip.find('.popover-title:empty').hide()
62
+ }
66
63
 
67
- , tip: function () {
68
- if (!this.$tip) {
69
- this.$tip = $(this.options.template)
70
- }
71
- return this.$tip
72
- }
64
+ Popover.prototype.hasContent = function () {
65
+ return this.getTitle() || this.getContent()
66
+ }
73
67
 
74
- , destroy: function () {
75
- this.hide().$element.off('.' + this.type).removeData(this.type)
76
- }
68
+ Popover.prototype.getContent = function () {
69
+ var $e = this.$element
70
+ var o = this.options
77
71
 
78
- })
72
+ return $e.attr('data-content')
73
+ || (typeof o.content == 'function' ?
74
+ o.content.call($e[0]) :
75
+ o.content)
76
+ }
79
77
 
78
+ Popover.prototype.tip = function () {
79
+ if (!this.$tip) this.$tip = $(this.options.template)
80
+ return this.$tip
81
+ }
82
+
83
+ Popover.prototype.destroy = function () {
84
+ this.hide().$element.off('.' + this.type).removeData(this.type)
85
+ }
80
86
 
81
- /* POPOVER PLUGIN DEFINITION
82
- * ======================= */
87
+
88
+ // POPOVER PLUGIN DEFINITION
89
+ // =========================
83
90
 
84
91
  var old = $.fn.popover
85
92
 
86
93
  $.fn.popover = function (option) {
87
94
  return this.each(function () {
88
- var $this = $(this)
89
- , data = $this.data('popover')
90
- , options = typeof option == 'object' && option
91
- if (!data) $this.data('popover', (data = new Popover(this, options)))
95
+ var $this = $(this)
96
+ var data = $this.data('bs.popover')
97
+ var options = typeof option == 'object' && option
98
+
99
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
92
100
  if (typeof option == 'string') data[option]()
93
101
  })
94
102
  }
95
103
 
96
104
  $.fn.popover.Constructor = Popover
97
105
 
98
- $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
99
- placement: 'right'
100
- , trigger: 'click'
101
- , content: ''
102
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
103
- })
104
-
105
106
 
106
- /* POPOVER NO CONFLICT
107
- * =================== */
107
+ // POPOVER NO CONFLICT
108
+ // ===================
108
109
 
109
110
  $.fn.popover.noConflict = function () {
110
111
  $.fn.popover = old