Make diff link smaller, generalize classes

This commit is contained in:
theopolisme 2014-04-12 10:45:59 -05:00
parent 9b8e76cb59
commit 5ca33cd4f9
4 changed files with 16 additions and 13 deletions

View File

@ -32,6 +32,10 @@
text-align: right;
}
.text-smaller {
font-size: 0.7em;
}
.link:hover {
cursor: pointer;
text-decoration: underline;

View File

@ -84,11 +84,6 @@
}
}
.reload-link {
padding-left: 5px;
font-size: 0.7em;
}
#afchStatus {
list-style-position: inside;
text-align: left;

View File

@ -561,10 +561,10 @@
// FIXME: Consider showing the diff inline?
diffLink = AFCH.makeLinkElementToPage(
'Special:Diff/' + data.edit.oldrevid + '/' + data.edit.newrevid,
'diff'
);
'(diff)'
).addClass( 'text-smaller' );
status.update( 'Saved $1 (' + AFCH.jQueryToHtml( diffLink ) + ')' );
status.update( 'Saved $1 ' + AFCH.jQueryToHtml( diffLink ) );
} else {
deferred.reject( data );
// FIXME: get detailed error info from API result??

View File

@ -1078,14 +1078,18 @@
// complete, the done text and a reload link will be shown
$( document ).ajaxStop( function () {
$submitBtn.text( 'Done' )
.append( $( '<a>' )
.addClass( 'reload-link' )
.attr( 'href', mw.util.getUrl() )
.text( '(reloading...)' ) );
.append(
' ',
$( '<a>' )
.attr( 'id', 'reloadLink' )
.addClass( 'text-smaller' )
.attr( 'href', mw.util.getUrl() )
.text( '(reloading...)' )
);
// Also, automagically reload the page in place
$( '#mw-content-text' ).load( AFCH.consts.pagelink + ' #mw-content-text', function () {
$afch.find( '.reload-link' ).text( '(reloaded automatically)' );
$afch.find( '#reloadLink' ).text( '(reloaded automatically)' );
// Fire the hook for new page content
mw.hook( 'wikipage.content' ).fire( $afch.find( '#mw-content-text' ) );
} );