From cf14746bda6141221f5a040ebdb7a475fe1c8355 Mon Sep 17 00:00:00 2001 From: Kim Does Date: Sun, 25 Jan 2009 20:59:50 +0000 Subject: [PATCH] HistoryView: Prettify the file list --- html/views/history/history.css | 48 +++++++++++++++++++++++++++------- html/views/history/history.js | 8 +++--- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/html/views/history/history.css b/html/views/history/history.css index 10b52c0..07c281b 100644 --- a/html/views/history/history.css +++ b/html/views/history/history.css @@ -68,14 +68,15 @@ a.servicebutton{ #files { margin-top: 1em; - font-family: Monaco; - font-size: 10px; } #files a { color: #666666; } +#files p { + margin: 4px; +} #files a:hover { color: #4444ff; } @@ -137,18 +138,45 @@ a.showdiff { font-weight: bold; } -.addedfile { - color: green; +div.button +{ + color: #666666; + + font-size: 60%; + text-align: center; + + width: 50px; + + margin-right: 10px; + + padding: 2px; + + float: left; + clear: both; + + border: 1px solid; + -webkit-border-radius: 3px; } -.deletedfile { - color: red; +div.created +{ + background-color: #ccffcc; + border-color: #66ff66; } -.changedfile { - color: purple; +div.changed +{ + background-color: #ffcc99; + border-color: #ff9933; } -.movedfile { - color: gray; +div.deleted +{ + background-color: #ffcccc; + border-color: #ff6666; +} + +div.renamed +{ + /*No colour needed right now.*/ } diff --git a/html/views/history/history.js b/html/views/history/history.js index a748485..d11358d 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -175,13 +175,13 @@ var loadCommit = function(commitObject, currentRef) { var showDiff = function() { var newfile = function(name1, name2, id) { if (name1 == name2) - $("files").innerHTML += "" + name1 + " changed
"; + $("files").innerHTML += "
changed

" + name1 + "

"; else if (name1 == "/dev/null") - $("files").innerHTML += "" + name2 + " created
"; + $("files").innerHTML += "
created

" + name2 + "

"; else if (name2 == "/dev/null") - $("files").innerHTML += "" + name1 + " deleted
"; + $("files").innerHTML += "
deleted

" + name1 + "

"; else - $("files").innerHTML += "" + name1 + " moved to " + name2 + "
"; + $("files").innerHTML += "
renamed

" + name1 + " → " + name2 + "

"; } var binaryDiff = function(filename) {