mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
fixed tabindex in reply window, wrapping up some minor bugs in editing
posts
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<div id="post_window">
|
<div id="post_window">
|
||||||
<div class="post-title-container">
|
<div class="post-title-container">
|
||||||
<div class="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>
|
<span id="reply_title"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
<span class="btn btn-link" tabindex="-1"><i class="icon-list"></i></span>
|
<span class="btn btn-link" tabindex="-1"><i class="icon-list"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" style="float: right; margin-right: -12px">
|
<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>
|
<button id="submit_post_btn" class="btn" onclick="app.post_topic()" tabIndex="3"><i class="icon-ok"></i> Submit</button>
|
||||||
<span class="btn" id="discard-post"><i class="icon-remove"></i> Discard</span>
|
<button class="btn" id="discard-post" tabIndex="4"><i class="icon-remove"></i> Discard</button>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -214,7 +214,6 @@
|
|||||||
// Fix delete state for this thread's posts
|
// Fix delete state for this thread's posts
|
||||||
var postEls = document.querySelectorAll('#post-container li[data-deleted]');
|
var postEls = document.querySelectorAll('#post-container li[data-deleted]');
|
||||||
for(var x=0,numPosts=postEls.length;x<numPosts;x++) {
|
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'));
|
if (postEls[x].getAttribute('data-deleted') === '1') toggle_post_delete_state(postEls[x].getAttribute('data-pid'));
|
||||||
postEls[x].removeAttribute('data-deleted');
|
postEls[x].removeAttribute('data-deleted');
|
||||||
}
|
}
|
||||||
@@ -276,6 +275,7 @@
|
|||||||
socket.on('event:new_post', function(data) {
|
socket.on('event:new_post', function(data) {
|
||||||
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data),
|
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data),
|
||||||
uniqueid = new Date().getTime();
|
uniqueid = new Date().getTime();
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
jQuery('<div id="' + uniqueid + '"></div>').appendTo("#post-container").hide().append(html).fadeIn('slow');
|
jQuery('<div id="' + uniqueid + '"></div>').appendTo("#post-container").hide().append(html).fadeIn('slow');
|
||||||
set_up_posts(uniqueid);
|
set_up_posts(uniqueid);
|
||||||
|
|||||||
@@ -176,7 +176,9 @@ marked.setOptions({
|
|||||||
'gravatar' : data.picture,
|
'gravatar' : data.picture,
|
||||||
'timestamp' : timestamp,
|
'timestamp' : timestamp,
|
||||||
'relativeTime': utils.relativeTime(timestamp),
|
'relativeTime': utils.relativeTime(timestamp),
|
||||||
'fav_star_class' :'icon-star-empty'
|
'fav_star_class' :'icon-star-empty',
|
||||||
|
'edited-class': 'none',
|
||||||
|
'editor': '',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user