From 72f652f1834da3290cd6b80f3e718a5fb4496f2c Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Fri, 31 May 2013 11:02:50 -0700 Subject: [PATCH] Update twipsy-mod to use tooltip styles and work with jQuery 2.0 --- src/styles/brackets_patterns_override.less | 2 +- src/widgets/bootstrap-twipsy-mod.js | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/styles/brackets_patterns_override.less b/src/styles/brackets_patterns_override.less index 751f73a40e4..4b0cecd8050 100644 --- a/src/styles/brackets_patterns_override.less +++ b/src/styles/brackets_patterns_override.less @@ -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; diff --git a/src/widgets/bootstrap-twipsy-mod.js b/src/widgets/bootstrap-twipsy-mod.js index 70c62bc0d86..beaac0d6fce 100644 --- a/src/widgets/bootstrap-twipsy-mod.js +++ b/src/widgets/bootstrap-twipsy-mod.js @@ -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; } }) @@ -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); } @@ -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() { @@ -255,7 +248,7 @@ } , tip: function() { - return this.$tip = this.$tip || $('
').html(this.options.template) + return this.$tip = this.$tip || $('
').html(this.options.template) } , validate: function() { @@ -388,7 +381,7 @@ , offset: 0 , title: 'title' , trigger: 'hover' - , template: '
' + , template: '
' } $.fn.twipsy.rejectAttrOptions = [ 'title' ]