r70125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70124‎ | r70125 | r70126 >
Date:00:08, 29 July 2010
Author:tparscal
Status:deferred
Tags:
Comment:
Ported enahncedchanges.js to mw.legacy.enhancedchanges.js
Modified paths:
  • /branches/resourceloader/phase3/resources/mw/mw.legacy.enhancedchanges.js (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/resources/mw/mw.legacy.enhancedchanges.js
@@ -0,0 +1,41 @@
 2+/*
 3+ * Legacy emulation for the now enhancedchanges edit.js
 4+ *
 5+ * Ported by: Trevor Parscal
 6+ */
 7+
 8+( function( $ ) {
 9+
 10+$.extend( mw.legacy, {
 11+ /**
 12+ * Switch an RC line between hidden/shown
 13+ *
 14+ * @param int idNumber : the id number of the RC group
 15+ */
 16+ 'toggleVisibility': function( idNumber ) {
 17+ var elements = [
 18+ '#mw-rc-openarrow-' + idNumber,
 19+ '#mw-rc-closearrow-' + idNumber,
 20+ '#mw-rc-subentries-' + idNumber
 21+ ];
 22+ $( elements.join( ',' ) ).toggleClass( 'mw-changeslist-hidden' ).toggleClass( 'mw-changeslist-expanded' );
 23+ }
 24+} );
 25+
 26+$( document ).ready( function() {
 27+ /*
 28+ * Add the CSS to hide parts that should be collapsed
 29+ *
 30+ * We do this with JS so everything will be expanded by default
 31+ * if JS is disabled
 32+ */
 33+ $( 'head' ).append(
 34+ '<style type="text/css">\
 35+ .mw-changeslist-hidden { display:none; }\
 36+ div.mw-changeslist-expanded { display:block; }\
 37+ span.mw-changeslist-expanded { display:inline !important; visibility:visible !important; }\
 38+ </style>'
 39+ );
 40+} );
 41+
 42+} )( jQuery );
\ No newline at end of file

Status & tagging log