mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 21:01:33 +00:00
browser interface tweaks
This commit is contained in:
35
backend.php
35
backend.php
@@ -3949,7 +3949,38 @@
|
|||||||
|
|
||||||
if ($subop == "details") {
|
if ($subop == "details") {
|
||||||
$id = db_escape_string($_GET["id"]);
|
$id = db_escape_string($_GET["id"]);
|
||||||
print "-- nasty details about feed $id --";
|
|
||||||
|
$result = db_query($link, "SELECT title,content,
|
||||||
|
substring(date_entered,1,19) as date_entered,
|
||||||
|
substring(updated,1,19) as updated
|
||||||
|
FROM ttrss_entries,ttrss_user_entries
|
||||||
|
WHERE id = ref_id AND feed_id = '$id'
|
||||||
|
ORDER BY updated DESC LIMIT 5");
|
||||||
|
|
||||||
|
if (db_num_rows($result) > 0) {
|
||||||
|
|
||||||
|
print "<b>Feed information:</b>";
|
||||||
|
print "<div class=\"detailsPart\">FIXME</div>";
|
||||||
|
|
||||||
|
print "<b>Last headlines:</b><br>";
|
||||||
|
|
||||||
|
print "<div class=\"detailsPart\">";
|
||||||
|
print "<ul class=\"compact\">";
|
||||||
|
while ($line = db_fetch_assoc($result)) {
|
||||||
|
|
||||||
|
if (get_pref($link, 'HEADLINES_SMART_DATE')) {
|
||||||
|
$entry_dt = smart_date_time(strtotime($line["updated"]));
|
||||||
|
} else {
|
||||||
|
$short_date = get_pref($link, 'SHORT_DATE_FORMAT');
|
||||||
|
$entry_dt = date($short_date, strtotime($line["updated"]));
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<li>" . $line["title"] .
|
||||||
|
" <span class=\"insensitive\">($entry_dt)</span></li>";
|
||||||
|
}
|
||||||
|
print "</ul></div>";
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3998,7 +4029,7 @@
|
|||||||
print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
|
print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
|
||||||
"$feed_icon ";
|
"$feed_icon ";
|
||||||
|
|
||||||
print "<a href=\"javascript:browserExpand('".$details["id"]."')\">" .
|
print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" .
|
||||||
$details["title"] ."</a> " .
|
$details["title"] ."</a> " .
|
||||||
"<span class='subscribers'>($subscribers)</span>";
|
"<span class='subscribers'>($subscribers)</span>";
|
||||||
|
|
||||||
|
|||||||
20
prefs.js
20
prefs.js
@@ -1380,19 +1380,27 @@ function updateBigFeedBrowser() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function browserExpand(id) {
|
function browserToggleExpand(id) {
|
||||||
try {
|
try {
|
||||||
/* if (feed_to_expand && feed_to_expand != id) {
|
/* if (feed_to_expand && feed_to_expand != id) {
|
||||||
var d = document.getElementById("BRDET-" + feed_to_expand);
|
var d = document.getElementById("BRDET-" + feed_to_expand);
|
||||||
d.style.display = "none";
|
d.style.display = "none";
|
||||||
} */
|
} */
|
||||||
|
|
||||||
feed_to_expand = id;
|
var d = document.getElementById("BRDET-" + id);
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-feed-browser&subop=details&id="
|
if (d.style.display == "block") {
|
||||||
+ param_escape(id), true);
|
d.style.display = "none";
|
||||||
xmlhttp.onreadystatechange=expand_feed_callback;
|
|
||||||
xmlhttp.send(null);
|
} else {
|
||||||
|
|
||||||
|
feed_to_expand = id;
|
||||||
|
|
||||||
|
xmlhttp.open("GET", "backend.php?op=pref-feed-browser&subop=details&id="
|
||||||
|
+ param_escape(id), true);
|
||||||
|
xmlhttp.onreadystatechange=expand_feed_callback;
|
||||||
|
xmlhttp.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("browserExpand", e);
|
exception_error("browserExpand", e);
|
||||||
|
|||||||
15
tt-rss.css
15
tt-rss.css
@@ -955,3 +955,18 @@ div.browserDetails {
|
|||||||
display : none;
|
display : none;
|
||||||
padding : 5px;
|
padding : 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.compact {
|
||||||
|
list-style-type : none;
|
||||||
|
margin : 0px;
|
||||||
|
padding : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact li {
|
||||||
|
margin : 0px;
|
||||||
|
padding : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.detailsPart {
|
||||||
|
margin : 5px 0px 5px 5px;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user