Adding help button to flyout. Fixing ID name per conventions.

Change-Id: Id7243ba8e8599e1413203f951e96b73e2a6ceb9c
This commit is contained in:
kaldari 2013-04-24 21:35:04 -07:00
parent 522d452c68
commit 24b00328b6
3 changed files with 31 additions and 2 deletions

BIN
modules/overlay/Help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -65,6 +65,25 @@
font-weight: bold; font-weight: bold;
position: relative; position: relative;
} }
#mw-echo-overlay-title-text {
display: inline-block;
}
#mw-echo-moreinfo-link {
display: inline-block;
margin: 0px 2px -2px 4px;
height: 13px;
width: 13px;
/* @embed */
background-image: url(Help.png);
background-repeat: no-repeat;
background-position: 0 0;
filter: alpha(opacity=50);
opacity: 0.5;
}
#mw-echo-moreinfo-link:hover {
filter: alpha(opacity=100);
opacity: 1.0;
}
#mw-echo-overlay-footer { #mw-echo-overlay-footer {
padding: 0px; padding: 0px;

View file

@ -113,7 +113,7 @@
count = result.query.notifications.count; count = result.query.notifications.count;
mw.echo.overlay.updateCount( count ); mw.echo.overlay.updateCount( count );
// Reset header to 'Notifications' // Reset header to 'Notifications'
$( '#echo-overlay-title-text').text( mw.msg( 'echo-overlay-title' ) ); $( '#mw-echo-overlay-title-text').text( mw.msg( 'echo-overlay-title' ) );
} }
} }
} ); } );
@ -131,11 +131,21 @@
// Add the 'mark all as read' button to the title area // Add the 'mark all as read' button to the title area
$title.append( $markReadButton ); $title.append( $markReadButton );
} }
// Add the header to the title area // Add the header to the title area
$( '<div/>' ) $( '<div/>' )
.attr( 'id', 'echo-overlay-title-text' ) .attr( 'id', 'mw-echo-overlay-title-text' )
.text( titleText ) .text( titleText )
.appendTo( $title ); .appendTo( $title );
// Add help button
$( '<a/>' )
.attr( 'href', mw.config.get( 'wgEchoHelpPage' ) )
.attr( 'title', mw.msg( 'echo-more-info' ) )
.attr( 'id', 'mw-echo-moreinfo-link' )
.attr( 'target', '_blank' )
.appendTo( $title );
// Insert the title area into the overlay // Insert the title area into the overlay
$title.appendTo( $overlay ); $title.appendTo( $overlay );