Merge pull request #28 from Rantanen/master

Align the file summary
This commit is contained in:
Rodrigo Fernandes 2015-10-28 18:52:33 +00:00
commit d88ff360df
2 changed files with 19 additions and 9 deletions

View file

@ -33,6 +33,10 @@
}
.d2h-lines-added {
text-align: right;
}
.d2h-lines-added > * {
background-color: #ceffce;
border: 1px solid #b4e2b4;
color: #399839;
@ -42,6 +46,10 @@
}
.d2h-lines-deleted {
text-align: left;
}
.d2h-lines-deleted > * {
background-color: #f7c8c8;
border: 1px solid #e9aeae;
color: #c33;

View file

@ -21,19 +21,21 @@
' <a id="' + hideId + '" class="d2h-hide" href="#' + hideId + '">+</a>\n' +
' <a id="' + showId + 'd2h-show" class="d2h-show" href="#' + showId + '">-</a>\n' +
' <div class="d2h-clear"></div>\n' +
' <div class="d2h-file-list">\n' +
' <table class="d2h-file-list">\n' +
diffFiles.map(function (file) {
return ' <div class="d2h-file-list-line">\n' +
' <div class="d2h-file-stats">\n' +
' <span class="d2h-lines-added">+' + file.addedLines + '</span>\n' +
' <span class="d2h-lines-deleted">-' + file.deletedLines + '</span>\n' +
' </div>\n' +
' <div class="d2h-file-name"><a href="#' + printerUtils.getHtmlId(file) + '">&nbsp;' + printerUtils.getDiffName(file) + '</a></div>\n' +
' </div>\n'
return ' <tr class="d2h-file-list-line">\n' +
' <td class="d2h-lines-added">\n' +
' <span>+' + file.addedLines + '</span>\n' +
' </td>\n' +
' <td class="d2h-lines-deleted">\n' +
' <span>-' + file.deletedLines + '</span>\n' +
' </td>\n' +
' <td class="d2h-file-name"><a href="#' + printerUtils.getHtmlId(file) + '">&nbsp;' + printerUtils.getDiffName(file) + '</a></td>\n' +
' </tr>\n'
}).join('\n') +
'</div></div>\n';
'</table></div>\n';
};
module.exports['FileListPrinter'] = new FileListPrinter();