Skip to content

Commit b7278a3

Browse files
committed
Tooltip: Style updates
Ref #14246 Ref gh-1588
1 parent 1f6ea8b commit b7278a3

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

tests/unit/tooltip/common-deprecated.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ common.testWidget( "tooltip", {
2121
tooltipClass: null,
2222
track: false,
2323

24-
// callbacks
24+
// Callbacks
2525
close: null,
2626
create: null,
2727
open: null

tests/unit/tooltip/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ common.testWidget( "tooltip", {
2020
show: true,
2121
track: false,
2222

23-
// callbacks
23+
// Callbacks
2424
close: null,
2525
create: null,
2626
open: null

tests/unit/tooltip/methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test( "destroy", function( assert ) {
1313
element.tooltip().tooltip( "destroy" );
1414
});
1515

16-
// make sure that open tooltips are removed on destroy
16+
// Make sure that open tooltips are removed on destroy
1717
assert.domEqual( "#tooltipped1", function() {
1818
element
1919
.tooltip()

tests/unit/tooltip/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ test( "items", function() {
161161
element.tooltip( "open", event );
162162
deepEqual( $( "#" + $( "#fixture-span" ).data( "ui-tooltip-id" ) ).text(), "title-text" );
163163

164-
// make sure default [title] doesn't get used
164+
// Make sure default [title] doesn't get used
165165
event.target = $( "#tooltipped1" )[ 0 ];
166166
element.tooltip( "open", event );
167167
deepEqual( $( "#tooltipped1" ).data( "ui-tooltip-id" ), undefined );

tests/visual/tooltip/tooltip.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// default
2121
$( "#context1, form, #childish, #nested-input" ).tooltip();
2222

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

35-
// synchronous content
35+
// Synchronous content
3636
$( "#footnotes" ).tooltip({
3737
items: "[href^='#']",
3838
content: function() {
3939
return $( $( this ).attr( "href" ) ).html();
4040
}
4141
});
4242

43-
// asynchronous content
43+
// Asynchronous content
4444
$( "#async" ).tooltip({
4545
content: function( response ) {
4646
setTimeout(function() {
@@ -50,7 +50,7 @@
5050
}
5151
});
5252

53-
// asynchronous content with caching
53+
// Asynchronous content with caching
5454
var content;
5555
$( "#async2" ).tooltip({
5656
content: function( response ) {
@@ -65,7 +65,7 @@
6565
}
6666
});
6767

68-
// custom position
68+
// Custom position
6969
$( "#right2" ).tooltip({
7070
classes: {
7171
"ui-tooltip": "ui-corner-all ui-state-highlight"

ui/widgets/tooltip.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $.widget( "ui.tooltip", {
5959
show: true,
6060
track: false,
6161

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

142-
// close open tooltips
142+
// Close open tooltips
143143
$.each( this.tooltips, function( id, tooltipData ) {
144144
var event = $.Event( "blur" );
145145
event.target = event.currentTarget = tooltipData.element[ 0 ];
146146
that.close( event, true );
147147
} );
148148

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

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

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

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

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

378378
tooltip = tooltipData.tooltip;
379379

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

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

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

0 commit comments

Comments
 (0)