optional DB_PORT, misc js cleanups

This commit is contained in:
Andrew Dolgov 2006-03-21 11:38:41 +01:00
parent 10031c3b74
commit befc807f83
6 changed files with 19 additions and 18 deletions

View File

@ -606,11 +606,7 @@
<a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a> <a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
<a href=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\"> <a href=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\">
<span id=\"FCATCTR-$cat_id\" <span id=\"FCATCTR-$cat_id\"
class=\"$catctr_class\">($cat_unread unread)$ellipsis</span></a> class=\"$catctr_class\">($cat_unread unread)$ellipsis</span></a></li>";
<!-- <div style=\"float : right\">
<a href=\"javascript:viewCategory($cat_id)\">[view]</a>
</div> -->
</li>";
// !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function
// -> keyboard navigation, etc. // -> keyboard navigation, etc.
@ -1586,11 +1582,6 @@
} }
if ($last_error) {
print "<td align='center' class='small'>
<a class=\"warning\" href=\"javascript:alert('TT-RSS encountered an error while trying to update this feed.\\n\\n$last_error')\">Could not update this feed.</a></td>";
}
print "<td class=\"headlineTitle\">"; print "<td class=\"headlineTitle\">";
if ($feed_site_url) { if ($feed_site_url) {

View File

@ -7,6 +7,7 @@
define('DB_USER', "fox"); define('DB_USER', "fox");
define('DB_NAME', "fox"); define('DB_NAME', "fox");
define('DB_PASS', "XXXXXX"); define('DB_PASS', "XXXXXX");
//define('DB_PORT', '5432'); // when neeeded, PG-only
define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache'); define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache');
// Local cache directory for RSS feeds // Local cache directory for RSS feeds

4
db.php
View File

@ -11,6 +11,10 @@ function db_connect($host, $user, $pass, $db) {
$string .= " host=$host"; $string .= " host=$host";
} }
if (defined('DB_PORT')) {
$string = "$string port=" . DB_PORT;
}
$link = pg_connect($string); $link = pg_connect($string);
if (!$link) { if (!$link) {

View File

@ -84,6 +84,12 @@ function viewfeed(feed, skip, subop, doc, is_cat) {
cat_view_mode = is_cat; cat_view_mode = is_cat;
} }
var fe = document.getElementById("FEEDR-" + getActiveFeedId());
if (fe) {
fe.className = fe.className.replace("Selected", "");
}
setActiveFeedId(feed); setActiveFeedId(feed);
if (subop == "MarkAllRead") { if (subop == "MarkAllRead") {
@ -129,7 +135,7 @@ function viewfeed(feed, skip, subop, doc, is_cat) {
headlines_frame.location.href = query; headlines_frame.location.href = query;
cleanSelectedList("feedList"); // cleanSelectedList("feedList");
var feedr = document.getElementById("FEEDR-" + feed); var feedr = document.getElementById("FEEDR-" + feed);
if (feedr && !feedr.className.match("Selected")) { if (feedr && !feedr.className.match("Selected")) {

View File

@ -164,8 +164,8 @@ function cleanSelectedList(element) {
} else { } else {
for (i = 0; i < content.childNodes.length; i++) { for (i = 0; i < content.childNodes.length; i++) {
var child = content.childNodes[i]; var child = content.childNodes[i];
if (child.id == "feedCatHolder") { if (child.id == "feedCatHolder") {
parent.debug(child.id);
var fcat = child.lastChild; var fcat = child.lastChild;
for (j = 0; j < fcat.childNodes.length; j++) { for (j = 0; j < fcat.childNodes.length; j++) {
var feed = fcat.childNodes[j]; var feed = fcat.childNodes[j];
@ -173,7 +173,6 @@ function cleanSelectedList(element) {
} }
} }
} }
} }
} }

View File

@ -995,8 +995,8 @@ div.cdmContent a:hover {
} }
#debug_output { #debug_output {
width : 300; width : 400;
height : 80; height : 200;
right : 20; right : 20;
bottom : 20; bottom : 20;
background-color : white; background-color : white;