]> git.wh0rd.org Git - tt-rss.git/commitdiff
add popup menu for headlines
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 16:35:35 +0000 (19:35 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 16:35:35 +0000 (19:35 +0300)
functions.php
tt-rss.js
viewfeed.js

index db43487da242222a8dd5c2c3b0a35008c2cc3e69..5f4a55229a08eb22dc0e1d16c6b9edf19adbd1e4 100644 (file)
 
                                        print "<div class='$class' id='RROW-$id' $mouseover_attrs>";
 
+                                       print "<div dojoType=\"dijit.Menu\" style=\"display: none;\" 
+                                               targetNodeIds=\"RROW-$id\">";
+                                       print "<div onclick=\"view($id)\" 
+                                               dojoType=\"dijit.MenuItem\">".__('View article')."</div>";
+                                       print "<div onclick=\"hlOpenInNewTab(event, $id)\" 
+                                               dojoType=\"dijit.MenuItem\">".__('View in a new tab')."</div>";
+                                       print "<div dojoType=\"dijit.MenuSeparator\"></div>";
+                                       print "<div onclick=\"openArticleInNewWindow($id)\" 
+                                               dojoType=\"dijit.MenuItem\">".__('Open original article')."</div>";
+                                       print "</div>";
+       
                                        print "<div class='hlUpdPic'>$update_pic</div>";
 
                                        print "<div class='hlLeft'>";
 
                                        print "</div>";
 
+
+
                                        print "<div class=\"hlRight\">";                                        
                                        print "<span class=\"hlUpdated\">$updated_fmt</span>";
                                        print $score_pic;
index b9be067101d56d03f4471edb800ddfb4791fbb8b..56105167e54b0c141b0feedfb8690620b01a98ef 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -251,6 +251,7 @@ function init() {
                dojo.require("dijit.layout.ContentPane");
                dojo.require("dijit.Dialog");
                dojo.require("dijit.form.Button");
+               dojo.require("dijit.Menu");
                dojo.require("dojo.data.ItemFileWriteStore");
                dojo.require("dijit.Tree");
                dojo.require("dijit.form.Select");
index 148256ddaa984cd846bf833cd55586a9aa5d565b..3914c757d9bee13fc60fd26b57a2b5b1d1dd9e6e 100644 (file)
@@ -1714,7 +1714,7 @@ function zoomToArticle(event, id) {
                                return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id));
 
                if (cached_article) {
-                       closeArticlePanel();
+                       //closeArticlePanel();
                
                        var article_pane = new dijit.layout.ContentPane({ 
                                title: __("Loading...") , content: cached_article, 
@@ -1742,7 +1742,7 @@ function zoomToArticle(event, id) {
                                        notify('');
        
                                        if (transport.responseXML) {
-                                               closeArticlePanel();
+                                               //closeArticlePanel();
        
                                                var article = transport.responseXML.getElementsByTagName("article")[0];
                                                var content = article.firstChild.nodeValue;
@@ -2078,6 +2078,11 @@ function postClicked(event, id) {
        }
 }
 
+function hlOpenInNewTab(event, id) {
+       toggleUnread(id, 0, false);
+       zoomToArticle(event, id);
+}
+
 function hlClicked(event, id) {
        try {
 
@@ -2085,7 +2090,6 @@ function hlClicked(event, id) {
                        view(id);
                        return true;
                } else {
-                       selectArticles('none');
                        toggleSelected(id);
                        toggleUnread(id, 0, false);
                        zoomToArticle(event, id);