mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
64 lines
1.8 KiB
HTML
64 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?
|
|
var diff = $("diff");
|
|
|
|
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>
|