diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js
index 0bec02e..e903b6a 100644
--- a/isso/js/app/isso.js
+++ b/isso/js/app/isso.js
@@ -75,7 +75,6 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
if (parent !== null) {
el.onsuccess();
- el.remove();
}
});
});
@@ -85,16 +84,8 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
return el;
};
- // lookup table for responses (to link to the parent)
- var map = {id: {}, name: {}};
-
var insert = function(comment, scrollIntoView) {
- map.name[comment.id] = comment.author;
- if (comment.parent) {
- comment["replyto"] = map.name[comment.parent];
- }
-
var el = $.htmlify(Mark.up(templates["comment"], comment));
// update datetime every 60 seconds
@@ -113,12 +104,7 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
if (comment.parent === null) {
entrypoint = $("#isso-root");
} else {
- var key = comment.parent;
- while (key in map.id) {
- key = map.id[key];
- }
- map.id[comment.id] = comment.parent;
- entrypoint = $("#isso-" + key + " > .text-wrapper > .isso-follow-up");
+ entrypoint = $("#isso-" + comment.parent + " > .text-wrapper > .isso-follow-up");
}
entrypoint.append(el);
@@ -134,26 +120,17 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
var form = null; // XXX: probably a good place for a closure
$("a.reply", footer).toggle("click",
function(toggler) {
- form = footer.insertAfter(new Postbox(comment.id));
+ form = footer.insertAfter(new Postbox(comment.parent === null ? comment.id : comment.parent));
form.onsuccess = function() { toggler.next(); };
$(".textarea", form).focus();
$("a.reply", footer).textContent = msgs["comment-close"];
},
function() {
- form.remove();
+ form.remove()
$("a.reply", footer).textContent = msgs["comment-reply"];
}
);
- if (comment.parent !== null) {
- $("a.parent", header).on("mouseover", function() {
- $("#isso-" + comment.parent).classList.add("parent-highlight");
- });
- $("a.parent", header).on("mouseout", function() {
- $("#isso-" + comment.parent).classList.remove("parent-highlight");
- });
- }
-
// update vote counter, but hide if votes sum to 0
var votes = function(value) {
var span = $("span.votes", footer);
diff --git a/isso/js/app/text/comment.html b/isso/js/app/text/comment.html
index e2431f2..e9cc1e1 100644
--- a/isso/js/app/text/comment.html
+++ b/isso/js/app/text/comment.html
@@ -14,13 +14,6 @@
{{ /if }}
- {{ if parent }}
- •
-
- {{ svg-forward }}{{ replyto | blank: `i18n-comment-anonymous` }}
-
- {{ /if }}
-
•
diff --git a/isso/tests/test_db.py b/isso/tests/test_db.py
index 0b5db33..b69de81 100644
--- a/isso/tests/test_db.py
+++ b/isso/tests/test_db.py
@@ -9,7 +9,6 @@ import sqlite3
import tempfile
from isso.db import SQLite3
-from isso.db.comments import Comments
from isso.core import Config
from isso.compat import iteritems