]> git.wh0rd.org Git - tt-rss.git/commitdiff
optional DB_PORT, misc js cleanups
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 21 Mar 2006 10:38:41 +0000 (11:38 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 21 Mar 2006 10:38:41 +0000 (11:38 +0100)
backend.php
config.php-dist
db.php
feedlist.js
functions.js
tt-rss.css

index 37f7d2601b0f864db13f570785538802da729766..4d333cbce7376f60a4ed0face24daabede501a02 100644 (file)
                                                <a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
                                                        <a href=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\">
                                                        <span id=\"FCATCTR-$cat_id\" 
-                                                       class=\"$catctr_class\">($cat_unread unread)$ellipsis</span></a>
-                                                       <!-- <div style=\"float : right\">
-                                                               <a href=\"javascript:viewCategory($cat_id)\">[view]</a>
-                                                       </div> -->
-                                               </li>";
+                                                       class=\"$catctr_class\">($cat_unread unread)$ellipsis</span></a></li>";
 
                                        // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function
                                        // -> keyboard navigation, etc.
 
                        }
 
-                       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\">";
                
                        if ($feed_site_url) {
index af04b603baffd34b9c222dd1c8b0863066e00af4..3f2f8cb00e0b913fd56b8c14d32668ad80fe9474 100644 (file)
@@ -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 16d39922086c6d2d35d9386b238af89ea94ff540..fb2b8a4b95e64be232a729752ae42887cc237371 100644 (file)
--- 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) {
index 6224e9ce0330e963c81c3db3868b7335e9324ec8..97edb4d6d2549d77cf5c3189441f6aab1366e597 100644 (file)
@@ -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")) {      
index 376490e0851ad869fdb0de7c99ee777d4077425f..4ae578edd8bee35470737875ef8bc2ce55bfead7 100644 (file)
@@ -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", "");
                                }               
                        }
-               }
-
+               } 
        }
 }
 
index aefc66be34719b4f545723564fb221e806c2ff86..2e5a2ccf5d3f2b0dabcc77c1cdbd8e23dfa6a335 100644 (file)
@@ -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;