1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 21:35:56 +00:00

implement classic next/prev article movement behavior, bind to ctrl-arrows

This commit is contained in:
Andrew Dolgov
2013-02-27 22:48:43 +04:00
parent 104e5c6557
commit c22580b55f
3 changed files with 15 additions and 4 deletions

View File

@@ -514,7 +514,7 @@ function togglePub(id, client_only, no_effects, note) {
}
}
function moveToPost(mode) {
function moveToPost(mode, noscroll) {
try {
@@ -555,7 +555,7 @@ function moveToPost(mode) {
var article = $("RROW-" + active_post_id);
var ctr = $("headlines-frame");
if (article && article.offsetTop + article.offsetHeight >
if (!noscroll && article && article.offsetTop + article.offsetHeight >
ctr.scrollTop + ctr.offsetHeight) {
scrollArticle(ctr.offsetHeight/2);
@@ -580,9 +580,10 @@ function moveToPost(mode) {
var prev_article = $("RROW-" + prev_id);
var ctr = $("headlines-frame");
if (article && article.offsetTop < ctr.scrollTop) {
if (!noscroll && article && article.offsetTop < ctr.scrollTop) {
scrollArticle(-ctr.offsetHeight/2);
} else if (prev_article && prev_article.offsetTop < ctr.scrollTop) {
} else if (!noscroll && prev_article &&
prev_article.offsetTop < ctr.scrollTop) {
cdmExpandArticle(prev_id);
scrollArticle(-ctr.offsetHeight/2);
} else if (prev_id) {