mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Move stage button to template
This commit is contained in:
parent
b96a7ef4d4
commit
09d8641b1d
|
@ -21,7 +21,7 @@ function diff_file(file, lnstate, data)
|
|||
|
||||
var hunk_header = '<span class="hunk_stats">@@ -' + h.range.old.start + ',' + h.range.old.lines + ' +' + h.range.new.start + ',' + h.range.new.lines + ' @@</span>';
|
||||
|
||||
hunk_header = lnstate.stagebutton + hunk_header;
|
||||
hunk_header = hunk_header;
|
||||
|
||||
file_body += '<tr class="hunk_header">\
|
||||
<td class="gutter old">' + lnstate.gutterdots + '</td> \
|
||||
|
@ -114,13 +114,12 @@ function diff_file(file, lnstate, data)
|
|||
|
||||
var file_stats = '<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>';
|
||||
|
||||
file_stats = lnstate.stagebutton + file_stats;
|
||||
|
||||
var template = data.file_template;
|
||||
var repls = {
|
||||
'FILE_PATH': file_path,
|
||||
'FILE_BODY': file_body,
|
||||
'FILE_STATS': file_stats,
|
||||
'FILE_STAGE': lnstate.stagebutton,
|
||||
};
|
||||
|
||||
for (var r in repls)
|
||||
|
@ -144,7 +143,8 @@ function diff_files(files, lines, maxlines, data)
|
|||
var repl = [
|
||||
'FILE_PATH',
|
||||
'FILE_BODY',
|
||||
'FILE_STATS'
|
||||
'FILE_STATS',
|
||||
'FILE_STAGE'
|
||||
];
|
||||
|
||||
var replacements = {};
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<tr class="file_header">
|
||||
<td colspan="3">
|
||||
<span class="expander">-</span>
|
||||
<!-- ${FILE_STAGE} -->
|
||||
<!-- ${FILE_STATS} -->
|
||||
<span class="file_path"><!-- ${FILE_PATH} --></span>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue