Skip to content

Commit 9689c43

Browse files
committed
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)
1 parent 9a536fc commit 9689c43

File tree

10 files changed

+31
-14
lines changed

10 files changed

+31
-14
lines changed

html/images/added.acorn

1.66 KB
Binary file not shown.

html/images/added.png

292 Bytes
Loading

html/images/modified.acorn

1.88 KB
Binary file not shown.

html/images/modified.png

308 Bytes
Loading

html/images/removed.acorn

1.65 KB
Binary file not shown.

html/images/removed.png

275 Bytes
Loading

html/images/renamed.acorn

1.67 KB
Binary file not shown.

html/images/renamed.png

290 Bytes
Loading

html/views/history/history.css

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,28 @@ body {
6666

6767
#files {
6868
margin-top: 1em;
69+
margin-left: 0.5em;
6970
}
7071

7172
#files a {
7273
color: #666666;
74+
text-decoration: none;
7375
}
7476

75-
#files p {
76-
margin: 4px;
77-
}
7877
#files a:hover {
7978
color: #4444ff;
79+
border-bottom: 1px solid #4444ff;
80+
}
81+
82+
#files img {
83+
float: left;
84+
margin-right: 0.5em;
85+
margin-top: 1px;
86+
}
87+
88+
#files p {
89+
margin-top: 0.25em;
90+
margin-bottom: 0.25em;
8091
}
8192

8293
.clear_both {
@@ -136,6 +147,7 @@ a.showdiff {
136147
background-color: #fca64f;
137148
}
138149

150+
/*
139151
div.button
140152
{
141153
color: #666666;
@@ -176,5 +188,6 @@ div.deleted
176188
177189
div.renamed
178190
{
179-
/*No colour needed right now.*/
191+
// No colour needed right now.
180192
}
193+
*/

html/views/history/history.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,40 +217,44 @@ var showDiff = function() {
217217

218218
// Callback for the diff highlighter. Used to generate a filelist
219219
var newfile = function(name1, name2, id, mode_change, old_mode, new_mode) {
220-
var button = document.createElement("div");
220+
var img = document.createElement("img");
221221
var p = document.createElement("p");
222222
var link = document.createElement("a");
223223
link.setAttribute("href", "#" + id);
224224
p.appendChild(link);
225-
var buttonType = "";
226225
var finalFile = "";
227226
if (name1 == name2) {
228-
buttonType = "changed"
229227
finalFile = name1;
228+
img.src = "../../images/modified.png";
229+
img.title = "Modified file";
230+
p.title = "Modified file";
230231
if (mode_change)
231232
p.appendChild(document.createTextNode(" mode " + old_mode + " -> " + new_mode));
232233
}
233234
else if (name1 == "/dev/null") {
234-
buttonType = "created";
235+
img.src = "../../images/added.png";
236+
img.title = "Added file";
237+
p.title = "Added file";
235238
finalFile = name2;
236239
}
237240
else if (name2 == "/dev/null") {
238-
buttonType = "deleted";
241+
img.src = "../../images/removed.png";
242+
img.title = "Removed file";
243+
p.title = "Removed file";
239244
finalFile = name1;
240245
}
241246
else {
242-
buttonType = "renamed";
247+
img.src = "../../images/renamed.png";
248+
img.title = "Renamed file";
249+
p.title = "Renamed file";
243250
finalFile = name2;
244251
p.insertBefore(document.createTextNode(name1 + " -> "), link);
245252
}
246253

247254
link.appendChild(document.createTextNode(finalFile));
248-
button.setAttribute("representedFile", finalFile);
249255
link.setAttribute("representedFile", finalFile);
250256

251-
button.setAttribute("class", "button " + buttonType);
252-
button.appendChild(document.createTextNode(buttonType));
253-
$("files").appendChild(button);
257+
p.insertBefore(img, link);
254258
$("files").appendChild(p);
255259
}
256260

0 commit comments

Comments
 (0)