Skip to content
Permalink
Browse files

Tooltip: Style updates

Ref #14246
Ref gh-1588
  • Loading branch information
arschmitz committed Aug 21, 2015
1 parent 1f6ea8b commit b7278a3968d9ac6332958811317865a412a9f39b
@@ -21,7 +21,7 @@ common.testWidget( "tooltip", {
tooltipClass: null,
track: false,

// callbacks
// Callbacks
close: null,
create: null,
open: null
@@ -20,7 +20,7 @@ common.testWidget( "tooltip", {
show: true,
track: false,

// callbacks
// Callbacks
close: null,
create: null,
open: null
@@ -13,7 +13,7 @@ test( "destroy", function( assert ) {
element.tooltip().tooltip( "destroy" );
});

// make sure that open tooltips are removed on destroy
// Make sure that open tooltips are removed on destroy
assert.domEqual( "#tooltipped1", function() {
element
.tooltip()
@@ -161,7 +161,7 @@ test( "items", function() {
element.tooltip( "open", event );
deepEqual( $( "#" + $( "#fixture-span" ).data( "ui-tooltip-id" ) ).text(), "title-text" );

// make sure default [title] doesn't get used
// Make sure default [title] doesn't get used
event.target = $( "#tooltipped1" )[ 0 ];
element.tooltip( "open", event );
deepEqual( $( "#tooltipped1" ).data( "ui-tooltip-id" ), undefined );
@@ -20,7 +20,7 @@
// default
$( "#context1, form, #childish, #nested-input" ).tooltip();

// custom class, replaces ui-widget-content
// Custom class, replaces ui-widget-content
$( "#context2" ).tooltip({
classes: {
"ui-tooltip": "ui-corner-all ui-widget-header"
@@ -32,15 +32,15 @@
}
});

// synchronous content
// Synchronous content
$( "#footnotes" ).tooltip({
items: "[href^='#']",
content: function() {
return $( $( this ).attr( "href" ) ).html();
}
});

// asynchronous content
// Asynchronous content
$( "#async" ).tooltip({
content: function( response ) {
setTimeout(function() {
@@ -50,7 +50,7 @@
}
});

// asynchronous content with caching
// Asynchronous content with caching
var content;
$( "#async2" ).tooltip({
content: function( response ) {
@@ -65,7 +65,7 @@
}
});

// custom position
// Custom position
$( "#right2" ).tooltip({
classes: {
"ui-tooltip": "ui-corner-all ui-state-highlight"
@@ -59,7 +59,7 @@ $.widget( "ui.tooltip", {
show: true,
track: false,

// callbacks
// Callbacks
close: null,
open: null
},
@@ -139,14 +139,14 @@ $.widget( "ui.tooltip", {
_disable: function() {
var that = this;

// close open tooltips
// Close open tooltips
$.each( this.tooltips, function( id, tooltipData ) {
var event = $.Event( "blur" );
event.target = event.currentTarget = tooltipData.element[ 0 ];
that.close( event, true );
} );

// remove title attributes to prevent native tooltips
// Remove title attributes to prevent native tooltips
this.element.find( this.options.items ).addBack().each( function() {
var element = $( this );
if ( element.is( "[title]" ) ) {
@@ -185,7 +185,7 @@ $.widget( "ui.tooltip", {

target.data( "ui-tooltip-open", true );

// kill parent tooltips, custom or native, for hover
// Kill parent tooltips, custom or native, for hover
if ( event && event.type === "mouseover" ) {
target.parents().each( function() {
var parent = $( this ),
@@ -232,7 +232,7 @@ $.widget( "ui.tooltip", {
return;
}

// jQuery creates a special event for focusin when it doesn't
// JQuery creates a special event for focusin when it doesn't
// exist natively. To improve performance, the native event
// object is reused and the type is changed. Therefore, we can't
// rely on the type being correct after the event finished
@@ -264,7 +264,7 @@ $.widget( "ui.tooltip", {
return;
}

// if we have a title, clear it to prevent the native tooltip
// If we have a title, clear it to prevent the native tooltip
// we have to check first to avoid defining a title if none exists
// (we don't want to cause an element to start matching [title])
//
@@ -377,7 +377,7 @@ $.widget( "ui.tooltip", {

tooltip = tooltipData.tooltip;

// disabling closes the tooltip, so we need to track when we're closing
// Disabling closes the tooltip, so we need to track when we're closing
// to avoid an infinite loop in case the tooltip becomes disabled on close
if ( tooltipData.closing ) {
return;
@@ -386,7 +386,7 @@ $.widget( "ui.tooltip", {
// Clear the interval for delayed tracking tooltips
clearInterval( this.delayedShow );

// only set title if we had one before (see comment in _open())
// Only set title if we had one before (see comment in _open())
// If the title attribute has changed since open(), don't restore
if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
target.attr( "title", target.data( "ui-tooltip-title" ) );
@@ -462,7 +462,7 @@ $.widget( "ui.tooltip", {
_destroy: function() {
var that = this;

// close open tooltips
// Close open tooltips
$.each( this.tooltips, function( id, tooltipData ) {
// Delegate to close method to handle common cleanup
var event = $.Event( "blur" ),

0 comments on commit b7278a3

Please sign in to comment.
You can’t perform that action at this time.