Files
gitx/html/diff.html
T
Stephen Celis 43bb12317c WebHistoryView: Don't use Prototype
This removes all dependencies on Prototype in GitX, so we can remove
the library
2008-10-21 15:27:39 +02:00

62 lines
1.8 KiB
HTML

<html>
<head>
<title>Diff for file</title>
<link rel="stylesheet" href="commits.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="diff_style.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="GitX.js" type="text/javascript" charset="utf-8"></script>
<script src="diff.js" type="text/javascript" charset="utf-8"></script>
<script>
var showFileChanges = function(file, cached) {
// New file?
if (file.status == 0)
{
var contents = file.unstagedChanges();
if (contents)
$("diff").innerHTML = contents.escapeHTML();
else
$("diff").innerHTML = "Could not display changes";
$("diff").style.display = '';
$('title').innerHTML = "New file: " + file.path;
} else {
$("diff").style.display = 'none';
if (cached)
$("diff").innerHTML = file.cachedChangesAmend_(Controller.amend()).escapeHTML();
else
$("diff").innerHTML = file.unstagedChanges().escapeHTML();
highlightDiffs();
$("diff").style.display = '';
$("title").innerHTML = "Changes for " + file.path;
}
}
</script>
<style type="text/css" media="screen">
body {
padding: 0px;
margin: 0px;
margin-top: 20px;
}
#title {
padding: 0px;
padding-left: 5px;
border-bottom: 1px solid black;
margin: 0px;
font-weight: 500;
background-color: #ECF3FD;
font-size: 100%;
position: fixed;
font-family: Helvetica;
top: 0px;
width: 100%;
}
</style>
<script src="diffHighlighter.js" type="text/javascript" charset="utf-8"></script>
<script src="keyboardNavigation.js" type="text/javascript" charset="utf-8"></script>
</head>
<h1 id='title'>Nothing to commit</h1>
<body style="padding: 0px; border: 0px" onLoad="">
<pre><code class="diffcode" id='diff'>Nothing to commit (working directory clean)</code></pre>
</body>