+function selectionRemoveLabel(id) {
+ try {
+
+ var ids = getSelectedArticleIds2();
+
+ if (ids.length == 0) {
+ alert(__("No articles are selected."));
+ return;
+ }
+
+// var ok = confirm(__("Remove selected articles from label?"));
+
+// if (ok) {
+
+ var query = "backend.php?op=rpc&subop=removeFromLabel&ids=" +
+ param_escape(ids.toString()) + "&lid=" + param_escape(id);
+
+// notify_progress("Loading, please wait...");
+
+ cache_invalidate("F:" + (-11 - id));
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ show_labels_in_headlines(transport);
+ all_counters_callback2(transport);
+ } });
+
+// }
+
+ } catch (e) {
+ exception_error("selectionAssignLabel", e);
+
+ }
+}
+
+function selectionAssignLabel(id) {
+ try {
+
+ var ids = getSelectedArticleIds2();
+
+ if (ids.length == 0) {
+ alert(__("No articles are selected."));
+ return;
+ }
+
+// var ok = confirm(__("Assign selected articles to label?"));
+
+// if (ok) {
+
+ cache_invalidate("F:" + (-11 - id));
+
+ var query = "backend.php?op=rpc&subop=assignToLabel&ids=" +
+ param_escape(ids.toString()) + "&lid=" + param_escape(id);
+
+// notify_progress("Loading, please wait...");
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ show_labels_in_headlines(transport);
+ all_counters_callback2(transport);
+ } });
+
+// }
+
+ } catch (e) {
+ exception_error("selectionAssignLabel", e);
+
+ }
+}
+