diff options
Diffstat (limited to 'js/viewfeed.js')
-rw-r--r-- | js/viewfeed.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js index 5567c717a..e32d3a990 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1392,6 +1392,7 @@ function cdmExpandArticle(id) { Element.hide(elem); Element.show("CEXC-" + getActiveArticleId()); Element.hide(collapse); + $("RROW-" + getActiveArticleId()).removeClassName("active"); } setActiveArticleId(id); @@ -1413,6 +1414,7 @@ function cdmExpandArticle(id) { Element.show(elem); Element.hide("CEXC-" + id); Element.show(collapse); + $("RROW-" + id).addClassName("active"); } var new_offset = $("RROW-" + id).offsetTop; @@ -1824,6 +1826,12 @@ function initHeadlinesMenu() { openArticleInNewWindow(this.getParent().callerRowId); }})); + menu.addChild(new dijit.MenuItem({ + label: __("Display article URL"), + onClick: function(event) { + displayArticleUrl(this.getParent().callerRowId); + }})); + menu.addChild(new dijit.MenuSeparator()); menu.addChild(new dijit.MenuItem({ @@ -2035,3 +2043,21 @@ function changeScore(id, pic) { exception_error("changeScore", e); } } + +function displayArticleUrl(id) { + try { + var query = "op=rpc&method=getlinktitlebyid&id=" + param_escape(id); + + new Ajax.Request("backend.php", { + parameters: query, + onComplete: function(transport) { + var reply = JSON.parse(transport.responseText); + + if (reply && reply.link) { + prompt(__("Article URL:"), reply.link); + } + } }); + } catch (e) { + exception_error("changeScore", e); + } +} |