mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Rename 'stats' to 'file_stats'
https://bugzilla.gnome.org/show_bug.cgi?id=720886
This commit is contained in:
parent
6686a3b9ab
commit
7eaaafd491
|
@ -128,7 +128,7 @@ function diff_file(file, lnstate, data)
|
|||
var addedp = Math.floor(added / total * 100);
|
||||
var removedp = 100 - addedp;
|
||||
|
||||
var stats = '<span class="expander">-</span><span class="stats"><span class="number">' + (added + removed) + '</span><span class="bar"><span class="added" style="width: ' + addedp + '%;"></span><span class="removed" style="width: ' + removedp + '%;"></span></span></span>';
|
||||
var file_stats = '<span class="expander">-</span><span class="file_stats"><span class="number">' + (added + removed) + '</span><span class="bar"><span class="added" style="width: ' + addedp + '%;"></span><span class="removed" style="width: ' + removedp + '%;"></span></span></span>';
|
||||
|
||||
if (data.settings.staged || data.settings.unstaged)
|
||||
{
|
||||
|
@ -145,14 +145,14 @@ function diff_file(file, lnstate, data)
|
|||
nm = data.settings.strings.stage;
|
||||
}
|
||||
|
||||
stats += '<span class="' + cls + '">' + nm + '</span>';
|
||||
file_stats += '<span class="' + cls + '">' + nm + '</span>';
|
||||
}
|
||||
|
||||
var template = data.file_template;
|
||||
var repls = {
|
||||
'FILE_PATH': file_path,
|
||||
'FILE_BODY': file_body,
|
||||
'STATS': stats,
|
||||
'FILE_STATS': file_stats,
|
||||
};
|
||||
|
||||
for (var r in repls)
|
||||
|
@ -176,7 +176,7 @@ function diff_files(files, lines, maxlines, data)
|
|||
var repl = [
|
||||
'FILE_PATH',
|
||||
'FILE_BODY',
|
||||
'STATS'
|
||||
'FILE_STATS'
|
||||
];
|
||||
|
||||
var replacements = {};
|
||||
|
|
|
@ -115,7 +115,7 @@ tbody.collapsed > :not(.file_header) {
|
|||
display:none;
|
||||
}
|
||||
|
||||
span.stats {
|
||||
span.file_stats {
|
||||
width: 75px;
|
||||
background-color: #ececec;
|
||||
padding: 3px;
|
||||
|
@ -126,27 +126,27 @@ span.stats {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span.stats .number, span.stats .bar {
|
||||
span.file_stats .number, span.file_stats .bar {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span.stats .bar {
|
||||
span.file_stats .bar {
|
||||
width: 100%;
|
||||
padding: 0px 0px 0px 6px;
|
||||
}
|
||||
|
||||
span.stats .added, span.stats .removed {
|
||||
span.file_stats .added, span.file_stats .removed {
|
||||
height: 5px;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span.stats .added {
|
||||
span.file_stats .added {
|
||||
background-color: #33cc33;
|
||||
}
|
||||
|
||||
span.stats .removed {
|
||||
span.file_stats .removed {
|
||||
background-color: #cc3333;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="file_header">
|
||||
<td colspan="3"><!-- ${STATS} --><span class="file_path"><!-- ${FILE_PATH} --></span></td>
|
||||
<td colspan="3"><!-- ${FILE_STATS} --><span class="file_path"><!-- ${FILE_PATH} --></span></td>
|
||||
</tr>
|
||||
<!-- ${FILE_BODY} -->
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue