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:
jdlrobson 2014-08-14 14:56:00 -07:00 committed by EBernhardson
parent 965a8b8a2f
commit 088ba0a152
2 changed files with 32 additions and 63 deletions

View file

@ -223,46 +223,29 @@
_getFooterElement: function() { _getFooterElement: function() {
var $prefLink = $( '#pt-preferences a' ), 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">' ); $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 // add link to notifications archive
$overlayFooter.append( $overlayFooter.find( 'a' ).on( 'hover',
$( '<a>' ) function() {
.attr( 'id', 'mw-echo-overlay-link' ) $( this ).removeClass( 'mw-echo-grey-link' );
.addClass( 'mw-echo-grey-link' ) },
.attr( 'href', getUrl( 'Special:Notifications' ) ) function() {
.text( mw.msg( 'echo-overlay-link' ) ) $( this ).addClass( 'mw-echo-grey-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' );
}
)
); );
return $overlayFooter; return $overlayFooter;
}, },

View file

@ -162,41 +162,27 @@
width: 100%; width: 100%;
a { a {
border-left: 1px solid #DDDDDD;
float: none; float: none;
display: table-cell; 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 { .mw-echo-icon-all {
display: block;
clear: left;
float: left;
padding: 15px 15px 15px 45px;
min-height: 14px;
font-size: 13px;
font-weight: bold;
/* @embed */ /* @embed */
background: url(../icons/NotificationsPage-ltr.png) no-repeat 20px 15px !important; background: url(../icons/NotificationsPage-ltr.png) no-repeat 20px 15px !important;
white-space: normal;
&:hover {
text-decoration: none;
}
} }
#mw-echo-overlay-pref-link { .mw-echo-icon-cog {
display: block;
float: left;
min-height: 14px;
font-size: 13px;
font-weight: bold;
padding: 15px 15px 15px 45px;
border-left: 1px solid #DDDDDD;
/* @embed */ /* @embed */
background: url(../icons/Settings.png) no-repeat 20px 15px !important; background: url(../icons/Settings.png) no-repeat 20px 15px !important;
white-space: normal;
&:hover {
text-decoration: none;
}
} }