feedlist display fixes for RTL
This commit is contained in:
parent
befc807f83
commit
9323147e6e
2 changed files with 23 additions and 4 deletions
14
backend.php
14
backend.php
|
@ -524,6 +524,14 @@
|
||||||
$total = $line["total"];
|
$total = $line["total"];
|
||||||
$unread = $line["unread"];
|
$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,
|
$tmp_result = db_query($link,
|
||||||
"SELECT id,COUNT(unread) AS unread
|
"SELECT id,COUNT(unread) AS unread
|
||||||
FROM ttrss_feeds LEFT JOIN ttrss_user_entries
|
FROM ttrss_feeds LEFT JOIN ttrss_user_entries
|
||||||
|
@ -614,7 +622,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
printFeedEntry($feed_id, $class, $feed, $unread,
|
printFeedEntry($feed_id, $class, $feed, $unread,
|
||||||
"icons/$feed_id.ico", $link);
|
"icons/$feed_id.ico", $link, $rtl_content);
|
||||||
|
|
||||||
++$lnum;
|
++$lnum;
|
||||||
}
|
}
|
||||||
|
@ -2849,6 +2857,10 @@
|
||||||
|
|
||||||
print "</select> ";
|
print "</select> ";
|
||||||
|
|
||||||
|
/* print "<input type=\"submit\"
|
||||||
|
class=\"button\" onclick=\"javascript:testFilter()\"
|
||||||
|
value=\"Test filter\"> "; */
|
||||||
|
|
||||||
print "<input type=\"submit\"
|
print "<input type=\"submit\"
|
||||||
class=\"button\" onclick=\"javascript:addFilter()\"
|
class=\"button\" onclick=\"javascript:addFilter()\"
|
||||||
value=\"Add filter\">";
|
value=\"Add filter\">";
|
||||||
|
|
|
@ -685,7 +685,8 @@
|
||||||
return false;
|
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) {
|
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=\"$icon_file\">";
|
||||||
|
@ -693,6 +694,12 @@
|
||||||
$feed_icon = "<img id=\"FIMG-$feed_id\" src=\"images/blank_icon.gif\">";
|
$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>";
|
$feed = "<a href=\"javascript:viewfeed('$feed_id', 0);\">$feed_title</a>";
|
||||||
|
|
||||||
print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
|
print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
|
||||||
|
@ -700,7 +707,7 @@
|
||||||
print "$feed_icon";
|
print "$feed_icon";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<span id=\"FEEDN-$feed_id\">$feed</span>";
|
print "<span $rtl_tag id=\"FEEDN-$feed_id\">$feed</span>";
|
||||||
|
|
||||||
if ($unread != 0) {
|
if ($unread != 0) {
|
||||||
$fctr_class = "";
|
$fctr_class = "";
|
||||||
|
@ -708,7 +715,7 @@
|
||||||
$fctr_class = "class=\"invisible\"";
|
$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>";
|
(<span id=\"FEEDU-$feed_id\">$unread</span>)</span>";
|
||||||
|
|
||||||
print "</li>";
|
print "</li>";
|
||||||
|
|
Loading…
Reference in a new issue