diff --git a/editor/sahliedit.js b/editor/sahliedit.js
index 236a57a..0072311 100644
--- a/editor/sahliedit.js
+++ b/editor/sahliedit.js
@@ -212,10 +212,9 @@
amigastatus = ansiorascii(booltoint(item.amiga));
delbutton = $("delete").click((function(_this) {
return function(event) {
- pos = this.id.replace("del-", "");
- console.log(this);
- console.log(_this.data.filedata.splice(pos, 1));
- return this.parentNode.remove();
+ pos = event.currentTarget.id.replace("del-", "");
+ _this.data.filedata.splice(pos, 1);
+ return _this.buildlist(_this.data);
};
})(this));
entry = $("
" + arrows + amigastatus + " | " + item.author + " : " + item.name + " : " + item.file + "");
diff --git a/editor/sahliedit.litcoffee b/editor/sahliedit.litcoffee
index 447336c..b3b144b 100644
--- a/editor/sahliedit.litcoffee
+++ b/editor/sahliedit.litcoffee
@@ -187,13 +187,10 @@ insert it into the array at end position. A la the draggon-dropping.
arrows = ""
amigastatus = ansiorascii booltoint item.amiga
delbutton = $("delete")
- .click ((_this) ->
- (event) ->
- pos = @.id.replace "del-",""
- console.log @
- console.log _this.data.filedata.splice pos,1
- @.parentNode.remove()
- )(this)
+ .click (event) =>
+ pos = event.currentTarget.id.replace "del-",""
+ @data.filedata.splice pos,1
+ @buildlist @data
entry = $("#{arrows}#{amigastatus} | #{item.author} : #{item.name} : #{item.file}")
entry.append delbutton