diff options
Diffstat (limited to 'static/js/posts.js')
-rw-r--r-- | static/js/posts.js | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/static/js/posts.js b/static/js/posts.js index 455e7ea..29541c0 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -2,29 +2,17 @@ function startNewPost(){ var el = document.getElementById("newpostbtn"); el.style="display:none;"; el.setAttribute("state", "1"); - document.getElementById("newpost").style = "display: block;"; + document.getElementById("newpost").style = ""; + document.getElementById("stopTablePost").style = "display:unset;"; + sessionStorage.setItem("newpostState", true); } function stopNewPost(){ var el = document.getElementById("newpostbtn"); - el.style="display:block;"; + el.style="display:block;margin-bottom:100px;"; el.setAttribute("state", "0"); - document.getElementById("newpost").style = "display: hidden;"; -} - -function newpost() -{ - var state = document.getElementById("newpostbtn").getAttribute("state"); - if(state === "0") - { - startNewPost(); - sessionStorage.setItem("newpostState", true); - } - else - { - stopNewPost(); - sessionStorage.setItem("newpostState", false); - } + document.getElementById("newpost").style = "display: none;"; + sessionStorage.setItem("newpostState", false); } function shortURL(actorName, url) @@ -182,7 +170,7 @@ function quote(actorName, opid, id) var h = document.getElementById(id + "-content").offsetTop - 348; } - const boxStyle = "display: block; position: absolute; width: 400px; height: 600px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"; + const boxStyle = "top: " + h + "px; left: " + w + "px;"; box.setAttribute("style", boxStyle); sessionStorage.setItem("element-reply-style", boxStyle); sessionStorage.setItem("reply-top", h); @@ -202,7 +190,6 @@ function quote(actorName, opid, id) sessionStorage.setItem("element-reply-comment", comment.value); dragElement(header); - } function report(actorName, id) @@ -216,7 +203,7 @@ function report(actorName, id) var w = window.innerWidth / 2 - 200; var h = document.getElementById(id + "-content").offsetTop - 348; - const boxStyle = "display: block; position: absolute; width: 400px; height: 480px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"; + const boxStyle = "top: " + h + "px; left: " + w + "px;"; box.setAttribute("style", boxStyle); sessionStorage.setItem("element-report-style", boxStyle); sessionStorage.setItem("report-top", h); |