Merge "Align mediawiki.ui vars with CSS color guidelines"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.view.metadata.js
index 712cf29..b1a63b0 100644 (file)
@@ -4,9 +4,7 @@
  * Add an expand/collapse link and collapse by default if set to
  * (with JS disabled, user will see all items)
  *
- * See also:
- * - ImagePage.php#makeMetadataTable (creates the HTML)
- * - skins/common/shared.css (hides tr.collapsable inside table.collapsed)
+ * See also ImagePage.php#makeMetadataTable (creates the HTML)
  */
 ( function ( mw, $ ) {
        $( function () {
                $row = $( '<tr class="mw-metadata-show-hide-extended"></tr>' );
                $col = $( '<td colspan="2"></td>' );
 
-               $link = $( '<a>', {
-                       text: showText,
-                       href: '#'
-               } ).click( function () {
+               $link = $( '<a>' )
+               .text( showText )
+               .attr( 'href', '#' )
+               .click( function () {
                        if ( $table.hasClass( 'collapsed' ) ) {
                                $( this ).text( hideText );
                        } else {