]> git.wh0rd.org Git - tt-rss.git/commitdiff
CDM highlight/display tweaks; tweaks for n/p hotkeys (refs #191)
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 15:08:57 +0000 (16:08 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 15:08:57 +0000 (16:08 +0100)
tt-rss.css
viewfeed.js

index 06db9da0cbba6c7a852ad0867e7f8da39ef42a71..60448d7dac39325d8c5e4063e62a5fa7bd51492f 100644 (file)
@@ -934,19 +934,19 @@ div.cdmFooter {
        color : black;
        padding : 5px;
        color : gray;
-       background-color : white;
+/*     background-color : white; */
        border-width : 1px 0px 0px 0px;
        border-color : #c0c0c0;
        border-style : dotted;
 }
 
-div.cdmArticleSelected div.cdmFooter {
+/*div.cdmArticleSelected div.cdmFooter {
        background-color : transparent;
 }
 
 div.cdmArticleUnreadSelected div.cdmFooter {
        background-color : transparent;
-}
+}*/
 
 div.cdmFooter span.s0 {
        border-width : 0px 1px 0px 0px;
index b4941aed4243dc39c1e91bfd12d4d50d1dd09967..2776aa52575f2c9514cbfdb8e5b2f0f8d25f1dbd 100644 (file)
@@ -720,9 +720,11 @@ function moveToPost(mode) {
                                        if (cdmArticleIsActuallyVisible(rows[i]) ||
                                                        cdmArticleIsBelowViewport(rows[i])) {
 
-                                               cdmScrollToArticleId(rows[i]);
-                                               setTimeout("toggleUnread(" + rows[i] + ", undefined, true)", 500);
-                                               //toggleUnread(rows[i], undefined, true);
+                                               if (!cdmArticleIsActuallyVisible(rows[i])) {
+                                                       cdmScrollToArticleId(rows[i]);
+                                               }
+                                               //setTimeout("toggleUnread(" + rows[i] + ", undefined, true)", 500);
+                                               toggleUnread(rows[i], undefined, true);
 
                                                return;
                                        }
@@ -734,13 +736,12 @@ function moveToPost(mode) {
 
                                for (var i = 0; i < rows.length; i++) {
 
-                                       if (cdmArticleIsActuallyVisible(rows[i]) ||
-                                                       (cdmArticleIsAboveViewport(rows[i]) &&
-                                                               !cdmArticleIsAboveViewport(rows[i+1]))) {
+                                       if (cdmArticleIsAboveViewport(rows[i]) &&
+                                                               !cdmArticleIsAboveViewport(rows[i+1])) {
 
                                                cdmScrollToArticleId(rows[i]);
-                                               setTimeout("toggleUnread(" + rows[i] + ", undefined, true)", 500);
-                                               //toggleUnread(rows[i], undefined, true);
+                                               //setTimeout("toggleUnread(" + rows[i] + ", undefined, true)", 500);
+                                               toggleUnread(rows[i], undefined, true);
 
                                                break;
                                        } 
@@ -775,17 +776,16 @@ function toggleSelected(id) {
        }
 }
 
-/*function toggleUnread_afh(effect) {
+function toggleUnread_afh(effect) {
        try {
 
                var elem = effect.element;
-               //elem.style.backgroundColor = "transparent";
+               elem.style.backgroundColor = "";
 
-               alert(elem.className);
        } catch (e) {
                exception_error(e, "toggleUnread_afh");
        }
-} */
+} 
 
 function toggleUnread(id, cmode, effect) {
        try {
@@ -810,11 +810,11 @@ function toggleUnread(id, cmode, effect) {
                                if (row.className.match("Unread")) {
                                        row.className = nc;
 
-/*                                     if (effect) {
+                                       if (effect) {
                                                new Effect.Highlight(row, {duration: 1, startcolor: "#fff7d5",
                                                        afterFinish: toggleUnread_afh,
                                                        queue: { position:'end', scope: 'TMRQ-' + id, limit: 1 } } );
-                                       } */
+                                       } 
 
                                } else {
                                        row.className = nc + "Unread";