var menu = new dijit.Menu();
menu.row_id = bare_id;
+ menu.addChild(new dijit.MenuItem({
+ label: __("Mark as read"),
+ onClick: function() {
+ catchupFeed(this.getParent().row_id);
+ }}));
+
menu.addChild(new dijit.MenuItem({
label: __("Edit feed"),
onClick: function() {
- editFeed(this.getParent().row_id);
+ editFeed(this.getParent().row_id, false);
}}));
menu.addChild(new dijit.MenuItem({
tnode._menu = menu;
}
+ if (id.match("CAT:") && bare_id > 0) {
+ var menu = new dijit.Menu();
+ menu.row_id = bare_id;
+
+ menu.addChild(new dijit.MenuItem({
+ label: __("Mark as read"),
+ onClick: function() {
+ catchupFeed(this.getParent().row_id, true);
+ }}));
+
+ menu.bindDomNode(tnode.domNode);
+ tnode._menu = menu;
+ }
+
//tnode.labelNode.innerHTML = args.label;
return tnode;
},
}
}
+function catchupFeed(feed, is_cat) {
+ try {
+
+ var catchup_query = "?op=rpc&subop=catchupFeed&feed_id=" +
+ feed + "&is_cat=" + is_cat;
+
+ notify_progress("Loading, please wait...", true);
+
+ new Ajax.Request("backend.php", {
+ parameters: catchup_query,
+ onComplete: function(transport) {
+ handle_rpc_json(transport);
+ notify("");
+ } });
+
+ } catch (e) {
+ exception_error("catchupFeed", e);
+ }
+}