MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 44: Line 44:
var collapseCaption = "hide";
var collapseCaption = "hide";
var expandCaption = "show";
var expandCaption = "show";
/*Test results partial expand/collapse revision*/
var partCollapseCaption = "expand";
var partExpandCaption = "collapse";
   
   
window.collapseTable = function( tableIndex ){
window.collapseTable = function( tableIndex ){
Line 59: Line 62:
             Rows[i].style.display = "none";
             Rows[i].style.display = "none";
         }
         }
         Button.firstChild.data = expandCaption+(document.getElementById( "collapsibleTable" + tableIndex ).className.indexOf("testresults")!=-1?" all":"");
         Button.firstChild.data = document.getElementById( "collapsibleTable" + tableIndex ).className.indexOf("testresults")!=-1?partExpandCaption:expandCaption;
     } else {
     } else {
         for ( var i = 1; i < Rows.length; i++ ) {
         for ( var i = 1; i < Rows.length; i++ ) {
             Rows[i].style.display = Rows[0].style.display;
             Rows[i].style.display = Rows[0].style.display;
         }
         }
         Button.firstChild.data = collapseCaption;
         Button.firstChild.data = document.getElementById( "collapsibleTable" + tableIndex ).className.indexOf("testresults")!=-1?partCollapseCaption:collapseCaption;
     }
     }
}
}

Navigation menu