]> git.wh0rd.org - tt-rss.git/commitdiff
multiple issues fixed in vfeed_group_by_feed
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 27 Oct 2012 20:41:51 +0000 (00:41 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 27 Oct 2012 20:41:51 +0000 (00:41 +0400)
include/functions.php
js/viewfeed.js

index 4c88c0350bbedcdfd6010e6f19b64cd606018627..656664da2598073e14cf6c2791d3c220bc8ff663 100644 (file)
                                        $offset_query_part = "OFFSET $offset";
                                }
 
+                               // proper override_order applied above
                                if ($vfeed_query_part && get_pref($link, 'VFEED_GROUP_BY_FEED', $owner_uid)) {
                                        if (!$override_order) {
                                                $order_by = "ttrss_feeds.title, $order_by";
+                                       } else {
+                                               $order_by = "ttrss_feeds.title, $override_order";
                                        }
                                }
 
index 5f7fbee6d9606828a46f2861bf59ba16df03ca7c..ff09c0a5ac4defa2c9b606ab363ddcf7529a85b2 100644 (file)
@@ -115,10 +115,16 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
                                                c.domNode.removeChild(hsp);
 
                                        $$("#headlines-tmp > div").each(function(row) {
-                                               if ($$("#headlines-frame DIV[id="+row.id+"]").length == 0) {
+                                               if (row.className == 'cdmFeedTitle') {
+                                                       row.addClassName('new');
                                                        row.style.display = 'none';
                                                        c.domNode.appendChild(row);
                                                        ++num_added;
+                                               } else if ($$("#headlines-frame DIV[id="+row.id+"]").length == 0) {
+                                                       row.style.display = 'none';
+                                                       row.addClassName('new');
+                                                       c.domNode.appendChild(row);
+                                                       ++num_added;
                                                } else {
                                                        row.parentNode.removeChild(row);
                                                }
@@ -145,8 +151,9 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
 
                                        initHeadlinesMenu();
 
-                                       $$("#headlines-frame > div[id*=RROW]").each(
+                                       $$("#headlines-frame > div[class*=new]").each(
                                        function(child) {
+                                               child.removeClassName('new');
                                                if (!Element.visible(child))
                                                        new Effect.Appear(child, { duration : 0.5 });
                                        });