diff --git a/backend.php b/backend.php index 74a22e23c..49ca35c32 100644 --- a/backend.php +++ b/backend.php @@ -122,293 +122,6 @@ if (!sanity_check($link)) { return; } - function outputFeedList($link, $tags = false) { - - print ""; - } - - $category = $tmp_category; - - $collapsed = $line["collapsed"]; - - // workaround for NULL category - if ($category == "Uncategorized") { - if ($_COOKIE["ttrss_vf_uclps"] == 1) { - $collapsed = "t"; - } - } - - if ($collapsed == "t" || $collapsed == "1") { - $holder_class = "invisible"; - $ellipsis = "..."; - } else { - $holder_class = ""; - $ellipsis = ""; - } - - $cat_id = sprintf("%d", $cat_id); - - $cat_unread = getCategoryUnread($link, $cat_id); - - print "
  • - $tmp_category - - ($cat_unread unread)$ellipsis -
  • "; - - // !!! NO SPACE before keyboard navigation, etc. - print "
  • "; - - } - - if ($op == "rpc") { handle_rpc_request($link); } diff --git a/functions.js b/functions.js index 6d108c683..652e2316f 100644 --- a/functions.js +++ b/functions.js @@ -130,13 +130,15 @@ function notify_real(msg, doc, no_hide, is_err) { } if (is_err) { - n.style.backgroundColor = "#ffcccc"; - n.style.color = "black"; - n.style.borderColor = "#ff0000"; + n.className = "notifyError"; +// n.style.backgroundColor = "#ffcccc"; +// n.style.color = "black"; +// n.style.borderColor = "#ff0000"; } else { - n.style.backgroundColor = "#fff7d5"; - n.style.borderColor = "#d7c47a"; - n.style.color = "black"; + n.className = "notify"; +// n.style.backgroundColor = "#fff7d5"; +// n.style.borderColor = "#d7c47a"; +// n.style.color = "black"; } // msg = " " + msg; diff --git a/functions.php b/functions.php index 1556afc68..f6a516423 100644 --- a/functions.php +++ b/functions.php @@ -2705,4 +2705,290 @@ } + function outputFeedList($link, $tags = false) { + + print "
  • "; + } + + $category = $tmp_category; + + $collapsed = $line["collapsed"]; + + // workaround for NULL category + if ($category == "Uncategorized") { + if ($_COOKIE["ttrss_vf_uclps"] == 1) { + $collapsed = "t"; + } + } + + if ($collapsed == "t" || $collapsed == "1") { + $holder_class = "invisible"; + $ellipsis = "..."; + } else { + $holder_class = ""; + $ellipsis = ""; + } + + $cat_id = sprintf("%d", $cat_id); + + $cat_unread = getCategoryUnread($link, $cat_id); + + print "
  • + $tmp_category + + ($cat_unread unread)$ellipsis +
  • "; + + // !!! NO SPACE before keyboard navigation, etc. + print "
    • "; + } + + printFeedEntry($feed_id, $class, $feed, $unread, + "icons/$feed_id.ico", $link, $rtl_content, + $last_updated, $line["last_error"]); + + ++$lnum; + } + + if (db_num_rows($result) == 0) { + print "
    • No feeds to display.
    • "; + } + + } else { + + // tags + +/* $result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count + FROM ttrss_tags,ttrss_entries,ttrss_user_entries WHERE + post_int_id = ttrss_user_entries.int_id AND + unread = true AND ref_id = ttrss_entries.id + AND ttrss_tags.owner_uid = '$owner_uid' GROUP BY tag_name + UNION + select tag_name,0 as count FROM ttrss_tags WHERE owner_uid = '$owner_uid' + ORDER BY tag_name"); */ + + if (get_pref($link, 'ENABLE_FEED_CATS')) { + print "
    • Tags
    • "; + print "
      • "; + } + + $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) + FROM ttrss_user_entries WHERE int_id = post_int_id + AND unread = true)) AS count FROM ttrss_tags + WHERE owner_uid = 2 GROUP BY tag_name ORDER BY tag_name"); + + $tags = array(); + + while ($line = db_fetch_assoc($result)) { + $tags[$line["tag_name"]] += $line["count"]; + } + + foreach (array_keys($tags) as $tag) { + + $unread = $tags[$tag]; + + $class = "tag"; + + if ($unread > 0) { + $class .= "Unread"; + } + + printFeedEntry($tag, $class, $tag, $unread, "images/tag.png", $link); + + } + + if (db_num_rows($result) == 0) { + print "
      • No tags to display.
      • "; + } + + if (get_pref($link, 'ENABLE_FEED_CATS')) { + print "
      \n"; + } + + } + + print "
    "; + + } + ?> diff --git a/themes/graycube/theme.css b/themes/graycube/theme.css index 29ac8bb9f..bcad4ecc2 100644 --- a/themes/graycube/theme.css +++ b/themes/graycube/theme.css @@ -6,6 +6,13 @@ a:hover { color : gray; } +.notify { + border-color : #999; + background-color : #f9f9f9; + color : black; + -moz-border-radius : 0px; +} + div.notice { background : #f9f9f9; border : 1px solid #999999; @@ -49,7 +56,7 @@ div.postReply > div.postHeader { .evenUnreadSelected, .evenSelectedUnread, .evenUnreadSelected td, .evenSelectedUnread td { - background-color : #fff7d5; + background-color : #ffcccc; font-weight : bold; border-width : 1px 0px 1px 0px; border-style : solid; @@ -58,19 +65,19 @@ div.postReply > div.postHeader { .oddUnreadSelected, .oddSelectedUnread, .oddUnreadSelected td, .oddSelectedUnread td { - background-color : #fff7d5; + background-color : #ffcccc; font-weight : bold; } .evenSelected, .evenSelected td { - background-color : #fff7d5; + background-color : #ffcccc; border-width : 1px 0px 1px 0px; border-style : solid; border-color : #ebebeb; } .oddSelected, .evenSelected td { - background-color : #fff7d5; + background-color : #ffcccc; } .evenGrayed, .evenGrayed td { @@ -189,7 +196,7 @@ tr.title td a:hover { } span.contentPreview:hover { - color : black; + color : gray; } #dispSwitch a:hover { @@ -320,7 +327,7 @@ div.headlines_cdm { } #headlinesContainer { - margin-left : 1px; + margin-left : 0px; background-color : white; } @@ -390,3 +397,4 @@ div.return a:hover { border-style : solid; } + diff --git a/tt-rss.css b/tt-rss.css index 86047b182..910b9e77a 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -214,9 +214,9 @@ input.editbox { padding-left : 2px; } -.notify { - background : #fff7d5; - border : 1px solid #d7c47a; +#notify { + border-width : 1px; + border-style : solid; top : 10px; right : 35%; min-width : 30%; @@ -230,6 +230,18 @@ input.editbox { padding : 5px 5px 5px 5px; } +.notify { + border-color : #d7c47a; + background-color : #fff7d5; + color : black; +} + +.notifyError { + background-color : #ffcccc; + border-color : #ff0000; + color : black; +} + #dispSwitch { font-size : x-small; text-align : right;