diff --git a/html/images/added.acorn b/html/images/added.acorn new file mode 100644 index 0000000..8a42ce6 Binary files /dev/null and b/html/images/added.acorn differ diff --git a/html/images/added.png b/html/images/added.png new file mode 100644 index 0000000..1c3e63c Binary files /dev/null and b/html/images/added.png differ diff --git a/html/images/modified.acorn b/html/images/modified.acorn new file mode 100644 index 0000000..6ba865b Binary files /dev/null and b/html/images/modified.acorn differ diff --git a/html/images/modified.png b/html/images/modified.png new file mode 100644 index 0000000..1fbf7f4 Binary files /dev/null and b/html/images/modified.png differ diff --git a/html/images/removed.acorn b/html/images/removed.acorn new file mode 100644 index 0000000..47be5c2 Binary files /dev/null and b/html/images/removed.acorn differ diff --git a/html/images/removed.png b/html/images/removed.png new file mode 100644 index 0000000..bf13f9e Binary files /dev/null and b/html/images/removed.png differ diff --git a/html/images/renamed.acorn b/html/images/renamed.acorn new file mode 100644 index 0000000..8b0545f Binary files /dev/null and b/html/images/renamed.acorn differ diff --git a/html/images/renamed.png b/html/images/renamed.png new file mode 100644 index 0000000..24b88ab Binary files /dev/null and b/html/images/renamed.png differ diff --git a/html/views/history/history.css b/html/views/history/history.css index 5effcb1..2f2c9c5 100644 --- a/html/views/history/history.css +++ b/html/views/history/history.css @@ -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. } +*/ diff --git a/html/views/history/history.js b/html/views/history/history.js index f724a5c..ab06b4f 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -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); }