Index: trunk/phase3/skins/common/metadata.js |
— | — | @@ -47,3 +47,7 @@ |
48 | 48 | } |
49 | 49 | return false; |
50 | 50 | } |
| 51 | + |
| 52 | +$( document ).ready( function() { |
| 53 | + attachMetadataToggle( 'mw_metadata', mediaWiki.msg( 'metadata-expand' ), mediaWiki.msg( 'metadata-collapse' ) ); |
| 54 | +} ); |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -143,13 +143,9 @@ |
144 | 144 | $wgOut->addHTML( $html ); |
145 | 145 | |
146 | 146 | if ( $showmeta ) { |
147 | | - $expand = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-expand' ) ) ); |
148 | | - $collapse = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-collapse' ) ) ); |
149 | 147 | $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ) . "\n" ); |
150 | 148 | $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) ); |
151 | 149 | $wgOut->addModules( array( 'mediawiki.legacy.metadata' ) ); |
152 | | - $wgOut->addHTML( |
153 | | - "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" ); |
154 | 150 | } |
155 | 151 | |
156 | 152 | $css = $this->repo->getDescriptionStylesheetUrl(); |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -444,6 +444,7 @@ |
445 | 445 | 'mediawiki.legacy.metadata' => new ResourceLoaderFileModule( array( |
446 | 446 | 'scripts' => 'skins/common/metadata.js', |
447 | 447 | 'dependencies' => 'mediawiki.legacy.wikibits', |
| 448 | + 'messages' => array( 'metadata-expand', 'metadata-collapse' ), |
448 | 449 | ) ), |
449 | 450 | 'mediawiki.legacy.mwsuggest' => new ResourceLoaderFileModule( array( |
450 | 451 | 'scripts' => 'skins/common/mwsuggest.js', |