From b7278a3968d9ac6332958811317865a412a9f39b Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Fri, 21 Aug 2015 00:04:13 -0400 Subject: [PATCH] Tooltip: Style updates Ref #14246 Ref gh-1588 --- tests/unit/tooltip/common-deprecated.js | 2 +- tests/unit/tooltip/common.js | 2 +- tests/unit/tooltip/methods.js | 2 +- tests/unit/tooltip/options.js | 2 +- tests/visual/tooltip/tooltip.html | 10 +++++----- ui/widgets/tooltip.js | 18 +++++++++--------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/unit/tooltip/common-deprecated.js b/tests/unit/tooltip/common-deprecated.js index 9e3c5ef59..75a688f0a 100644 --- a/tests/unit/tooltip/common-deprecated.js +++ b/tests/unit/tooltip/common-deprecated.js @@ -21,7 +21,7 @@ common.testWidget( "tooltip", { tooltipClass: null, track: false, - // callbacks + // Callbacks close: null, create: null, open: null diff --git a/tests/unit/tooltip/common.js b/tests/unit/tooltip/common.js index 77e3f02b8..15c9dfad8 100644 --- a/tests/unit/tooltip/common.js +++ b/tests/unit/tooltip/common.js @@ -20,7 +20,7 @@ common.testWidget( "tooltip", { show: true, track: false, - // callbacks + // Callbacks close: null, create: null, open: null diff --git a/tests/unit/tooltip/methods.js b/tests/unit/tooltip/methods.js index b5b6ca6e9..d4c56e1f3 100644 --- a/tests/unit/tooltip/methods.js +++ b/tests/unit/tooltip/methods.js @@ -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() diff --git a/tests/unit/tooltip/options.js b/tests/unit/tooltip/options.js index 6aa576583..2833e68dd 100644 --- a/tests/unit/tooltip/options.js +++ b/tests/unit/tooltip/options.js @@ -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 ); diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html index c0ba7a11c..176af85d8 100644 --- a/tests/visual/tooltip/tooltip.html +++ b/tests/visual/tooltip/tooltip.html @@ -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,7 +32,7 @@ } }); - // synchronous content + // Synchronous content $( "#footnotes" ).tooltip({ items: "[href^='#']", content: function() { @@ -40,7 +40,7 @@ } }); - // 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" diff --git a/ui/widgets/tooltip.js b/ui/widgets/tooltip.js index 1c919582e..6c4493052 100644 --- a/ui/widgets/tooltip.js +++ b/ui/widgets/tooltip.js @@ -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" ), -- 2.39.5