mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
Modify styles of split diff.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<a name="diff-@i"></a>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th style="font-weight: normal;" class="box-header">
|
||||
<th style="font-weight: normal; line-height: 27px;" class="box-header">
|
||||
@if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){
|
||||
@diff.oldPath -> @diff.newPath
|
||||
@if(newCommitId.isDefined){
|
||||
@@ -69,7 +69,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td style="padding: 0;">
|
||||
@if(diff.newContent != None || diff.oldContent != None){
|
||||
<div id="diffText-@i"></div>
|
||||
<textarea id="newText-@i" style="display: none;">@diff.newContent.getOrElse("")</textarea>
|
||||
|
||||
@@ -847,20 +847,24 @@ div.author-info div.committer {
|
||||
/****************************************************************************/
|
||||
/* Diff */
|
||||
/****************************************************************************/
|
||||
table.inlinediff {
|
||||
table.diff {
|
||||
font-size: 12px;
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.inlinediff thead {
|
||||
table.diff thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td.insert, td.equal, td.delete {
|
||||
table.inlinediff td.insert, table.inlinediff td.equal, table.inlinediff td.delete {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td.insert, td.equal, td.delete {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Repository Settings */
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -173,8 +173,13 @@ diffview = {
|
||||
addCellsInline(node, b++, n++, baseTextLines, change);
|
||||
}
|
||||
} else {
|
||||
b = addCells(node, b, be, baseTextLines, change);
|
||||
n = addCells(node, n, ne, newTextLines, change);
|
||||
var changeBase = change, changeNew = change;
|
||||
if (change === "replace") {
|
||||
if (b < be) changeBase = "delete";
|
||||
if (n < ne) changeNew = "insert";
|
||||
}
|
||||
b = addCells(node, b, be, baseTextLines, changeBase);
|
||||
n = addCells(node, n, ne, newTextLines, changeNew);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user