]> git.wh0rd.org Git - tt-rss.git/commitdiff
offline: toggleCollapseCat() update status in local db
authorAndrew Dolgov <fox@bah.org.ru>
Thu, 5 Feb 2009 19:34:56 +0000 (22:34 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Thu, 5 Feb 2009 19:34:56 +0000 (22:34 +0300)
feedlist.js
offline.js

index cd1d8b20ad942172b6f82a983d3899ddff901cbb..740ecdbc0679aa2544dfdfa7157170bc0bdef8c0 100644 (file)
@@ -400,6 +400,8 @@ function toggleCollapseCat(cat) {
                new Ajax.Request("backend.php?op=feeds&subop=collapse&cid=" + 
                        param_escape(cat));
 
+               local_collapse_cat(cat);
+
        } catch (e) {
                exception_error("toggleCollapseCat", e);
        }
index fd3e7ef77c87343e2fec2a35a98a12df8d659e9a..b06c5fb59d597a839da90cb39597eba20a745b8c 100644 (file)
@@ -830,3 +830,13 @@ function gotoOnline() {
        window.location.href = "tt-rss.php";
 }
 
+function local_collapse_cat(id) {
+       try {
+               if (db) {
+                       db.execute("UPDATE categories SET collapsed = NOT collapsed WHERE id = ?",
+                               [id]);
+               }       
+       } catch (e) {
+               exception_error("local_collapse_cat", e);
+       }
+}