diff --git a/public/src/app.js b/public/src/app.js index 1061b2d935..a45effa90d 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -85,12 +85,14 @@ var socket, var post_window = null, submit_post_btn = null, post_title = null, + reply_title = null, post_content = null; - app.open_post_window = function(post_mode, id) { + app.open_post_window = function(post_mode, id, title) { submit_post_btn = submit_post_btn || document.getElementById('submit_post_btn'); post_title = post_title || document.getElementById('post_title'); + reply_title = reply_title || document.getElementById('reply_title'); post_content = post_content || document.getElementById('post_content'); @@ -98,13 +100,16 @@ var socket, jQuery(post_window).slideToggle(250); if (post_mode == null || post_mode == 'topic') { - post_title.style.display = 'block'; + post_title.style.display = "block"; + reply_title.style.display = "none"; post_title.focus(); submit_post_btn.onclick = function() { app.post_topic(); } } else { - post_title.style.display = 'none'; + post_title.style.display = "none"; + reply_title.style.display = "block"; + reply_title.innerHTML = 'You are replying to "' + title + '"'; post_content.focus(); submit_post_btn.onclick = function() { app.post_reply(id) diff --git a/public/src/templates.js b/public/src/templates.js index 7605f9191a..e7ead3b743 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -119,7 +119,6 @@ function load_template(callback) { url = (url === '') ? 'home' : url; jQuery.get(API_URL + url, function(data) { - document.getElementById('content').innerHTML = templates[url.split('/')[0]].parse(JSON.parse(data)); if (callback) callback(); }); diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 3f0ac6af5a..45604a7adf 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -117,6 +117,11 @@ font-size: 12px; font-weight: bold; } + #reply_title { + font-size: 17px; + padding-top: 14px; + font-weight: 600; + } @@ -132,7 +137,7 @@
+
\ No newline at end of file diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index fa901d285c..6abc380cf8 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -1,3 +1,10 @@ +
+ +
+