mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 10:49:37 +00:00
Hygiene: Mega clean up the Echo footer code
Lots of duplicate unused css. This simplifies it drastically. Change-Id: Idfcca27840410f0287e30478e7978255234127d0
This commit is contained in:
parent
965a8b8a2f
commit
088ba0a152
|
@ -223,46 +223,29 @@
|
|||
|
||||
_getFooterElement: function() {
|
||||
var $prefLink = $( '#pt-preferences a' ),
|
||||
links = [
|
||||
{ url: getUrl( 'Special:Notifications' ), text: mw.msg( 'echo-overlay-link' ),
|
||||
className: 'mw-echo-icon-all' },
|
||||
{ url: $prefLink.attr( 'href' ) + '#mw-prefsection-echo', text: $prefLink.text(),
|
||||
className: 'mw-echo-icon-cog' }
|
||||
],
|
||||
$overlayFooter = $( '<div class="mw-echo-overlay-footer">' );
|
||||
|
||||
$.each( links, function( i, link ) {
|
||||
$( '<a class="mw-echo-grey-link">' )
|
||||
.attr( 'href', link.url )
|
||||
.addClass( link.className )
|
||||
.text( link.text )
|
||||
.appendTo( $overlayFooter );
|
||||
} );
|
||||
// add link to notifications archive
|
||||
$overlayFooter.append(
|
||||
$( '<a>' )
|
||||
.attr( 'id', 'mw-echo-overlay-link' )
|
||||
.addClass( 'mw-echo-grey-link' )
|
||||
.attr( 'href', getUrl( 'Special:Notifications' ) )
|
||||
.text( mw.msg( 'echo-overlay-link' ) )
|
||||
.click( function () {
|
||||
mw.echo.logInteraction( 'ui-archive-link-click', 'flyout' );
|
||||
} )
|
||||
.hover(
|
||||
function() {
|
||||
$( this ).removeClass( 'mw-echo-grey-link' );
|
||||
},
|
||||
function() {
|
||||
$( this ).addClass( 'mw-echo-grey-link' );
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// add link to notification preferences
|
||||
$overlayFooter.append(
|
||||
$( '<a>' )
|
||||
.html( $prefLink.html() )
|
||||
.attr( 'id', 'mw-echo-overlay-pref-link' )
|
||||
.addClass( 'mw-echo-grey-link' )
|
||||
.attr( 'href', $prefLink.attr( 'href' ) + '#mw-prefsection-echo' )
|
||||
.click( function () {
|
||||
mw.echo.logInteraction( 'ui-prefs-click', 'flyout' );
|
||||
} )
|
||||
.hover(
|
||||
function() {
|
||||
$( this ).removeClass( 'mw-echo-grey-link' );
|
||||
},
|
||||
function() {
|
||||
$( this ).addClass( 'mw-echo-grey-link' );
|
||||
}
|
||||
)
|
||||
$overlayFooter.find( 'a' ).on( 'hover',
|
||||
function() {
|
||||
$( this ).removeClass( 'mw-echo-grey-link' );
|
||||
},
|
||||
function() {
|
||||
$( this ).addClass( 'mw-echo-grey-link' );
|
||||
}
|
||||
);
|
||||
return $overlayFooter;
|
||||
},
|
||||
|
|
|
@ -162,41 +162,27 @@
|
|||
width: 100%;
|
||||
|
||||
a {
|
||||
border-left: 1px solid #DDDDDD;
|
||||
float: none;
|
||||
display: table-cell;
|
||||
min-height: 14px;
|
||||
font-size: 13px;
|
||||
white-space: normal;
|
||||
font-weight: bold;
|
||||
padding: 15px 15px 15px 45px;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#mw-echo-overlay-link {
|
||||
display: block;
|
||||
clear: left;
|
||||
float: left;
|
||||
padding: 15px 15px 15px 45px;
|
||||
min-height: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
.mw-echo-icon-all {
|
||||
/* @embed */
|
||||
background: url(../icons/NotificationsPage-ltr.png) no-repeat 20px 15px !important;
|
||||
white-space: normal;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
#mw-echo-overlay-pref-link {
|
||||
display: block;
|
||||
float: left;
|
||||
min-height: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
padding: 15px 15px 15px 45px;
|
||||
border-left: 1px solid #DDDDDD;
|
||||
.mw-echo-icon-cog {
|
||||
/* @embed */
|
||||
background: url(../icons/Settings.png) no-repeat 20px 15px !important;
|
||||
white-space: normal;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue