Clean up the commit file list

- remove the underline from file names (makes them easier to read)
    - add icons to replace the file modification buttons (icons by Nathan Kinsinger)
This commit is contained in:
Nathan Kinsinger
2010-02-19 06:42:24 -07:00
parent 9a536fc92a
commit 9689c430ef
10 changed files with 32 additions and 15 deletions
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

+18 -5
View File
@@ -66,17 +66,28 @@ body {
#files {
margin-top: 1em;
margin-left: 0.5em;
}
#files a {
color: #666666;
text-decoration: none;
}
#files a:hover {
color: #4444ff;
border-bottom: 1px solid #4444ff;
}
#files img {
float: left;
margin-right: 0.5em;
margin-top: 1px;
}
#files p {
margin: 4px;
}
#files a:hover {
color: #4444ff;
margin-top: 0.25em;
margin-bottom: 0.25em;
}
.clear_both {
@@ -136,6 +147,7 @@ a.showdiff {
background-color: #fca64f;
}
/*
div.button
{
color: #666666;
@@ -176,5 +188,6 @@ div.deleted
div.renamed
{
/*No colour needed right now.*/
// No colour needed right now.
}
*/
+14 -10
View File
@@ -217,40 +217,44 @@ var showDiff = function() {
// Callback for the diff highlighter. Used to generate a filelist
var newfile = function(name1, name2, id, mode_change, old_mode, new_mode) {
var button = document.createElement("div");
var img = document.createElement("img");
var p = document.createElement("p");
var link = document.createElement("a");
link.setAttribute("href", "#" + id);
p.appendChild(link);
var buttonType = "";
var finalFile = "";
if (name1 == name2) {
buttonType = "changed"
finalFile = name1;
img.src = "../../images/modified.png";
img.title = "Modified file";
p.title = "Modified file";
if (mode_change)
p.appendChild(document.createTextNode(" mode " + old_mode + " -> " + new_mode));
}
else if (name1 == "/dev/null") {
buttonType = "created";
img.src = "../../images/added.png";
img.title = "Added file";
p.title = "Added file";
finalFile = name2;
}
else if (name2 == "/dev/null") {
buttonType = "deleted";
img.src = "../../images/removed.png";
img.title = "Removed file";
p.title = "Removed file";
finalFile = name1;
}
else {
buttonType = "renamed";
img.src = "../../images/renamed.png";
img.title = "Renamed file";
p.title = "Renamed file";
finalFile = name2;
p.insertBefore(document.createTextNode(name1 + " -> "), link);
}
link.appendChild(document.createTextNode(finalFile));
button.setAttribute("representedFile", finalFile);
link.setAttribute("representedFile", finalFile);
button.setAttribute("class", "button " + buttonType);
button.appendChild(document.createTextNode(buttonType));
$("files").appendChild(button);
p.insertBefore(img, link);
$("files").appendChild(p);
}