forked from OSchip/llvm-project
Minor UI enhancement:
(1) when all of the bug category boxes are checked, automatically check "All Bugs" (2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs" llvm-svn: 58346
This commit is contained in:
parent
8f243a5dde
commit
2800afa640
|
@ -501,12 +501,29 @@ function CopyCheckedStateToCheckButtons(SummaryCheckButton) {
|
|||
}
|
||||
}
|
||||
|
||||
function returnObjById( id ) {
|
||||
if (document.getElementById)
|
||||
var returnVar = document.getElementById(id);
|
||||
else if (document.all)
|
||||
var returnVar = document.all[id];
|
||||
else if (document.layers)
|
||||
var returnVar = document.layers[id];
|
||||
return returnVar;
|
||||
}
|
||||
|
||||
var NumUnchecked = 0;
|
||||
|
||||
function ToggleDisplay(CheckButton, ClassName) {
|
||||
if (CheckButton.checked) {
|
||||
SetDisplay(ClassName, "");
|
||||
if (--NumUnchecked == 0) {
|
||||
returnObjById("AllBugsCheck").checked = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
SetDisplay(ClassName, "none");
|
||||
NumUnchecked++;
|
||||
returnObjById("AllBugsCheck").checked = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -553,7 +570,7 @@ ENDTEXT
|
|||
print OUT <<ENDTEXT;
|
||||
<table>
|
||||
<thead><tr><td>Bug Type</td><td>Quantity</td><td class="sorttable_nosort">Display?</td></tr></thead>
|
||||
<tr style="font-weight:bold"><td class="SUMM_DESC">All Bugs</td><td class="Q">$TotalBugs</td><td><center><input type="checkbox" onClick="CopyCheckedStateToCheckButtons(this);" checked/></center></td></tr>
|
||||
<tr style="font-weight:bold"><td class="SUMM_DESC">All Bugs</td><td class="Q">$TotalBugs</td><td><center><input type="checkbox" id="AllBugsCheck" onClick="CopyCheckedStateToCheckButtons(this);" checked/></center></td></tr>
|
||||
ENDTEXT
|
||||
|
||||
my $last_category;
|
||||
|
|
Loading…
Reference in New Issue