Fix blanket popup
This commit is contained in:
parent
615fa1075c
commit
87b626d42a
1 changed files with 17 additions and 1 deletions
|
@ -4482,7 +4482,7 @@ blanket.defaultReporter = function(coverage){
|
|||
return typeof coverage.files[elem].branchData !== 'undefined';
|
||||
}),
|
||||
bodyContent = "<div id='blanket-main'><div class='blanket bl-title'><div class='bl-cl bl-file'><a href='http://alex-seville.github.com/blanket/' target='_blank' class='bl-logo'>Blanket.js</a> results</div><div class='bl-cl rs'>Coverage (%)</div><div class='bl-cl rs'>Covered/Total Smts.</div>"+(hasBranchTracking ? "<div class='bl-cl rs'>Covered/Total Branches</div>":"")+"<div style='clear:both;'></div></div>",
|
||||
fileTemplate = "<div class='blanket {{statusclass}}'><div class='bl-cl bl-file'><span class='bl-nb'>{{fileNumber}}.</span><a href='javascript:blanket_toggleSource(\"file-{{fileNumber}}\")'>{{file}}</a></div><div class='bl-cl rs'>{{percentage}} %</div><div class='bl-cl rs'>{{numberCovered}}/{{totalSmts}}</div>"+( hasBranchTracking ? "<div class='bl-cl rs'>{{passedBranches}}/{{totalBranches}}</div>" : "" )+"<div id='file-{{fileNumber}}' class='bl-source' style='display:none;'>{{source}}</div><div style='clear:both;'></div></div>";
|
||||
fileTemplate = "<div class='blanket {{statusclass}}'><div class='bl-cl bl-file'><span class='bl-nb'>{{fileNumber}}.</span><a id='blanket-link-file-{{fileNumber}}' href='javascript:void(0)'>{{file}}</a></div><div class='bl-cl rs'>{{percentage}} %</div><div class='bl-cl rs'>{{numberCovered}}/{{totalSmts}}</div>"+( hasBranchTracking ? "<div class='bl-cl rs'>{{passedBranches}}/{{totalBranches}}</div>" : "" )+"<div id='file-{{fileNumber}}' class='bl-source' style='display:none;'>{{source}}</div><div style='clear:both;'></div></div>";
|
||||
grandTotalTemplate = "<div class='blanket grand-total {{statusclass}}'><div class='bl-cl'>{{rowTitle}}</div><div class='bl-cl rs'>{{percentage}} %</div><div class='bl-cl rs'>{{numberCovered}}/{{totalSmts}}</div>"+( hasBranchTracking ? "<div class='bl-cl rs'>{{passedBranches}}/{{totalBranches}}</div>" : "" ) + "<div style='clear:both;'></div></div>";
|
||||
|
||||
function blanket_toggleSource(id) {
|
||||
|
@ -4802,6 +4802,22 @@ blanket.defaultReporter = function(coverage){
|
|||
}else{
|
||||
appendTag('div', body, bodyContent);
|
||||
}
|
||||
|
||||
fileNumber = 0;
|
||||
for(var file in files) {
|
||||
if (!files.hasOwnProperty(file)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fileNumber++;
|
||||
var _ = function() {
|
||||
var localFN = fileNumber;
|
||||
$("#blanket-link-file-" + fileNumber).click(function() {
|
||||
blanket_toggleSource("file-" + localFN);
|
||||
});
|
||||
}();
|
||||
}
|
||||
|
||||
//appendHtml(body, '</div>');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue