Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 72f652f

Browse files
committed
Update twipsy-mod to use tooltip styles and work with jQuery 2.0
1 parent 2e777df commit 72f652f

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/styles/brackets_patterns_override.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ input, textarea {
687687
}
688688

689689
/* Twipsy tooltips */
690-
.twipsy-inner {
690+
.tooltip-inner {
691691
.box-shadow(0 3px 6px 0 rgba(0, 0, 0, .36));
692692
max-width: none;
693693
white-space: nowrap;

src/widgets/bootstrap-twipsy-mod.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,7 @@
5353

5454
// set CSS transition event type
5555
if ( $.support.transition ) {
56-
transitionEnd = "TransitionEnd"
57-
if ( $.browser.webkit ) {
58-
transitionEnd = "webkitTransitionEnd"
59-
} else if ( $.browser.mozilla ) {
60-
transitionEnd = "transitionend"
61-
} else if ( $.browser.opera ) {
62-
transitionEnd = "oTransitionEnd"
63-
}
56+
transitionEnd = $.support.transition.end;
6457
}
6558

6659
})
@@ -188,7 +181,7 @@
188181
}
189182

190183
if (surplusRight > 0) {
191-
$arrow = $tip.find(".twipsy-arrow");
184+
$arrow = $tip.find(".tooltip-arrow");
192185
if (! this.defaultMargin) {
193186
this.defaultMargin = parseInt($arrow.css("margin-left"), 10);
194187
}
@@ -201,8 +194,8 @@
201194

202195
, setContent: function () {
203196
var $tip = this.tip()
204-
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
205-
$tip[0].className = 'twipsy'
197+
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
198+
$tip[0].className = 'tooltip'
206199
}
207200

208201
, hide: function() {
@@ -255,7 +248,7 @@
255248
}
256249

257250
, tip: function() {
258-
return this.$tip = this.$tip || $('<div class="twipsy" />').html(this.options.template)
251+
return this.$tip = this.$tip || $('<div class="tooltip" />').html(this.options.template)
259252
}
260253

261254
, validate: function() {
@@ -388,7 +381,7 @@
388381
, offset: 0
389382
, title: 'title'
390383
, trigger: 'hover'
391-
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
384+
, template: '<div class="tooltip-arrow"></div><div class="tooltip-inner"></div>'
392385
}
393386

394387
$.fn.twipsy.rejectAttrOptions = [ 'title' ]

0 commit comments

Comments
 (0)