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

Commit

Permalink
Update twipsy-mod to use tooltip styles and work with jQuery 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gruehle committed May 31, 2013
1 parent 2e777df commit 72f652f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/styles/brackets_patterns_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ input, textarea {
}

/* Twipsy tooltips */
.twipsy-inner {
.tooltip-inner {
.box-shadow(0 3px 6px 0 rgba(0, 0, 0, .36));
max-width: none;
white-space: nowrap;
Expand Down
19 changes: 6 additions & 13 deletions src/widgets/bootstrap-twipsy-mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,7 @@

// set CSS transition event type
if ( $.support.transition ) {
transitionEnd = "TransitionEnd"
if ( $.browser.webkit ) {
transitionEnd = "webkitTransitionEnd"
} else if ( $.browser.mozilla ) {
transitionEnd = "transitionend"
} else if ( $.browser.opera ) {
transitionEnd = "oTransitionEnd"
}
transitionEnd = $.support.transition.end;
}

})
Expand Down Expand Up @@ -188,7 +181,7 @@
}

if (surplusRight > 0) {
$arrow = $tip.find(".twipsy-arrow");
$arrow = $tip.find(".tooltip-arrow");
if (! this.defaultMargin) {
this.defaultMargin = parseInt($arrow.css("margin-left"), 10);
}
Expand All @@ -201,8 +194,8 @@

, setContent: function () {
var $tip = this.tip()
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
$tip[0].className = 'twipsy'
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
$tip[0].className = 'tooltip'
}

, hide: function() {
Expand Down Expand Up @@ -255,7 +248,7 @@
}

, tip: function() {
return this.$tip = this.$tip || $('<div class="twipsy" />').html(this.options.template)
return this.$tip = this.$tip || $('<div class="tooltip" />').html(this.options.template)
}

, validate: function() {
Expand Down Expand Up @@ -388,7 +381,7 @@
, offset: 0
, title: 'title'
, trigger: 'hover'
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
, template: '<div class="tooltip-arrow"></div><div class="tooltip-inner"></div>'
}

$.fn.twipsy.rejectAttrOptions = [ 'title' ]
Expand Down

0 comments on commit 72f652f

Please sign in to comment.