]> git.wh0rd.org - tt-rss.git/commitdiff
feedlist display fixes for RTL
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 22 Mar 2006 07:41:20 +0000 (08:41 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 22 Mar 2006 07:41:20 +0000 (08:41 +0100)
backend.php
functions.php

index 4d333cbce7376f60a4ed0face24daabede501a02..88de4e3c0ced0bd57a2565a4b9230ea6daa7be84 100644 (file)
                                $total = $line["total"];
                                $unread = $line["unread"];
 
+                               $rtl_content = sql_bool_to_bool($line["rtl_content"]);
+
+                               if ($rtl_content) {
+                                       $rtl_tag = "dir=\"RTL\"";
+                               } else {
+                                       $rtl_tag = "";
+                               }
+
                                $tmp_result = db_query($link,
                                        "SELECT id,COUNT(unread) AS unread
                                        FROM ttrss_feeds LEFT JOIN ttrss_user_entries 
                                }
        
                                printFeedEntry($feed_id, $class, $feed, $unread, 
-                                       "icons/$feed_id.ico", $link);
+                                       "icons/$feed_id.ico", $link, $rtl_content);
        
                                ++$lnum;
                        }
 
                print "</select>&nbsp;";
 
+/*             print "<input type=\"submit\" 
+                       class=\"button\" onclick=\"javascript:testFilter()\" 
+                       value=\"Test filter\"> "; */
+
                print "<input type=\"submit\" 
                        class=\"button\" onclick=\"javascript:addFilter()\" 
                        value=\"Add filter\">";
index 988369c32bc0dc61b175cfcf6ec48c670c8b7f95..68c8eac76e353eb8d62e32cbb5d9e1496a478fc3 100644 (file)
                return false;
        }
 
-       function printFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link) {
+       function printFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link,
+               $rtl_content = false) {
 
                if (file_exists($icon_file) && filesize($icon_file) > 0) {
                                $feed_icon = "<img id=\"FIMG-$feed_id\" src=\"$icon_file\">";
                        $feed_icon = "<img id=\"FIMG-$feed_id\" src=\"images/blank_icon.gif\">";
                }
 
+               if ($rtl_content) {
+                       $rtl_tag = "dir=\"rtl\"";
+               } else {
+                       $rtl_tag = "dir=\"ltr\"";
+               }
+
                $feed = "<a href=\"javascript:viewfeed('$feed_id', 0);\">$feed_title</a>";
 
                print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
                        print "$feed_icon";
                }
 
-               print "<span id=\"FEEDN-$feed_id\">$feed</span>";
+               print "<span $rtl_tag id=\"FEEDN-$feed_id\">$feed</span>";
 
                if ($unread != 0) {
                        $fctr_class = "";
                        $fctr_class = "class=\"invisible\"";
                }
 
-               print "<span $fctr_class id=\"FEEDCTR-$feed_id\">
+               print " <span $rtl_tag $fctr_class id=\"FEEDCTR-$feed_id\">
                         (<span id=\"FEEDU-$feed_id\">$unread</span>)</span>";
                
                print "</li>";