MediaWiki:Common.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m fix namespace ReferenceTooltip.js |
sostituita funzione hasClass con jQuery |
||
Riga 150:
$( comboboxSearch );
}
/**
Riga 198 ⟶ 186:
}
function buttonLinkClickHandler( event ) {
event.preventDefault();
collapseTable( event.data );
}
Riga 210 ⟶ 198:
for ( i = 0; i < Tables.length; i++ ) {
if (
NavigationBoxes[ tableIndex ] = Tables[i];
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
Riga 225 ⟶ 213:
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
$( ButtonLink ).attr( 'href', '#' ).click( tableIndex, buttonLinkClickHandler );
ButtonLink.appendChild( ButtonText );
Riga 234 ⟶ 222:
var Header = Tables[i].getElementsByTagName( "tr" )[0].getElementsByTagName( "th" )[0];
/* only add button and increment count if there is a header row to work with */
if ( Header ) {
Header.insertBefore( Button, Header.childNodes[0] );
tableIndex++;
Riga 241 ⟶ 229:
}
var cTables = tableIndex + $( 'table.navbox.mw-collapsible' ).length;
for ( i = 0; i < tableIndex; i++ ) {
( cTables >= autoCollapse && collapseTable( i );
}
|