mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
history.js: Fix display of mode-change and rename
Pieter rewrote history.js in cfbcfc1f38, avoiding the use of
.innerHTML for performance reasons. This broke the HTML-arrows when
dealing with renames / mode-changes because createTextNode quotes them.
This is a simple work-around.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This commit is contained in:
committed by
Pieter de Bie
parent
3b6c2a3048
commit
fe54a464f7
@@ -207,7 +207,7 @@ var showDiff = function() {
|
||||
buttonType = "changed"
|
||||
link.appendChild(document.createTextNode(name1));
|
||||
if (mode_change)
|
||||
p.appendChild(document.createTextNode("mode " + old_mode + " → " + new_mode));
|
||||
p.appendChild(document.createTextNode(" mode " + old_mode + " -> " + new_mode));
|
||||
}
|
||||
else if (name1 == "/dev/null") {
|
||||
buttonType = "created";
|
||||
@@ -220,7 +220,7 @@ var showDiff = function() {
|
||||
else {
|
||||
buttonType = "renamed";
|
||||
link.appendChild(document.createTextNode(name2));
|
||||
p.insertBefore(document.createTextNode(name1), link);
|
||||
p.insertBefore(document.createTextNode(name1 + " -> "), link);
|
||||
}
|
||||
button.setAttribute("class", "button " + buttonType);
|
||||
button.appendChild(document.createTextNode(buttonType));
|
||||
|
||||
Reference in New Issue
Block a user