Node.js based forum software built for the modern web
fixed tabindex in reply window, wrapping up some minor bugs in editing posts
Julian Lam1b61511e8ab7
diff --git a/public/templates/header.tpl b/public/templates/header.tplindex 5cf86efeec..c69e2eb4c9 100644--- a/public/templates/header.tpl+++ b/public/templates/header.tpl@@ -50,7 +50,7 @@<div id="post_window"><div class="post-title-container"><div class="container">- <input id="post_title" placeholder="Enter your topic title here." />+ <input id="post_title" placeholder="Enter your topic title here." tabIndex="1" /><span id="reply_title"></span></div></div>@@ -65,12 +65,12 @@<span class="btn btn-link" tabindex="-1"><i class="icon-list"></i></span></div><div class="btn-group" style="float: right; margin-right: -12px">- <span id="submit_post_btn" class="btn" onclick="app.post_topic()"><i class="icon-ok"></i> Submit</span>- <span class="btn" id="discard-post"><i class="icon-remove"></i> Discard</span>+ <button id="submit_post_btn" class="btn" onclick="app.post_topic()" tabIndex="3"><i class="icon-ok"></i> Submit</button>+ <button class="btn" id="discard-post" tabIndex="4"><i class="icon-remove"></i> Discard</button></div></div>- <textarea id="post_content" placeholder="Type your message here."></textarea>+ <textarea id="post_content" placeholder="Type your message here." tabIndex="2"></textarea></div></div>diff --git a/public/templates/topic.tpl b/public/templates/topic.tplindex 9882cab6c7..19e445385f 100644--- a/public/templates/topic.tpl+++ b/public/templates/topic.tpl@@ -214,7 +214,6 @@// Fix delete state for this thread's postsvar postEls = document.querySelectorAll('#post-container li[data-deleted]');for(var x=0,numPosts=postEls.length;x<numPosts;x++) {- console.log(postEls[x].getAttribute('data-pid'));if (postEls[x].getAttribute('data-deleted') === '1') toggle_post_delete_state(postEls[x].getAttribute('data-pid'));postEls[x].removeAttribute('data-deleted');}@@ -276,6 +275,7 @@socket.on('event:new_post', function(data) {var html = templates.prepare(templates['topic'].blocks['posts']).parse(data),uniqueid = new Date().getTime();+ console.log(data);jQuery('<div id="' + uniqueid + '"></div>').appendTo("#post-container").hide().append(html).fadeIn('slow');set_up_posts(uniqueid);diff --git a/src/posts.js b/src/posts.jsindex 2dd84fbe85..bc5d531343 100644--- a/src/posts.js+++ b/src/posts.js@@ -176,7 +176,9 @@ marked.setOptions({'gravatar' : data.picture,'timestamp' : timestamp,'relativeTime': utils.relativeTime(timestamp),- 'fav_star_class' :'icon-star-empty'+ 'fav_star_class' :'icon-star-empty',+ 'edited-class': 'none',+ 'editor': '',}]});