summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRichard Beales <[email protected]>2013-03-21 19:42:53 +0000
committerRichard Beales <[email protected]>2013-03-21 19:42:53 +0000
commit15c1a04d103ae4d36c68831932a27acfdee6eb5c (patch)
tree442eca93cbd060e0229686d3c05b592cfec336cb /js
parent96f19f11d741617b997b4533df50ff8a5b17f46b (diff)
parent8ef7b02e4d45cd8494fd769140cfa091171e96d9 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 5567c717a..35c9c12a7 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -1824,6 +1824,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 +2041,21 @@ function changeScore(id, pic) {
exception_error("changeScore", e);
}
}
+
+function displayArticleUrl(id) {
+ try {
+ var query = "op=rpc&method=getlinkbyid&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);
+ }
+}