more work on the reply box
authorArt Cancro <ajc@citadel.org>
Thu, 18 Nov 2021 01:25:23 +0000 (20:25 -0500)
committerArt Cancro <ajc@citadel.org>
Thu, 18 Nov 2021 01:25:23 +0000 (20:25 -0500)
webcit-ng/static/js/view_forum.js

index 2a6e622ff2ed7fccfb144bfbfa68ab9ad88a56c7..ab09f68d8f817802238db309fccc399eaae5cf92 100644 (file)
@@ -185,10 +185,17 @@ function forum_render_one(prefix, msgnum, scroll_to) {
 
 // Open a reply box directly below a specific message
 function open_reply_box(prefix, msgnum, is_quoted) {
+       target_div_name = prefix+msgnum;
+       new_div_name = prefix + "_reply_to_" + msgnum;
+       document.getElementById(target_div_name).outerHTML += "<div id=\"" + new_div_name + "\">reply box put here</div>";
+
+       replybox =      "<div class=\"ctdl-msg-wrapper\">"                              // begin message wrapper
+               +       "This is going to be the reply box.  We will put ... things here.<br>"
+               +       "We are replying to message number " + msgnum + "<br>";
+       if (is_quoted) {
+               replybox += "and it is a quoted reply.<br>";
+       }
+       replybox +=     "</div>";                                                       // end wrapper
 
-       target_div = prefix+msgnum;
-       new_div = prefix + "_reply_to_" + msgnum;
-       existing = document.getElementById(target_div).outerHTML;
-       new_text = existing + "<div id=\"" + new_div + "\">This is some more schtuff!</div>";
-       document.getElementById(target_div).outerHTML = new_text;
+       document.getElementById(new_div_name).innerHTML = replybox;
 }