Archived
1
0
This commit is contained in:
Jeff Becker 2017-01-16 11:38:50 -05:00
parent 9cf7e617cb
commit bfd16332f1

View File

@ -1,18 +1,11 @@
function getReplyTo() {
if(!document.dynreply) {
var e = document.getElementById("postform_container");
if (e) {
// use existing postform
document.dynreply = new DynReply(e);
} else {
// build a new postform
document.dynreply = new DynReply();
}
e = document.dynreply.elem;
var e = document.dynreply.elem;
e.style.position = "fixed";
e.setAttribute("class", "shadow");
}
return document.dynreply;
}
@ -34,20 +27,7 @@ function table_insert_row(table, header, items) {
/**
build dynamic reply box
*/
function DynReply(existingElem) {
if (existingElem) {
// wrap existing post form
// XXX: wrap it here
this.elem = existingElem;
this.form = this.elem.querySelector("form");
this._error = document.getElementById("postform_msg");
this.url = this.form.action + "?t=json";
this.x = 1;
this.y = 1;
return;
}
// build new post form
function DynReply() {
var elem = document.createElement("div");
elem.setAttribute("id", "postform_container");
@ -142,7 +122,6 @@ function DynReply(existingElem) {
this.url = null;
this.x = 1;
this.y = 1;
}
DynReply.prototype.update = function() {