more
This commit is contained in:
parent
9cf7e617cb
commit
bfd16332f1
@ -1,19 +1,12 @@
|
|||||||
|
|
||||||
function getReplyTo() {
|
function getReplyTo() {
|
||||||
if(!document.dynreply) {
|
if(!document.dynreply) {
|
||||||
var e = document.getElementById("postform_container");
|
document.dynreply = new DynReply();
|
||||||
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.style.position = "fixed";
|
||||||
e.setAttribute("class", "shadow");
|
e.setAttribute("class", "shadow");
|
||||||
}
|
return document.dynreply;
|
||||||
return document.dynreply;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function table_insert_row(table, header, items) {
|
function table_insert_row(table, header, items) {
|
||||||
@ -34,20 +27,7 @@ function table_insert_row(table, header, items) {
|
|||||||
/**
|
/**
|
||||||
build dynamic reply box
|
build dynamic reply box
|
||||||
*/
|
*/
|
||||||
function DynReply(existingElem) {
|
function DynReply() {
|
||||||
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
|
|
||||||
|
|
||||||
var elem = document.createElement("div");
|
var elem = document.createElement("div");
|
||||||
elem.setAttribute("id", "postform_container");
|
elem.setAttribute("id", "postform_container");
|
||||||
@ -142,7 +122,6 @@ function DynReply(existingElem) {
|
|||||||
this.url = null;
|
this.url = null;
|
||||||
this.x = 1;
|
this.x = 1;
|
||||||
this.y = 1;
|
this.y = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DynReply.prototype.update = function() {
|
DynReply.prototype.update = function() {
|
||||||
|
Reference in New Issue
Block a user