Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add links to top in history and file view #362

Merged
merged 1 commit into from
Jul 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion html/lib/diffHighlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var highlightDiff = function(diff, element, callbacks) {
var mode_change = false;
var old_mode = "";
var new_mode = "";
var linkToTop = "<div class=\"top-link\"><a href=\"#\">Top</a></div>";

var hunk_start_line_1 = -1;
var hunk_start_line_2 = -1;
Expand Down Expand Up @@ -115,7 +116,7 @@ var highlightDiff = function(diff, element, callbacks) {
}

if (diffContent != "" || binary)
finalContent += '</div>';
finalContent += '</div>' + linkToTop;

line1 = "";
line2 = "";
Expand Down
4 changes: 4 additions & 0 deletions html/views/commit/commit.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ table.diff {
margin: -5px;
padding-left: 20px;
}

.top-link {
display: none;
}
7 changes: 7 additions & 0 deletions html/views/history/history.css
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ a.showdiff {
background-color: #fca64f;
}

.top-link {
text-align: right;
margin-right: 20px;
padding-bottom: 5px;
font-size: 90%;
}

/*
div.button
{
Expand Down