diff --git a/board/static/board/post.js b/board/static/board/post.js index 7ec269e..5749d2f 100644 --- a/board/static/board/post.js +++ b/board/static/board/post.js @@ -2,6 +2,7 @@ const OPEN = "open"; const CLOSED = "closed"; const replyWindowName = "reply-window"; const postWindowName = "post-window"; +const reportWindowName = "report-window" function documentClick(e) { let sender = e.target; @@ -124,6 +125,29 @@ function getPostWindow() { return window.top.jsFrame.getWindowByName(postWindowName); } +//////////////////////////////////////////////////////////////////////////////// +// Report window +//////////////////////////////////////////////////////////////////////////////// + +function getReportWindow() { + return window.top.jsFrame.getWindowByName(reportWindowName); +} + +function openReportWindow(reportUrl) { + // If there's already a report window open, close it and open this one. + if (window.top.jsFrame.containsWindowName(reportWindowName)) { + getReportWindow().closeFrame(); + } + let reportWindow = window.top.jsFrame.create({ + url: reportUrl, + name: reportWindowName, + modal: true, + width: 360, + height: 95, + }); + reportWindow.show(); +} + //////////////////////////////////////////////////////////////////////////////// // Events //////////////////////////////////////////////////////////////////////////////// diff --git a/board/static/board/report_window.js b/board/static/board/report_window.js deleted file mode 100644 index 3703246..0000000 --- a/board/static/board/report_window.js +++ /dev/null @@ -1,20 +0,0 @@ -const reportWindowName = "report-window" - -function getReportWindow() { - return window.top.jsFrame.getWindowByName(reportWindowName); -} - -function openReportWindow(reportUrl) { - // If there's already a report window open, close it and open this one. - if (window.top.jsFrame.containsWindowName(reportWindowName)) { - getReportWindow().closeFrame(); - } - let reportWindow = window.top.jsFrame.create({ - url: reportUrl, - name: reportWindowName, - modal: true, - width: 360, - height: 95, - }); - reportWindow.show(); -} \ No newline at end of file diff --git a/board/templates/board/post_detail.html b/board/templates/board/post_detail.html index 8888547..95d2d4b 100644 --- a/board/templates/board/post_detail.html +++ b/board/templates/board/post_detail.html @@ -7,10 +7,6 @@ {% endwith %} {% endblock title %} -{% block extrajs %} - -{% endblock extrajs %} - {% block content %} {# board header #}