]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove label: do not reload headlines
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 15:29:25 +0000 (16:29 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 15:29:25 +0000 (16:29 +0100)
modules/backend-rpc.php
viewfeed.js

index 3ec7df9e104d55b2a672bacbc56e25f52e344020..a6ab9340a2f3ee28cf4483ac06092e627cdc3995 100644 (file)
 
                        $label = label_find_caption($link, $label_id, $_SESSION["uid"]);
 
+                       print "<rpc-reply>";
+                       print "<info-for-headlines>";
+
                        if ($label) {
 
                                foreach ($ids as $id) {
                                        label_remove_article($link, $id, $label, $_SESSION["uid"]);
+
+                                       print "<entry id=\"$id\"><![CDATA[";
+
+                                       $labels = get_article_labels($link, $id, $_SESSION["uid"]);
+
+                                       foreach ($labels as $l) {
+                                               print  "<span class='hlLabelRef'>".$l[1]."</span>";
+                                       }
+
+                                       print "]]></entry>";
+
                                }
                        }
 
-                       print "<rpc-reply>OK</rpc-reply>";
+                       print "</info-for-headlines>";
+
+                       print "<counters>";
+                       getAllCounters($link, $omode);
+                       print "</counters>";
+                       print "</rpc-reply>";
 
                        return;
                }
index 09b149ae8d32290f36721d0c84135d67aedeff00..e5f1f8aeb017cc50fe2db64b964b7d568aefcefc 100644 (file)
@@ -873,7 +873,8 @@ function selectionRemoveLabel(id) {
 
                        new Ajax.Request(query, {
                                onComplete: function(transport) { 
-                                       viewCurrentFeed();
+                                       show_labels_in_headlines(transport);
+                                       all_counters_callback2(transport);
                                } });
 
                }