X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.action%2Fmediawiki.action.view.metadata.js;h=7217d36822539ba341fa95dea42ea5d69b1f2201;hb=7b9568f540d93058188cce0d4bf18ce8833b6b64;hp=0d000c9ba9947d1b3924dca68c7fe96d32accf55;hpb=081f44fa7ff52ba63d1c48eb833dcc110dd1bb30;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js index 0d000c9ba9..7217d36822 100644 --- a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js +++ b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js @@ -8,45 +8,48 @@ */ ( function ( mw, $ ) { $( function () { - var $row, $col, $link, - showText = mw.msg( 'metadata-expand' ), - hideText = mw.msg( 'metadata-collapse' ), - $table = $( '#mw_metadata' ), - $tbody = $table.find( 'tbody' ); - - if ( !$tbody.find( '.collapsable' ).length ) { + var $tables = $( '.mw_metadata' ); + if ( !$tables.find( '.mw-metadata-collapsible, .collapsable' ).length ) { + // No collapsible rows present on this page return; } + $tables.each( function () { + var $link, + expandText = mw.msg( 'metadata-expand' ), + collapseText = mw.msg( 'metadata-collapse' ), + $table = $( this ); - $row = $( '
' ); - $col = $( '