add popup menu for headlines

This commit is contained in:
Andrew Dolgov 2010-11-19 19:35:35 +03:00
parent e5df6e9eb4
commit 7b5e74c75c
3 changed files with 21 additions and 3 deletions

View File

@ -5048,6 +5048,17 @@
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'>";
@ -5088,6 +5099,8 @@
print "</div>";
print "<div class=\"hlRight\">";
print "<span class=\"hlUpdated\">$updated_fmt</span>";
print $score_pic;

View File

@ -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");

View 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);