Skip to content

Commit 99ef11f

Browse files
committed
Merge branch 'opinxit-feature/add-toplinks'
2 parents 08e82c0 + 63abf40 commit 99ef11f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

html/lib/diffHighlighter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ var highlightDiff = function(diff, element, callbacks) {
5555
var mode_change = false;
5656
var old_mode = "";
5757
var new_mode = "";
58+
var linkToTop = "<div class=\"top-link\"><a href=\"#\">Top</a></div>";
5859

5960
var hunk_start_line_1 = -1;
6061
var hunk_start_line_2 = -1;
@@ -115,7 +116,7 @@ var highlightDiff = function(diff, element, callbacks) {
115116
}
116117

117118
if (diffContent != "" || binary)
118-
finalContent += '</div>';
119+
finalContent += '</div>' + linkToTop;
119120

120121
line1 = "";
121122
line2 = "";

html/views/commit/commit.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ table.diff {
124124
margin: -5px;
125125
padding-left: 20px;
126126
}
127+
128+
.top-link {
129+
display: none;
130+
}

html/views/history/history.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ a.showdiff {
181181
background-color: #fca64f;
182182
}
183183

184+
.top-link {
185+
text-align: right;
186+
margin-right: 20px;
187+
padding-bottom: 5px;
188+
font-size: 90%;
189+
}
190+
184191
/*
185192
div.button
186193
{

0 commit comments

Comments
 (0)