Skip to content

Commit

Permalink
calculate separator global for all results
Browse files Browse the repository at this point in the history
  • Loading branch information
UFOMelkor committed Sep 6, 2014
1 parent a5b3a2d commit 0b0ffc3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions templates/html/summary/report-tabular.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,16 @@
var parents = [
{ name: "temporary", _values: []}
];
var final, e, level ;
var final, e, level, separator;
separator = "/";
for(i = 0; i < len; i++) {
if (result[i].name.indexOf("\\") !== -1) {
separator = "\\";
break;
}
}
for(i = 0; i < len; i++) {
var separator;
e = result[i];
separator = e.name.indexOf("\\") !== -1 ? "\\" : "/";
level = (e.name.split(separator).length - 1);
if(!e.name.match(/php$/)) {
parents[level + 1] = e;
Expand Down

0 comments on commit 0b0ffc3

Please sign in to comment.