mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
closes #2592
This commit is contained in:
@@ -38,11 +38,15 @@ $(document).ready(function() {
|
||||
app.previousUrl = url;
|
||||
return ajaxify.go('login');
|
||||
} else if (status === 302) {
|
||||
if (!ajaxify.go(data.responseJSON.path, callback, quiet)) {
|
||||
window.location.href = data.responseJSON.path;
|
||||
if (data.responseJSON.path) {
|
||||
if (!ajaxify.go(data.responseJSON.path, callback, quiet)) {
|
||||
window.location.href = data.responseJSON.path;
|
||||
}
|
||||
} else if (data.responseJSON) {
|
||||
ajaxify.go(data.responseJSON.slice(1), callback, quiet);
|
||||
}
|
||||
}
|
||||
} else if (textStatus !== "abort") {
|
||||
} else if (textStatus !== 'abort') {
|
||||
app.alertError(data.responseJSON.error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ define('forum/topic', [
|
||||
Topic.toBottom = function() {
|
||||
socket.emit('topics.postcount', ajaxify.variables.get('topic_id'), function(err, postCount) {
|
||||
if (config.topicPostSort !== 'oldest_to_newest') {
|
||||
postCount = 1;
|
||||
postCount = 2;
|
||||
}
|
||||
navigator.scrollBottom(postCount - 1);
|
||||
navigator.scrollBottom(postCount);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
|
||||
if ($('li[data-index="' + index + '"]').length) {
|
||||
navigator.scrollToPost(index, true);
|
||||
} else {
|
||||
index = parseInt(index, 10) + 1;
|
||||
index = parseInt(index, 10);
|
||||
ajaxify.go(generateUrl(index));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user