Stop using ancient <center> tag in tooltips

Change-Id: I26aef8df98a7950c93a5de2c0d426cb5db4afde4
This commit is contained in:
Leszek Manicki 2016-05-18 12:45:06 +02:00
parent 4a92947349
commit 10da0333b7
2 changed files with 8 additions and 3 deletions

View file

@ -32,7 +32,8 @@
.tipsy( {
gravity: 's',
html: true,
fade: true
fade: true,
className: 'revision-tooltip'
} ) )
.append( $( '<div class="stopper"/>' )
.css( {
@ -45,14 +46,14 @@
},
makeTooltip: function ( rev ) {
var $tooltip = $( '<center/>' ) // TODO: center is deprecated since 1995
var $tooltip = $( '<div/>' )
.append( '<p><b>' + rev.getFormattedDate() + '</b></p>' )
.append( $( '<p/>' ).text( mw.html.escape( rev.getUser() ) ) )
.append( rev.getComment() ? $( '<p/>' ).append( '<i/>' ).text( mw.html.escape( rev.getComment() ) ) : '' )
.append( $( '<p/>' ).html( rev.getSize() + ' bytes' ) )
.append( rev.isMinor() ? $( '<p/>' ).html( mw.message( 'minoredit' ).text() ) : '' );
return $( '<div/>' ).append( $tooltip ).html();
return $tooltip.html();
}
} );

View file

@ -17,6 +17,10 @@
transition: all ease 0.2s;
}
.revision-tooltip {
text-align: center;
}
.revisions {
height: 150px;
}