aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/posts.js17
-rw-r--r--static/npost.html2
2 files changed, 13 insertions, 6 deletions
diff --git a/static/js/posts.js b/static/js/posts.js
index 805c1c1..1cb032e 100644
--- a/static/js/posts.js
+++ b/static/js/posts.js
@@ -180,7 +180,12 @@ function quote(actorName, opid, id)
var inReplyTo = document.getElementById("inReplyTo-box");
var w = window.innerWidth / 2 - 200;
- var h = document.getElementById(id + "-content").offsetTop - 448;
+ if(id == "reply") {
+ var h = document.getElementById(id + "-content").offsetTop - 548;
+ } else {
+ var h = document.getElementById(id + "-content").offsetTop - 448;
+ }
+
box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 550px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;");
@@ -191,10 +196,12 @@ function quote(actorName, opid, id)
header.innerText = "Replying to Thread No. " + shortURL(actorName, opid);
inReplyTo.value = opid;
- if(comment.value != "")
- comment.value += "\n>>" + id;
- else
- comment.value += ">>" + id;
+ if(id != "reply") {
+ if(comment.value != "")
+ comment.value += "\n>>" + id;
+ else
+ comment.value += ">>" + id;
+ }
dragElement(header);
diff --git a/static/npost.html b/static/npost.html
index bf07c63..dd5c898 100644
--- a/static/npost.html
+++ b/static/npost.html
@@ -24,7 +24,7 @@
<li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li>
</ul>
<div style=": inline; text-align: center;">
- <span><a href="javascript:quote('{{ $board.Actor }}', '{{ (index .Posts 0).Id }}', '{{ (index .Posts 0).Id }}')">[Post a Reply]</a></span>
+ <span><a id="reply-content" href="javascript:quote('{{ $board.Actor }}', '{{ (index .Posts 0).Id }}', 'reply')">[Post a Reply]</a></span>
{{ $replies := (index .Posts 0).Replies }}
<span style="float: right;">{{ $replies.TotalItems }} / {{ $replies.TotalImgs }}</span>
</div>