diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /extensions/Vector/modules/ext.vector.footerCleanup.js | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'extensions/Vector/modules/ext.vector.footerCleanup.js')
-rw-r--r-- | extensions/Vector/modules/ext.vector.footerCleanup.js | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/extensions/Vector/modules/ext.vector.footerCleanup.js b/extensions/Vector/modules/ext.vector.footerCleanup.js new file mode 100644 index 00000000..eb9b3dd2 --- /dev/null +++ b/extensions/Vector/modules/ext.vector.footerCleanup.js @@ -0,0 +1,68 @@ +/* + * Footer cleanup for Vector + */ +$( document ).ready( function() { + $( '#editpage-copywarn' ) + .add( '.editOptions' ) + .wrapAll( '<div id="editpage-bottom"></div>' ); + $( '#wpSummary' ) + .data( 'hint', + $( '#wpSummaryLabel span small' ) + .remove() + .text() + // FIXME - Not a long-term solution. This change should be done in the message itself + .replace( /\)|\(/g, '' ) + ) + .change( function() { + if ( $( this ).val().length == 0 ) { + $( this ) + .addClass( 'inline-hint' ) + .val( $( this ).data( 'hint' ) ); + } else { + $( this ).removeClass( 'inline-hint' ); + } + } ) + .focus( function() { + if ( $( this ).val() == $( this ).data( 'hint' ) ) { + $( this ) + .removeClass( 'inline-hint' ) + .val( "" ); + } + }) + .blur( function() { $( this ).trigger( 'change' ); } ) + .trigger( 'change' ); + $( '#wpSummary' ) + .add( '.editCheckboxes' ) + .wrapAll( '<div id="editpage-summary-fields"></div>' ); + + $( '#editpage-specialchars' ).remove(); + + // transclusions + // FIXME - bad CSS styling here with double class selectors. Should address here. + var transclusionCount = $( '.templatesUsed ul li' ).size(); + $( '.templatesUsed ul' ) + .wrap( '<div id="transclusions-list" class="collapsible-list collapsed"></div>' ) + .parent() + // FIXME: i18n, remove link from message and let community add link to transclusion page if it exists + .prepend( '<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' + + transclusionCount + + '</strong> other pages.</label>' ); + $( '.mw-templatesUsedExplanation' ).remove(); + + $( '.collapsible-list label' ) + .click( function() { + $( this ) + .parent() + .toggleClass( 'expanded' ) + .toggleClass( 'collapsed' ) + .find( 'ul' ) + .slideToggle( 'fast' ); + return false; + }) + .trigger( 'click' ); + $( '#wpPreview, #wpDiff, .editHelp, #editpage-specialchars' ) + .remove(); + $( '#mw-editform-cancel' ) + .remove() + .appendTo( '.editButtons' ); +} ); |