From befc807f838f69f73fd07282ba389784fac499ab Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 21 Mar 2006 11:38:41 +0100 Subject: [PATCH] optional DB_PORT, misc js cleanups --- backend.php | 11 +---------- config.php-dist | 1 + db.php | 6 +++++- feedlist.js | 8 +++++++- functions.js | 7 +++---- tt-rss.css | 4 ++-- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/backend.php b/backend.php index 37f7d2601..4d333cbce 100644 --- a/backend.php +++ b/backend.php @@ -606,11 +606,7 @@ $tmp_category ($cat_unread unread)$ellipsis - - "; + class=\"$catctr_class\">($cat_unread unread)$ellipsis"; // !!! NO SPACE before keyboard navigation, etc. @@ -1586,11 +1582,6 @@ } - if ($last_error) { - print " - Could not update this feed."; - } - print ""; if ($feed_site_url) { diff --git a/config.php-dist b/config.php-dist index af04b603b..3f2f8cb00 100644 --- a/config.php-dist +++ b/config.php-dist @@ -7,6 +7,7 @@ define('DB_USER', "fox"); define('DB_NAME', "fox"); define('DB_PASS', "XXXXXX"); + //define('DB_PORT', '5432'); // when neeeded, PG-only define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache'); // Local cache directory for RSS feeds diff --git a/db.php b/db.php index 16d399220..fb2b8a4b9 100644 --- a/db.php +++ b/db.php @@ -5,12 +5,16 @@ require_once "config.php"; function db_connect($host, $user, $pass, $db) { if (DB_TYPE == "pgsql") { - $string = "dbname=$db user=$user password=$pass"; + $string = "dbname=$db user=$user password=$pass"; if ($host) { $string .= " host=$host"; } + if (defined('DB_PORT')) { + $string = "$string port=" . DB_PORT; + } + $link = pg_connect($string); if (!$link) { diff --git a/feedlist.js b/feedlist.js index 6224e9ce0..97edb4d6d 100644 --- a/feedlist.js +++ b/feedlist.js @@ -84,6 +84,12 @@ function viewfeed(feed, skip, subop, doc, is_cat) { cat_view_mode = is_cat; } + var fe = document.getElementById("FEEDR-" + getActiveFeedId()); + + if (fe) { + fe.className = fe.className.replace("Selected", ""); + } + setActiveFeedId(feed); if (subop == "MarkAllRead") { @@ -129,7 +135,7 @@ function viewfeed(feed, skip, subop, doc, is_cat) { headlines_frame.location.href = query; - cleanSelectedList("feedList"); +// cleanSelectedList("feedList"); var feedr = document.getElementById("FEEDR-" + feed); if (feedr && !feedr.className.match("Selected")) { diff --git a/functions.js b/functions.js index 376490e08..4ae578edd 100644 --- a/functions.js +++ b/functions.js @@ -164,16 +164,15 @@ function cleanSelectedList(element) { } else { for (i = 0; i < content.childNodes.length; i++) { var child = content.childNodes[i]; - if (child.id == "feedCatHolder") { + parent.debug(child.id); var fcat = child.lastChild; for (j = 0; j < fcat.childNodes.length; j++) { - var feed = fcat.childNodes[j]; + var feed = fcat.childNodes[j]; feed.className = feed.className.replace("Selected", ""); } } - } - + } } } diff --git a/tt-rss.css b/tt-rss.css index aefc66be3..2e5a2ccf5 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -995,8 +995,8 @@ div.cdmContent a:hover { } #debug_output { - width : 300; - height : 80; + width : 400; + height : 200; right : 20; bottom : 20; background-color : white;