]> git.wh0rd.org - tt-rss.git/blobdiff - js/functions.js
unsubscribeFeed: call updateFeedList() when unsubscribing from labels
[tt-rss.git] / js / functions.js
index e80c860e0e85b7173d9e3e696c77d1ba56c69a28..72f72ddaa405dab23439e223cf8c433349cc9fd8 100644 (file)
@@ -292,6 +292,10 @@ function gotoPreferences() {
        document.location.href = "prefs.php";
 }
 
+function gotoLogout() {
+       document.location.href = "backend.php?op=logout";
+}
+
 function gotoMain() {
        document.location.href = "index.php";
 }
@@ -346,14 +350,14 @@ function toggleSelectListRow2(sender) {
        return toggleSelectRow(sender, row);
 }
 
-function tSR(sender, row) {
-       return toggleSelectRow(sender, row);
-}
-
 /* this is for dijit Checkbox */
-function toggleSelectRow2(sender, row) {
+function toggleSelectRow2(sender, row, is_cdm) {
 
-       if (!row) row = sender.domNode.parentNode.parentNode;
+       if (!row)
+               if (!is_cdm)
+                       row = sender.domNode.parentNode.parentNode;
+               else
+                       row = sender.domNode.parentNode.parentNode.parentNode; // oh ffs
 
        if (sender.checked && !row.hasClassName('Selected'))
                row.addClassName('Selected');
@@ -1205,7 +1209,7 @@ function quickAddFilter() {
                        var lh = dojo.connect(dialog, "onLoad", function(){
                                dojo.disconnect(lh);
 
-                               var title = $("PTITLE-FULL-" + active_post_id);
+                               var title = $("PTITLE-FULL-" + getActiveArticleId());
 
                                if (title || getActiveFeedId() || activeFeedIsCat()) {
                                        if (title) title = title.innerHTML;
@@ -1270,6 +1274,8 @@ function unsubscribeFeed(feed_id, title) {
                                        } else {
                                                if (feed_id == getActiveFeedId())
                                                        setTimeout("viewfeed(-5)", 100);
+
+                                               if (feed_id < 0) updateFeedList();
                                        }
 
                                } });
@@ -1878,3 +1884,25 @@ function get_timestamp() {
        var date = new Date();
        return Math.round(date.getTime() / 1000);
 }
+
+function helpDialog(topic) {
+       try {
+               var query = "backend.php?op=backend&method=help&topic=" + param_escape(topic);
+
+               if (dijit.byId("helpDlg"))
+                       dijit.byId("helpDlg").destroyRecursive();
+
+               dialog = new dijit.Dialog({
+                       id: "helpDlg",
+                       title: __("Help"),
+                       style: "width: 600px",
+                       href: query,
+               });
+
+               dialog.show();
+
+       } catch (e) {
+               exception_error("helpDialog", e);
+       }
+}
+