forked from OSchip/llvm-project
Patch by Nikita Zhuk:
The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states. llvm-svn: 58344
This commit is contained in:
parent
db0b70a937
commit
99205241f4
|
@ -489,6 +489,18 @@ function SetDisplay(RowClass, DisplayVal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CopyCheckedStateToCheckButtons(SummaryCheckButton) {
|
||||||
|
var Inputs = document.getElementsByTagName("input");
|
||||||
|
for ( var i = 0 ; i < Inputs.length; ++i ) {
|
||||||
|
if (Inputs[i].type == "checkbox") {
|
||||||
|
if(Inputs[i] != SummaryCheckButton) {
|
||||||
|
Inputs[i].checked = SummaryCheckButton.checked;
|
||||||
|
Inputs[i].onclick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function ToggleDisplay(CheckButton, ClassName) {
|
function ToggleDisplay(CheckButton, ClassName) {
|
||||||
if (CheckButton.checked) {
|
if (CheckButton.checked) {
|
||||||
SetDisplay(ClassName, "");
|
SetDisplay(ClassName, "");
|
||||||
|
@ -536,9 +548,12 @@ ENDTEXT
|
||||||
print OUT "\n<p>Results in this analysis run are based on analyzer build <b>$BuildName</b>.</p>\n"
|
print OUT "\n<p>Results in this analysis run are based on analyzer build <b>$BuildName</b>.</p>\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
my $TotalBugs = scalar(@Index);
|
||||||
print OUT <<ENDTEXT;
|
print OUT <<ENDTEXT;
|
||||||
<table>
|
<table>
|
||||||
<thead><tr><td>Bug Type</td><td>Quantity</td><td class="sorttable_nosort">Display?</td></tr></thead>
|
<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>
|
||||||
ENDTEXT
|
ENDTEXT
|
||||||
|
|
||||||
my $last_category;
|
my $last_category;
|
||||||
|
@ -562,7 +577,7 @@ ENDTEXT
|
||||||
$x =~ s/[ ,'":\/()]+/_/g;
|
$x =~ s/[ ,'":\/()]+/_/g;
|
||||||
print OUT "<tr><td class=\"SUMM_DESC\">";
|
print OUT "<tr><td class=\"SUMM_DESC\">";
|
||||||
print OUT $val->[2];
|
print OUT $val->[2];
|
||||||
print OUT "</td><td>";
|
print OUT "</td><td class=\"Q\">";
|
||||||
print OUT $val->[0];
|
print OUT $val->[0];
|
||||||
print OUT "</td><td><center><input type=\"checkbox\" onClick=\"ToggleDisplay(this,'bt_$x');\" checked/></center></td></tr>\n";
|
print OUT "</td><td><center><input type=\"checkbox\" onClick=\"ToggleDisplay(this,'bt_$x');\" checked/></center></td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue