jombo 1.0.10 → 1.0.11
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.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/_meta/README +2 -2
- data/lib/jombo/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap/bootstrap-affix.js +15 -2
- data/vendor/assets/javascripts/bootstrap/bootstrap-alert.js +13 -4
- data/vendor/assets/javascripts/bootstrap/bootstrap-button.js +16 -7
- data/vendor/assets/javascripts/bootstrap/bootstrap-carousel.js +52 -21
- data/vendor/assets/javascripts/bootstrap/bootstrap-collapse.js +26 -17
- data/vendor/assets/javascripts/bootstrap/bootstrap-dropdown.js +32 -17
- data/vendor/assets/javascripts/bootstrap/bootstrap-modal.js +44 -36
- data/vendor/assets/javascripts/bootstrap/bootstrap-popover.js +17 -6
- data/vendor/assets/javascripts/bootstrap/bootstrap-scrollspy.js +13 -2
- data/vendor/assets/javascripts/bootstrap/bootstrap-tab.js +16 -7
- data/vendor/assets/javascripts/bootstrap/bootstrap-tooltip.js +120 -34
- data/vendor/assets/javascripts/bootstrap/bootstrap-transition.js +5 -5
- data/vendor/assets/javascripts/bootstrap/bootstrap-typeahead.js +55 -20
- data/vendor/assets/stylesheets/bootstrap/bootstrap-responsive.css +56 -5
- data/vendor/assets/stylesheets/bootstrap/bootstrap.css.erb +856 -472
- metadata +8 -10
- data/.rvmrc +0 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =========================================================
|
2
|
-
* bootstrap-modal.js v2.
|
2
|
+
* bootstrap-modal.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
4
|
* =========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -49,8 +49,6 @@
|
|
49
49
|
|
50
50
|
if (this.isShown || e.isDefaultPrevented()) return
|
51
51
|
|
52
|
-
$('body').addClass('modal-open')
|
53
|
-
|
54
52
|
this.isShown = true
|
55
53
|
|
56
54
|
this.escape()
|
@@ -62,8 +60,7 @@
|
|
62
60
|
that.$element.appendTo(document.body) //don't move modals dom position
|
63
61
|
}
|
64
62
|
|
65
|
-
that.$element
|
66
|
-
.show()
|
63
|
+
that.$element.show()
|
67
64
|
|
68
65
|
if (transition) {
|
69
66
|
that.$element[0].offsetWidth // force reflow
|
@@ -72,13 +69,12 @@
|
|
72
69
|
that.$element
|
73
70
|
.addClass('in')
|
74
71
|
.attr('aria-hidden', false)
|
75
|
-
.focus()
|
76
72
|
|
77
73
|
that.enforceFocus()
|
78
74
|
|
79
75
|
transition ?
|
80
|
-
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
81
|
-
that.$element.trigger('shown')
|
76
|
+
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
77
|
+
that.$element.focus().trigger('shown')
|
82
78
|
|
83
79
|
})
|
84
80
|
}
|
@@ -96,8 +92,6 @@
|
|
96
92
|
|
97
93
|
this.isShown = false
|
98
94
|
|
99
|
-
$('body').removeClass('modal-open')
|
100
|
-
|
101
95
|
this.escape()
|
102
96
|
|
103
97
|
$(document).off('focusin.modal')
|
@@ -144,16 +138,17 @@
|
|
144
138
|
})
|
145
139
|
}
|
146
140
|
|
147
|
-
, hideModal: function (
|
148
|
-
this
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
141
|
+
, hideModal: function () {
|
142
|
+
var that = this
|
143
|
+
this.$element.hide()
|
144
|
+
this.backdrop(function () {
|
145
|
+
that.removeBackdrop()
|
146
|
+
that.$element.trigger('hidden')
|
147
|
+
})
|
153
148
|
}
|
154
149
|
|
155
150
|
, removeBackdrop: function () {
|
156
|
-
this.$backdrop.remove()
|
151
|
+
this.$backdrop && this.$backdrop.remove()
|
157
152
|
this.$backdrop = null
|
158
153
|
}
|
159
154
|
|
@@ -167,14 +162,18 @@
|
|
167
162
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
168
163
|
.appendTo(document.body)
|
169
164
|
|
170
|
-
|
171
|
-
this
|
172
|
-
|
165
|
+
this.$backdrop.click(
|
166
|
+
this.options.backdrop == 'static' ?
|
167
|
+
$.proxy(this.$element[0].focus, this.$element[0])
|
168
|
+
: $.proxy(this.hide, this)
|
169
|
+
)
|
173
170
|
|
174
171
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
175
172
|
|
176
173
|
this.$backdrop.addClass('in')
|
177
174
|
|
175
|
+
if (!callback) return
|
176
|
+
|
178
177
|
doAnimate ?
|
179
178
|
this.$backdrop.one($.support.transition.end, callback) :
|
180
179
|
callback()
|
@@ -183,8 +182,8 @@
|
|
183
182
|
this.$backdrop.removeClass('in')
|
184
183
|
|
185
184
|
$.support.transition && this.$element.hasClass('fade')?
|
186
|
-
this.$backdrop.one($.support.transition.end,
|
187
|
-
|
185
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
186
|
+
callback()
|
188
187
|
|
189
188
|
} else if (callback) {
|
190
189
|
callback()
|
@@ -196,6 +195,8 @@
|
|
196
195
|
/* MODAL PLUGIN DEFINITION
|
197
196
|
* ======================= */
|
198
197
|
|
198
|
+
var old = $.fn.modal
|
199
|
+
|
199
200
|
$.fn.modal = function (option) {
|
200
201
|
return this.each(function () {
|
201
202
|
var $this = $(this)
|
@@ -216,24 +217,31 @@
|
|
216
217
|
$.fn.modal.Constructor = Modal
|
217
218
|
|
218
219
|
|
220
|
+
/* MODAL NO CONFLICT
|
221
|
+
* ================= */
|
222
|
+
|
223
|
+
$.fn.modal.noConflict = function () {
|
224
|
+
$.fn.modal = old
|
225
|
+
return this
|
226
|
+
}
|
227
|
+
|
228
|
+
|
219
229
|
/* MODAL DATA-API
|
220
230
|
* ============== */
|
221
231
|
|
222
|
-
$(function () {
|
223
|
-
$
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
, option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
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())
|
228
237
|
|
229
|
-
|
238
|
+
e.preventDefault()
|
230
239
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
})
|
240
|
+
$target
|
241
|
+
.modal(option)
|
242
|
+
.one('hide', function () {
|
243
|
+
$this.focus()
|
244
|
+
})
|
237
245
|
})
|
238
246
|
|
239
|
-
}(window.jQuery);
|
247
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.
|
2
|
+
* bootstrap-popover.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -44,7 +44,7 @@
|
|
44
44
|
, content = this.getContent()
|
45
45
|
|
46
46
|
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
47
|
-
$tip.find('.popover-content
|
47
|
+
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
48
48
|
|
49
49
|
$tip.removeClass('fade top bottom left right in')
|
50
50
|
}
|
@@ -58,8 +58,8 @@
|
|
58
58
|
, $e = this.$element
|
59
59
|
, o = this.options
|
60
60
|
|
61
|
-
content = $e.
|
62
|
-
||
|
61
|
+
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
62
|
+
|| $e.attr('data-content')
|
63
63
|
|
64
64
|
return content
|
65
65
|
}
|
@@ -81,6 +81,8 @@
|
|
81
81
|
/* POPOVER PLUGIN DEFINITION
|
82
82
|
* ======================= */
|
83
83
|
|
84
|
+
var old = $.fn.popover
|
85
|
+
|
84
86
|
$.fn.popover = function (option) {
|
85
87
|
return this.each(function () {
|
86
88
|
var $this = $(this)
|
@@ -97,7 +99,16 @@
|
|
97
99
|
placement: 'right'
|
98
100
|
, trigger: 'click'
|
99
101
|
, content: ''
|
100
|
-
, template: '<div class="popover"><div class="arrow"></div><
|
102
|
+
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
101
103
|
})
|
102
104
|
|
103
|
-
|
105
|
+
|
106
|
+
/* POPOVER NO CONFLICT
|
107
|
+
* =================== */
|
108
|
+
|
109
|
+
$.fn.popover.noConflict = function () {
|
110
|
+
$.fn.popover = old
|
111
|
+
return this
|
112
|
+
}
|
113
|
+
|
114
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.
|
2
|
+
* bootstrap-scrollspy.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -59,7 +59,7 @@
|
|
59
59
|
, $href = /^#\w/.test(href) && $(href)
|
60
60
|
return ( $href
|
61
61
|
&& $href.length
|
62
|
-
&& [[ $href.position().top, href ]] ) || null
|
62
|
+
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
|
63
63
|
})
|
64
64
|
.sort(function (a, b) { return a[0] - b[0] })
|
65
65
|
.each(function () {
|
@@ -121,6 +121,8 @@
|
|
121
121
|
/* SCROLLSPY PLUGIN DEFINITION
|
122
122
|
* =========================== */
|
123
123
|
|
124
|
+
var old = $.fn.scrollspy
|
125
|
+
|
124
126
|
$.fn.scrollspy = function (option) {
|
125
127
|
return this.each(function () {
|
126
128
|
var $this = $(this)
|
@@ -138,6 +140,15 @@
|
|
138
140
|
}
|
139
141
|
|
140
142
|
|
143
|
+
/* SCROLLSPY NO CONFLICT
|
144
|
+
* ===================== */
|
145
|
+
|
146
|
+
$.fn.scrollspy.noConflict = function () {
|
147
|
+
$.fn.scrollspy = old
|
148
|
+
return this
|
149
|
+
}
|
150
|
+
|
151
|
+
|
141
152
|
/* SCROLLSPY DATA-API
|
142
153
|
* ================== */
|
143
154
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.
|
2
|
+
* bootstrap-tab.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
4
|
* ========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -49,7 +49,7 @@
|
|
49
49
|
|
50
50
|
if ( $this.parent('li').hasClass('active') ) return
|
51
51
|
|
52
|
-
previous = $ul.find('.active a')
|
52
|
+
previous = $ul.find('.active:last a')[0]
|
53
53
|
|
54
54
|
e = $.Event('show', {
|
55
55
|
relatedTarget: previous
|
@@ -110,6 +110,8 @@
|
|
110
110
|
/* TAB PLUGIN DEFINITION
|
111
111
|
* ===================== */
|
112
112
|
|
113
|
+
var old = $.fn.tab
|
114
|
+
|
113
115
|
$.fn.tab = function ( option ) {
|
114
116
|
return this.each(function () {
|
115
117
|
var $this = $(this)
|
@@ -122,14 +124,21 @@
|
|
122
124
|
$.fn.tab.Constructor = Tab
|
123
125
|
|
124
126
|
|
127
|
+
/* TAB NO CONFLICT
|
128
|
+
* =============== */
|
129
|
+
|
130
|
+
$.fn.tab.noConflict = function () {
|
131
|
+
$.fn.tab = old
|
132
|
+
return this
|
133
|
+
}
|
134
|
+
|
135
|
+
|
125
136
|
/* TAB DATA-API
|
126
137
|
* ============ */
|
127
138
|
|
128
|
-
$(function () {
|
129
|
-
|
130
|
-
|
131
|
-
$(this).tab('show')
|
132
|
-
})
|
139
|
+
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
140
|
+
e.preventDefault()
|
141
|
+
$(this).tab('show')
|
133
142
|
})
|
134
143
|
|
135
144
|
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-tooltip.js v2.
|
2
|
+
* bootstrap-tooltip.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
4
4
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
5
|
* ===========================================================
|
@@ -38,19 +38,27 @@
|
|
38
38
|
, init: function (type, element, options) {
|
39
39
|
var eventIn
|
40
40
|
, eventOut
|
41
|
+
, triggers
|
42
|
+
, trigger
|
43
|
+
, i
|
41
44
|
|
42
45
|
this.type = type
|
43
46
|
this.$element = $(element)
|
44
47
|
this.options = this.getOptions(options)
|
45
48
|
this.enabled = true
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
triggers = this.options.trigger.split(' ')
|
51
|
+
|
52
|
+
for (i = triggers.length; i--;) {
|
53
|
+
trigger = triggers[i]
|
54
|
+
if (trigger == 'click') {
|
55
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
56
|
+
} else if (trigger != 'manual') {
|
57
|
+
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
58
|
+
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
59
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
60
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
61
|
+
}
|
54
62
|
}
|
55
63
|
|
56
64
|
this.options.selector ?
|
@@ -59,7 +67,7 @@
|
|
59
67
|
}
|
60
68
|
|
61
69
|
, getOptions: function (options) {
|
62
|
-
options = $.extend({}, $.fn[this.type].defaults,
|
70
|
+
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
|
63
71
|
|
64
72
|
if (options.delay && typeof options.delay == 'number') {
|
65
73
|
options.delay = {
|
@@ -72,7 +80,15 @@
|
|
72
80
|
}
|
73
81
|
|
74
82
|
, enter: function (e) {
|
75
|
-
var
|
83
|
+
var defaults = $.fn[this.type].defaults
|
84
|
+
, options = {}
|
85
|
+
, self
|
86
|
+
|
87
|
+
this._options && $.each(this._options, function (key, value) {
|
88
|
+
if (defaults[key] != value) options[key] = value
|
89
|
+
}, this)
|
90
|
+
|
91
|
+
self = $(e.currentTarget)[this.type](options).data(this.type)
|
76
92
|
|
77
93
|
if (!self.options.delay || !self.options.delay.show) return self.show()
|
78
94
|
|
@@ -97,14 +113,16 @@
|
|
97
113
|
|
98
114
|
, show: function () {
|
99
115
|
var $tip
|
100
|
-
, inside
|
101
116
|
, pos
|
102
117
|
, actualWidth
|
103
118
|
, actualHeight
|
104
119
|
, placement
|
105
120
|
, tp
|
121
|
+
, e = $.Event('show')
|
106
122
|
|
107
123
|
if (this.hasContent() && this.enabled) {
|
124
|
+
this.$element.trigger(e)
|
125
|
+
if (e.isDefaultPrevented()) return
|
108
126
|
$tip = this.tip()
|
109
127
|
this.setContent()
|
110
128
|
|
@@ -116,19 +134,18 @@
|
|
116
134
|
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
117
135
|
this.options.placement
|
118
136
|
|
119
|
-
inside = /in/.test(placement)
|
120
|
-
|
121
137
|
$tip
|
122
|
-
.
|
138
|
+
.detach()
|
123
139
|
.css({ top: 0, left: 0, display: 'block' })
|
124
|
-
.appendTo(inside ? this.$element : document.body)
|
125
140
|
|
126
|
-
|
141
|
+
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
142
|
+
|
143
|
+
pos = this.getPosition()
|
127
144
|
|
128
145
|
actualWidth = $tip[0].offsetWidth
|
129
146
|
actualHeight = $tip[0].offsetHeight
|
130
147
|
|
131
|
-
switch (
|
148
|
+
switch (placement) {
|
132
149
|
case 'bottom':
|
133
150
|
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
134
151
|
break
|
@@ -143,13 +160,58 @@
|
|
143
160
|
break
|
144
161
|
}
|
145
162
|
|
146
|
-
|
147
|
-
|
148
|
-
.addClass(placement)
|
149
|
-
.addClass('in')
|
163
|
+
this.applyPlacement(tp, placement)
|
164
|
+
this.$element.trigger('shown')
|
150
165
|
}
|
151
166
|
}
|
152
167
|
|
168
|
+
, applyPlacement: function(offset, placement){
|
169
|
+
var $tip = this.tip()
|
170
|
+
, width = $tip[0].offsetWidth
|
171
|
+
, height = $tip[0].offsetHeight
|
172
|
+
, actualWidth
|
173
|
+
, actualHeight
|
174
|
+
, delta
|
175
|
+
, replace
|
176
|
+
|
177
|
+
$tip
|
178
|
+
.offset(offset)
|
179
|
+
.addClass(placement)
|
180
|
+
.addClass('in')
|
181
|
+
|
182
|
+
actualWidth = $tip[0].offsetWidth
|
183
|
+
actualHeight = $tip[0].offsetHeight
|
184
|
+
|
185
|
+
if (placement == 'top' && actualHeight != height) {
|
186
|
+
offset.top = offset.top + height - actualHeight
|
187
|
+
replace = true
|
188
|
+
}
|
189
|
+
|
190
|
+
if (placement == 'bottom' || placement == 'top') {
|
191
|
+
delta = 0
|
192
|
+
|
193
|
+
if (offset.left < 0){
|
194
|
+
delta = offset.left * -2
|
195
|
+
offset.left = 0
|
196
|
+
$tip.offset(offset)
|
197
|
+
actualWidth = $tip[0].offsetWidth
|
198
|
+
actualHeight = $tip[0].offsetHeight
|
199
|
+
}
|
200
|
+
|
201
|
+
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
|
202
|
+
} else {
|
203
|
+
this.replaceArrow(actualHeight - height, actualHeight, 'top')
|
204
|
+
}
|
205
|
+
|
206
|
+
if (replace) $tip.offset(offset)
|
207
|
+
}
|
208
|
+
|
209
|
+
, replaceArrow: function(delta, dimension, position){
|
210
|
+
this
|
211
|
+
.arrow()
|
212
|
+
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
|
213
|
+
}
|
214
|
+
|
153
215
|
, setContent: function () {
|
154
216
|
var $tip = this.tip()
|
155
217
|
, title = this.getTitle()
|
@@ -161,23 +223,29 @@
|
|
161
223
|
, hide: function () {
|
162
224
|
var that = this
|
163
225
|
, $tip = this.tip()
|
226
|
+
, e = $.Event('hide')
|
227
|
+
|
228
|
+
this.$element.trigger(e)
|
229
|
+
if (e.isDefaultPrevented()) return
|
164
230
|
|
165
231
|
$tip.removeClass('in')
|
166
232
|
|
167
233
|
function removeWithAnimation() {
|
168
234
|
var timeout = setTimeout(function () {
|
169
|
-
$tip.off($.support.transition.end).
|
235
|
+
$tip.off($.support.transition.end).detach()
|
170
236
|
}, 500)
|
171
237
|
|
172
238
|
$tip.one($.support.transition.end, function () {
|
173
239
|
clearTimeout(timeout)
|
174
|
-
$tip.
|
240
|
+
$tip.detach()
|
175
241
|
})
|
176
242
|
}
|
177
243
|
|
178
244
|
$.support.transition && this.$tip.hasClass('fade') ?
|
179
245
|
removeWithAnimation() :
|
180
|
-
$tip.
|
246
|
+
$tip.detach()
|
247
|
+
|
248
|
+
this.$element.trigger('hidden')
|
181
249
|
|
182
250
|
return this
|
183
251
|
}
|
@@ -185,7 +253,7 @@
|
|
185
253
|
, fixTitle: function () {
|
186
254
|
var $e = this.$element
|
187
255
|
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
188
|
-
$e.attr('data-original-title', $e.attr('title') || '').
|
256
|
+
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
189
257
|
}
|
190
258
|
}
|
191
259
|
|
@@ -193,11 +261,12 @@
|
|
193
261
|
return this.getTitle()
|
194
262
|
}
|
195
263
|
|
196
|
-
, getPosition: function (
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
264
|
+
, getPosition: function () {
|
265
|
+
var el = this.$element[0]
|
266
|
+
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
267
|
+
width: el.offsetWidth
|
268
|
+
, height: el.offsetHeight
|
269
|
+
}, this.$element.offset())
|
201
270
|
}
|
202
271
|
|
203
272
|
, getTitle: function () {
|
@@ -215,6 +284,10 @@
|
|
215
284
|
return this.$tip = this.$tip || $(this.options.template)
|
216
285
|
}
|
217
286
|
|
287
|
+
, arrow: function(){
|
288
|
+
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
|
289
|
+
}
|
290
|
+
|
218
291
|
, validate: function () {
|
219
292
|
if (!this.$element[0].parentNode) {
|
220
293
|
this.hide()
|
@@ -235,8 +308,9 @@
|
|
235
308
|
this.enabled = !this.enabled
|
236
309
|
}
|
237
310
|
|
238
|
-
, toggle: function () {
|
239
|
-
|
311
|
+
, toggle: function (e) {
|
312
|
+
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
|
313
|
+
self.tip().hasClass('in') ? self.hide() : self.show()
|
240
314
|
}
|
241
315
|
|
242
316
|
, destroy: function () {
|
@@ -249,6 +323,8 @@
|
|
249
323
|
/* TOOLTIP PLUGIN DEFINITION
|
250
324
|
* ========================= */
|
251
325
|
|
326
|
+
var old = $.fn.tooltip
|
327
|
+
|
252
328
|
$.fn.tooltip = function ( option ) {
|
253
329
|
return this.each(function () {
|
254
330
|
var $this = $(this)
|
@@ -266,10 +342,20 @@
|
|
266
342
|
, placement: 'top'
|
267
343
|
, selector: false
|
268
344
|
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
269
|
-
, trigger: 'hover'
|
345
|
+
, trigger: 'hover focus'
|
270
346
|
, title: ''
|
271
347
|
, delay: 0
|
272
|
-
, html:
|
348
|
+
, html: false
|
349
|
+
, container: false
|
350
|
+
}
|
351
|
+
|
352
|
+
|
353
|
+
/* TOOLTIP NO CONFLICT
|
354
|
+
* =================== */
|
355
|
+
|
356
|
+
$.fn.tooltip.noConflict = function () {
|
357
|
+
$.fn.tooltip = old
|
358
|
+
return this
|
273
359
|
}
|
274
360
|
|
275
361
|
}(window.jQuery);
|