summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 4bb56ddfa..05b36f2bc 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -1930,16 +1930,26 @@ function initHeadlinesMenu() {
label: name,
labelId: bare_id,
onClick: function(event) {
- selectionAssignLabel(this.labelId,
- [this.getParent().ownerMenu.callerRowId]);
+ var ids = getSelectedArticleIds2();
+ // cast to string
+ var id = this.getParent().ownerMenu.callerRowId + "";
+
+ ids = ids.size() != 0 && ids.indexOf(id) != -1 ? ids : [id];
+
+ selectionAssignLabel(this.labelId, ids);
}}));
labelDelMenu.addChild(new dijit.MenuItem({
label: name,
labelId: bare_id,
onClick: function(event) {
- selectionRemoveLabel(this.labelId,
- [this.getParent().ownerMenu.callerRowId]);
+ var ids = getSelectedArticleIds2();
+ // cast to string
+ var id = this.getParent().ownerMenu.callerRowId + "";
+
+ ids = ids.size() != 0 && ids.indexOf(id) != -1 ? ids : [id];
+
+ selectionRemoveLabel(this.labelId, ids);
}}));
});