mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 16:07:55 +02:00
fixed index of newly created posts, matched vanilla search form to lavender
This commit is contained in:
@@ -754,7 +754,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
}
|
||||
|
||||
socket.emit('topics.markAsRead', {tid: tid, uid: app.uid});
|
||||
|
||||
createNewPosts(data);
|
||||
});
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="imagedrop"><div>Drag and Drop Images Here</div></div>
|
||||
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
||||
|
||||
<div class="text-center">
|
||||
<span>
|
||||
<small>Content is parsed with <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>. </small>
|
||||
<span class="upload-instructions hide"><small>Upload images by dragging & dropping them.</small></span>
|
||||
<small>[[topic:composer.content_is_parsed_with]] <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>. </small>
|
||||
<span class="upload-instructions hide"><small>[[topic:composer.upload_instructions]]</small></span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<!-- ENDIF isAdmin -->
|
||||
|
||||
<li class="visible-xs">
|
||||
<a id="mobile-search-button" href="{relative_path}/search"><i class="fa fa-search" title="[[global:header.search]]"></i> [[global:header.search]]</a>
|
||||
<a id="mobile-search-button" href="{relative_path}/search"><i class="fa fa-search fa-fw" title="[[global:header.search]]"></i> [[global:header.search]]</a>
|
||||
</li>
|
||||
|
||||
<!-- BEGIN navigation -->
|
||||
@@ -111,7 +111,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="visible-xs">
|
||||
<a href="{relative_path}/notifications"><i class="fa fa-exclamation-triangle" title="[[notifications:title]]"></i> [[notifications:title]]</a>
|
||||
<a href="{relative_path}/notifications"><i class="fa fa-exclamation-triangle fa-fw" title="[[notifications:title]]"></i> [[notifications:title]]</a>
|
||||
</li>
|
||||
|
||||
<li class="chats dropdown text-center hidden-xs">
|
||||
@@ -170,20 +170,17 @@
|
||||
</ul>
|
||||
|
||||
<ul id="logged-conditional-menu" class="nav navbar-nav navbar-right">
|
||||
<li class="hidden-xs">
|
||||
<form id="search-form" class="navbar-form navbar-right" role="search" method="GET" action="">
|
||||
<li>
|
||||
<form id="search-form" class="navbar-form navbar-right hidden-xs" role="search" method="GET" action="">
|
||||
<div class="hide" id="search-fields">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="[[global:search]]" name="query" value="">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default hide">[[global:search]]</button>
|
||||
</div>
|
||||
<button id="search-button" type="button" class="btn btn-link hide"><i class="fa fa-search fa-fw" title="[[global:header.search]]"></i></button>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<li class="hidden-xs">
|
||||
<a href="#" id="search-button" class="hide"><i class="fa fa-search" title="[[global:header.search]]"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right pagination-block hide">
|
||||
|
||||
@@ -214,7 +214,11 @@ var db = require('./database'),
|
||||
};
|
||||
|
||||
Categories.markAsUnreadForAll = function(cid, callback) {
|
||||
db.delete('cid:' + cid + ':read_by_uid', callback);
|
||||
db.delete('cid:' + cid + ':read_by_uid', function(err) {
|
||||
if(typeof callback === 'function') {
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Categories.hasReadCategories = function(cids, uid, callback) {
|
||||
|
||||
@@ -125,6 +125,7 @@ var async = require('async'),
|
||||
|
||||
Topics.reply = function(tid, uid, content, callback) {
|
||||
var privileges;
|
||||
var postData;
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
@@ -151,30 +152,29 @@ var async = require('async'),
|
||||
|
||||
posts.create(uid, tid, content, next);
|
||||
},
|
||||
function(postData, next) {
|
||||
|
||||
function(data, next) {
|
||||
postData = data;
|
||||
threadTools.notifyFollowers(tid, postData.pid, uid);
|
||||
|
||||
user.sendPostNotificationToFollowers(uid, tid, postData.pid);
|
||||
|
||||
next(null, postData);
|
||||
next();
|
||||
},
|
||||
function(postData, next) {
|
||||
Topics.markAsUnreadForAll(tid, function(err) {
|
||||
if(err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
Topics.markAsRead(tid, uid, function(err) {
|
||||
Topics.pushUnreadCount(null);
|
||||
next(err, postData);
|
||||
});
|
||||
});
|
||||
function(next) {
|
||||
Topics.markAsUnreadForAll(tid, next);
|
||||
},
|
||||
function(postData, next) {
|
||||
function(next) {
|
||||
Topics.markAsRead(tid, uid, next);
|
||||
},
|
||||
function(next) {
|
||||
Topics.pushUnreadCount();
|
||||
posts.addUserInfoToPost(postData, next);
|
||||
},
|
||||
function(postData, next) {
|
||||
function(postData,next) {
|
||||
posts.getPidIndex(postData.pid, next);
|
||||
},
|
||||
function(index, next) {
|
||||
postData.index = index;
|
||||
postData.favourited = false;
|
||||
postData.votes = 0;
|
||||
postData.display_moderator_tools = true;
|
||||
|
||||
Reference in New Issue
Block a user