less-rails-bootstrap 1.4.3 → 2.0.0
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.
- data/CHANGELOG.md +5 -0
- data/lib/less/rails/bootstrap/version.rb +1 -1
- data/test/cases/usage_css_spec.rb +2 -9
- data/test/cases/usage_js_spec.rb +5 -7
- data/vendor/assets/javascripts/twitter/bootstrap.js +12 -8
- data/vendor/assets/javascripts/twitter/bootstrap/alert.js +91 -0
- data/vendor/assets/javascripts/twitter/bootstrap/button.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +154 -0
- data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +136 -0
- data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +58 -21
- data/vendor/assets/javascripts/twitter/bootstrap/modal.js +63 -114
- data/vendor/assets/javascripts/twitter/bootstrap/popover.js +39 -30
- data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +62 -44
- data/vendor/assets/javascripts/twitter/bootstrap/tab.js +130 -0
- data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +270 -0
- data/vendor/assets/javascripts/twitter/bootstrap/transition.js +51 -0
- data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +271 -0
- data/vendor/frameworks/twitter/bootstrap/accordion.less +28 -0
- data/vendor/frameworks/twitter/bootstrap/alerts.less +70 -0
- data/vendor/frameworks/twitter/bootstrap/bootstrap.less +41 -5
- data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +22 -0
- data/vendor/frameworks/twitter/bootstrap/button-groups.less +147 -0
- data/vendor/frameworks/twitter/bootstrap/buttons.less +165 -0
- data/vendor/frameworks/twitter/bootstrap/carousel.less +121 -0
- data/vendor/frameworks/twitter/bootstrap/close.less +18 -0
- data/vendor/frameworks/twitter/bootstrap/code.less +44 -0
- data/vendor/frameworks/twitter/bootstrap/component-animations.less +18 -0
- data/vendor/frameworks/twitter/bootstrap/dropdowns.less +131 -0
- data/vendor/frameworks/twitter/bootstrap/forms.less +336 -300
- data/vendor/frameworks/twitter/bootstrap/grid.less +8 -0
- data/vendor/frameworks/twitter/bootstrap/hero-unit.less +20 -0
- data/vendor/frameworks/twitter/bootstrap/labels.less +16 -0
- data/vendor/frameworks/twitter/bootstrap/layouts.less +17 -0
- data/vendor/frameworks/twitter/bootstrap/mixins.less +391 -76
- data/vendor/frameworks/twitter/bootstrap/modals.less +72 -0
- data/vendor/frameworks/twitter/bootstrap/navbar.less +292 -0
- data/vendor/frameworks/twitter/bootstrap/navs.less +343 -0
- data/vendor/frameworks/twitter/bootstrap/pager.less +30 -0
- data/vendor/frameworks/twitter/bootstrap/pagination.less +55 -0
- data/vendor/frameworks/twitter/bootstrap/patterns.less +5 -1052
- data/vendor/frameworks/twitter/bootstrap/popovers.less +49 -0
- data/vendor/frameworks/twitter/bootstrap/print.less +18 -0
- data/vendor/frameworks/twitter/bootstrap/progress-bars.less +95 -0
- data/vendor/frameworks/twitter/bootstrap/reset.less +37 -52
- data/vendor/frameworks/twitter/bootstrap/responsive.less +323 -0
- data/vendor/frameworks/twitter/bootstrap/scaffolding.less +13 -121
- data/vendor/frameworks/twitter/bootstrap/sprites.less +156 -0
- data/vendor/frameworks/twitter/bootstrap/tables.less +75 -160
- data/vendor/frameworks/twitter/bootstrap/thumbnails.less +35 -0
- data/vendor/frameworks/twitter/bootstrap/tooltip.less +35 -0
- data/vendor/frameworks/twitter/bootstrap/type.less +100 -70
- data/vendor/frameworks/twitter/bootstrap/utilities.less +23 -0
- data/vendor/frameworks/twitter/bootstrap/variables.less +94 -55
- data/vendor/frameworks/twitter/bootstrap/wells.less +17 -0
- metadata +44 -11
- data/vendor/assets/javascripts/twitter/bootstrap/alerts.js +0 -113
- data/vendor/assets/javascripts/twitter/bootstrap/buttons.js +0 -62
- data/vendor/assets/javascripts/twitter/bootstrap/tabs.js +0 -80
- data/vendor/assets/javascripts/twitter/bootstrap/twipsy.js +0 -310
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-dropdown.js
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#
|
2
|
+
* bootstrap-dropdown.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
4
4
|
* ============================================================
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2012 Twitter, Inc.
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -22,34 +22,71 @@
|
|
22
22
|
|
23
23
|
"use strict"
|
24
24
|
|
25
|
+
/* DROPDOWN CLASS DEFINITION
|
26
|
+
* ========================= */
|
27
|
+
|
28
|
+
var toggle = '[data-toggle="dropdown"]'
|
29
|
+
, Dropdown = function ( element ) {
|
30
|
+
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
31
|
+
$('html').on('click.dropdown.data-api', function () {
|
32
|
+
$el.parent().removeClass('open')
|
33
|
+
})
|
34
|
+
}
|
35
|
+
|
36
|
+
Dropdown.prototype = {
|
37
|
+
|
38
|
+
constructor: Dropdown
|
39
|
+
|
40
|
+
, toggle: function ( e ) {
|
41
|
+
var $this = $(this)
|
42
|
+
, selector = $this.attr('data-target')
|
43
|
+
, $parent
|
44
|
+
, isActive
|
45
|
+
|
46
|
+
if (!selector) {
|
47
|
+
selector = $this.attr('href')
|
48
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
49
|
+
}
|
50
|
+
|
51
|
+
$parent = $(selector)
|
52
|
+
$parent.length || ($parent = $this.parent())
|
53
|
+
|
54
|
+
isActive = $parent.hasClass('open')
|
55
|
+
|
56
|
+
clearMenus()
|
57
|
+
!isActive && $parent.toggleClass('open')
|
58
|
+
|
59
|
+
return false
|
60
|
+
}
|
61
|
+
|
62
|
+
}
|
63
|
+
|
64
|
+
function clearMenus() {
|
65
|
+
$(toggle).parent().removeClass('open')
|
66
|
+
}
|
67
|
+
|
68
|
+
|
25
69
|
/* DROPDOWN PLUGIN DEFINITION
|
26
70
|
* ========================== */
|
27
71
|
|
28
|
-
$.fn.dropdown = function (
|
72
|
+
$.fn.dropdown = function ( option ) {
|
29
73
|
return this.each(function () {
|
30
|
-
$
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
clearMenus()
|
35
|
-
!isActive && li.toggleClass('open')
|
36
|
-
return false
|
37
|
-
})
|
74
|
+
var $this = $(this)
|
75
|
+
, data = $this.data('dropdown')
|
76
|
+
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
77
|
+
if (typeof option == 'string') data[option].call($this)
|
38
78
|
})
|
39
79
|
}
|
40
80
|
|
41
|
-
|
42
|
-
* =================================== */
|
81
|
+
$.fn.dropdown.Constructor = Dropdown
|
43
82
|
|
44
|
-
var d = 'a.menu, .dropdown-toggle'
|
45
83
|
|
46
|
-
|
47
|
-
|
48
|
-
}
|
84
|
+
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
85
|
+
* =================================== */
|
49
86
|
|
50
87
|
$(function () {
|
51
|
-
$('html').
|
52
|
-
$('body').
|
88
|
+
$('html').on('click.dropdown.data-api', clearMenus)
|
89
|
+
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
53
90
|
})
|
54
91
|
|
55
|
-
}( window.jQuery
|
92
|
+
}( window.jQuery )
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* =========================================================
|
2
|
-
* bootstrap-modal.js
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#
|
2
|
+
* bootstrap-modal.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
4
|
* =========================================================
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2012 Twitter, Inc.
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -22,58 +22,30 @@
|
|
22
22
|
|
23
23
|
"use strict"
|
24
24
|
|
25
|
-
/*
|
26
|
-
*
|
27
|
-
|
28
|
-
var transitionEnd
|
29
|
-
|
30
|
-
$(document).ready(function () {
|
31
|
-
|
32
|
-
$.support.transition = (function () {
|
33
|
-
var thisBody = document.body || document.documentElement
|
34
|
-
, thisStyle = thisBody.style
|
35
|
-
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
36
|
-
return support
|
37
|
-
})()
|
38
|
-
|
39
|
-
// set CSS transition event type
|
40
|
-
if ( $.support.transition ) {
|
41
|
-
transitionEnd = "TransitionEnd"
|
42
|
-
if ( $.browser.webkit ) {
|
43
|
-
transitionEnd = "webkitTransitionEnd"
|
44
|
-
} else if ( $.browser.mozilla ) {
|
45
|
-
transitionEnd = "transitionend"
|
46
|
-
} else if ( $.browser.opera ) {
|
47
|
-
transitionEnd = "oTransitionEnd"
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
})
|
52
|
-
|
53
|
-
|
54
|
-
/* MODAL PUBLIC CLASS DEFINITION
|
55
|
-
* ============================= */
|
25
|
+
/* MODAL CLASS DEFINITION
|
26
|
+
* ====================== */
|
56
27
|
|
57
28
|
var Modal = function ( content, options ) {
|
58
|
-
this.
|
29
|
+
this.options = $.extend({}, $.fn.modal.defaults, options)
|
59
30
|
this.$element = $(content)
|
60
|
-
.delegate('
|
61
|
-
|
62
|
-
if ( this.settings.show ) {
|
63
|
-
this.show()
|
64
|
-
}
|
65
|
-
|
66
|
-
return this
|
31
|
+
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
67
32
|
}
|
68
33
|
|
69
34
|
Modal.prototype = {
|
70
35
|
|
71
|
-
|
36
|
+
constructor: Modal
|
37
|
+
|
38
|
+
, toggle: function () {
|
72
39
|
return this[!this.isShown ? 'show' : 'hide']()
|
73
40
|
}
|
74
41
|
|
75
42
|
, show: function () {
|
76
43
|
var that = this
|
44
|
+
|
45
|
+
if (this.isShown) return
|
46
|
+
|
47
|
+
$('body').addClass('modal-open')
|
48
|
+
|
77
49
|
this.isShown = true
|
78
50
|
this.$element.trigger('show')
|
79
51
|
|
@@ -81,8 +53,9 @@
|
|
81
53
|
backdrop.call(this, function () {
|
82
54
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
83
55
|
|
56
|
+
!that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position
|
57
|
+
|
84
58
|
that.$element
|
85
|
-
.appendTo(document.body)
|
86
59
|
.show()
|
87
60
|
|
88
61
|
if (transition) {
|
@@ -92,24 +65,22 @@
|
|
92
65
|
that.$element.addClass('in')
|
93
66
|
|
94
67
|
transition ?
|
95
|
-
that.$element.one(
|
68
|
+
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
96
69
|
that.$element.trigger('shown')
|
97
70
|
|
98
71
|
})
|
99
|
-
|
100
|
-
return this
|
101
72
|
}
|
102
73
|
|
103
|
-
, hide: function (e) {
|
74
|
+
, hide: function ( e ) {
|
104
75
|
e && e.preventDefault()
|
105
76
|
|
106
|
-
if (
|
107
|
-
return this
|
108
|
-
}
|
77
|
+
if (!this.isShown) return
|
109
78
|
|
110
79
|
var that = this
|
111
80
|
this.isShown = false
|
112
81
|
|
82
|
+
$('body').removeClass('modal-open')
|
83
|
+
|
113
84
|
escape.call(this)
|
114
85
|
|
115
86
|
this.$element
|
@@ -119,8 +90,6 @@
|
|
119
90
|
$.support.transition && this.$element.hasClass('fade') ?
|
120
91
|
hideWithTransition.call(this) :
|
121
92
|
hideModal.call(this)
|
122
|
-
|
123
|
-
return this
|
124
93
|
}
|
125
94
|
|
126
95
|
}
|
@@ -130,20 +99,19 @@
|
|
130
99
|
* ===================== */
|
131
100
|
|
132
101
|
function hideWithTransition() {
|
133
|
-
// firefox drops transitionEnd events :{o
|
134
102
|
var that = this
|
135
103
|
, timeout = setTimeout(function () {
|
136
|
-
that.$element.
|
104
|
+
that.$element.off($.support.transition.end)
|
137
105
|
hideModal.call(that)
|
138
106
|
}, 500)
|
139
107
|
|
140
|
-
this.$element.one(
|
108
|
+
this.$element.one($.support.transition.end, function () {
|
141
109
|
clearTimeout(timeout)
|
142
110
|
hideModal.call(that)
|
143
111
|
})
|
144
112
|
}
|
145
113
|
|
146
|
-
function hideModal
|
114
|
+
function hideModal( that ) {
|
147
115
|
this.$element
|
148
116
|
.hide()
|
149
117
|
.trigger('hidden')
|
@@ -151,38 +119,37 @@
|
|
151
119
|
backdrop.call(this)
|
152
120
|
}
|
153
121
|
|
154
|
-
function backdrop
|
122
|
+
function backdrop( callback ) {
|
155
123
|
var that = this
|
156
124
|
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
157
|
-
|
125
|
+
|
126
|
+
if (this.isShown && this.options.backdrop) {
|
158
127
|
var doAnimate = $.support.transition && animate
|
159
128
|
|
160
129
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
161
130
|
.appendTo(document.body)
|
162
131
|
|
163
|
-
if (
|
132
|
+
if (this.options.backdrop != 'static') {
|
164
133
|
this.$backdrop.click($.proxy(this.hide, this))
|
165
134
|
}
|
166
135
|
|
167
|
-
if (
|
168
|
-
this.$backdrop[0].offsetWidth // force reflow
|
169
|
-
}
|
136
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
170
137
|
|
171
138
|
this.$backdrop.addClass('in')
|
172
139
|
|
173
140
|
doAnimate ?
|
174
|
-
this.$backdrop.one(
|
141
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
175
142
|
callback()
|
176
143
|
|
177
|
-
} else if (
|
144
|
+
} else if (!this.isShown && this.$backdrop) {
|
178
145
|
this.$backdrop.removeClass('in')
|
179
146
|
|
180
147
|
$.support.transition && this.$element.hasClass('fade')?
|
181
|
-
this.$backdrop.one(
|
148
|
+
this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
|
182
149
|
removeBackdrop.call(this)
|
183
150
|
|
184
|
-
} else if (
|
185
|
-
|
151
|
+
} else if (callback) {
|
152
|
+
callback()
|
186
153
|
}
|
187
154
|
}
|
188
155
|
|
@@ -193,14 +160,12 @@
|
|
193
160
|
|
194
161
|
function escape() {
|
195
162
|
var that = this
|
196
|
-
if (
|
197
|
-
$(document).
|
198
|
-
|
199
|
-
that.hide()
|
200
|
-
}
|
163
|
+
if (this.isShown && this.options.keyboard) {
|
164
|
+
$(document).on('keyup.dismiss.modal', function ( e ) {
|
165
|
+
e.which == 27 && that.hide()
|
201
166
|
})
|
202
|
-
} else if (
|
203
|
-
$(document).
|
167
|
+
} else if (!this.isShown) {
|
168
|
+
$(document).off('keyup.dismiss.modal')
|
204
169
|
}
|
205
170
|
}
|
206
171
|
|
@@ -208,53 +173,37 @@
|
|
208
173
|
/* MODAL PLUGIN DEFINITION
|
209
174
|
* ======================= */
|
210
175
|
|
211
|
-
$.fn.modal = function (
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
if (
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
}
|
221
|
-
|
222
|
-
return this.each(function () {
|
223
|
-
$(this).data('modal', new Modal(this, options))
|
224
|
-
})
|
225
|
-
}
|
226
|
-
|
227
|
-
if ( options === true ) {
|
228
|
-
return modal
|
229
|
-
}
|
230
|
-
|
231
|
-
if ( typeof options == 'string' ) {
|
232
|
-
modal[options]()
|
233
|
-
} else if ( modal ) {
|
234
|
-
modal.toggle()
|
235
|
-
}
|
236
|
-
|
237
|
-
return this
|
176
|
+
$.fn.modal = function ( option ) {
|
177
|
+
return this.each(function () {
|
178
|
+
var $this = $(this)
|
179
|
+
, data = $this.data('modal')
|
180
|
+
, options = typeof option == 'object' && option
|
181
|
+
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
182
|
+
if (typeof option == 'string') data[option]()
|
183
|
+
else data.show()
|
184
|
+
})
|
238
185
|
}
|
239
186
|
|
240
|
-
$.fn.modal.Modal = Modal
|
241
|
-
|
242
187
|
$.fn.modal.defaults = {
|
243
|
-
|
244
|
-
|
245
|
-
, show: false
|
188
|
+
backdrop: true
|
189
|
+
, keyboard: true
|
246
190
|
}
|
247
191
|
|
192
|
+
$.fn.modal.Constructor = Modal
|
193
|
+
|
194
|
+
|
195
|
+
/* MODAL DATA-API
|
196
|
+
* ============== */
|
248
197
|
|
249
|
-
|
250
|
-
|
198
|
+
$(function () {
|
199
|
+
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
200
|
+
var $this = $(this), href
|
201
|
+
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
202
|
+
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
|
251
203
|
|
252
|
-
$(document).ready(function () {
|
253
|
-
$('body').delegate('[data-controls-modal]', 'click', function (e) {
|
254
204
|
e.preventDefault()
|
255
|
-
|
256
|
-
$('#' + $this.attr('data-controls-modal')).modal( $this.data() )
|
205
|
+
$target.modal(option)
|
257
206
|
})
|
258
207
|
})
|
259
208
|
|
260
|
-
}( window.jQuery
|
209
|
+
}( window.jQuery )
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#
|
2
|
+
* bootstrap-popover.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2012 Twitter, Inc.
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -23,22 +23,25 @@
|
|
23
23
|
"use strict"
|
24
24
|
|
25
25
|
var Popover = function ( element, options ) {
|
26
|
-
this
|
27
|
-
this.options = options
|
28
|
-
this.enabled = true
|
29
|
-
this.fixTitle()
|
26
|
+
this.init('popover', element, options)
|
30
27
|
}
|
31
28
|
|
32
|
-
/* NOTE: POPOVER EXTENDS BOOTSTRAP-
|
33
|
-
|
29
|
+
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
30
|
+
========================================== */
|
34
31
|
|
35
|
-
Popover.prototype = $.extend({}, $.fn.
|
32
|
+
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
|
36
33
|
|
37
|
-
|
34
|
+
constructor: Popover
|
35
|
+
|
36
|
+
, setContent: function () {
|
38
37
|
var $tip = this.tip()
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
, title = this.getTitle()
|
39
|
+
, content = this.getContent()
|
40
|
+
|
41
|
+
$tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
|
42
|
+
$tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
|
43
|
+
|
44
|
+
$tip.removeClass('fade top bottom left right in')
|
42
45
|
}
|
43
46
|
|
44
47
|
, hasContent: function () {
|
@@ -47,21 +50,20 @@
|
|
47
50
|
|
48
51
|
, getContent: function () {
|
49
52
|
var content
|
50
|
-
|
51
|
-
|
53
|
+
, $e = this.$element
|
54
|
+
, o = this.options
|
55
|
+
|
56
|
+
content = $e.attr('data-content')
|
57
|
+
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
58
|
+
|
59
|
+
content = content.toString().replace(/(^\s*|\s*$)/, "")
|
52
60
|
|
53
|
-
if (typeof this.options.content == 'string') {
|
54
|
-
content = this.options.content
|
55
|
-
} else if (typeof this.options.content == 'function') {
|
56
|
-
content = this.options.content.call(this.$element[0])
|
57
|
-
}
|
58
61
|
return content
|
59
62
|
}
|
60
63
|
|
61
64
|
, tip: function() {
|
62
65
|
if (!this.$tip) {
|
63
|
-
this.$tip = $(
|
64
|
-
.html(this.options.template)
|
66
|
+
this.$tip = $(this.options.template)
|
65
67
|
}
|
66
68
|
return this.$tip
|
67
69
|
}
|
@@ -72,15 +74,22 @@
|
|
72
74
|
/* POPOVER PLUGIN DEFINITION
|
73
75
|
* ======================= */
|
74
76
|
|
75
|
-
$.fn.popover = function (
|
76
|
-
|
77
|
-
|
78
|
-
|
77
|
+
$.fn.popover = function ( option ) {
|
78
|
+
return this.each(function () {
|
79
|
+
var $this = $(this)
|
80
|
+
, data = $this.data('popover')
|
81
|
+
, options = typeof option == 'object' && option
|
82
|
+
if (!data) $this.data('popover', (data = new Popover(this, options)))
|
83
|
+
if (typeof option == 'string') data[option]()
|
84
|
+
})
|
79
85
|
}
|
80
86
|
|
81
|
-
$.fn.popover.
|
87
|
+
$.fn.popover.Constructor = Popover
|
88
|
+
|
89
|
+
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
82
90
|
placement: 'right'
|
83
|
-
,
|
91
|
+
, content: ''
|
92
|
+
, 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>'
|
84
93
|
})
|
85
94
|
|
86
|
-
}( window.jQuery
|
95
|
+
}( window.jQuery )
|