]> git.wh0rd.org - tt-rss.git/commitdiff
properly handle OPEN_LINKS_IN_NEW_WINDOW in CDM
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 10 Aug 2007 03:18:32 +0000 (04:18 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 10 Aug 2007 03:18:32 +0000 (04:18 +0100)
functions.php
tt-rss.css

index 5515781a8c832c12317c36f7e4b2256c762e1f01..da48affaae96804fbbf23cc22fe65b1be0a4e7ff 100644 (file)
                
                        if ($feed_site_url) {
                                if (!$bottom) {
-                                       $target = "target=\"_blank\"";
+                                       $target = "target=\"_new\"";
                                }
                                print "<a $target href=\"$feed_site_url\">$feed_title</a>";
                        } else {
                                        
                                        print "<a class=\"title\" 
                                                onclick=\"javascript:toggleUnread($id, 0)\"
-                                               target=\"new\" href=\"".$line["link"]."\">".$line["title"]."</a>";
+                                               target=\"_new\" href=\"".$line["link"]."\">".$line["title"]."</a>";
 
                                        print $entry_author;
 
 
                                        print "</div>";
 
+                                       if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
+                                               $line["content_preview"] = preg_replace("/href=/i", 
+                                                       "target=\"_new\" href=", $line["content_preview"]);
+                                       }
+
                                        print "<div class=\"cdmContent\">" . $line["content_preview"] . "</div><br clear=\"all\">";
 
                                        print "<div class=\"cdmFooter\"><span class='s0'>";
index 2f56d8d2b7a18fa6ff0d10c0a41e5251a2822584..1a8d1654dc7f77275f3fd0487fa76b7b81e9b88d 100644 (file)
@@ -871,7 +871,7 @@ div.cdmArticle {
        border-color : #a0a0a0;
        border-width : 0px 0px 1px 0px;
        border-style : solid;
-       background-color : #fafafa;
+       /* background-color : #fafafa; */
        margin : 0px;
        color : #505050;
        /* padding : 10px; */
@@ -1638,3 +1638,9 @@ li.feedCatHolder {
 table.prefFeedCatList {
        background-color : white;
 }
+
+a[target="_new"], a[target="_blank"] {
+       border-width : 0px 0px 1px 0px;
+       border-color : #778899;
+       border-style : dotted;
+}