summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-30 06:29:24 +0100
committerAndrew Dolgov <[email protected]>2005-12-30 06:29:24 +0100
commita7f22b70ec986f67601e65f91308c81844c18e76 (patch)
treebb8aebe0c798866258580465daad0ad182c1bb5f
parent018e1b8ce474cd41de6e34deb0e2ab5a0bc5d1bf (diff)
browser interface fixes
-rw-r--r--backend.php15
-rw-r--r--prefs.js33
2 files changed, 35 insertions, 13 deletions
diff --git a/backend.php b/backend.php
index 7f5dfe376..596daaced 100644
--- a/backend.php
+++ b/backend.php
@@ -1504,6 +1504,8 @@
if ($subop == "massSubscribe") {
$ids = split(",", db_escape_string($_GET["ids"]));
+ $subscribed = array();
+
foreach ($ids as $id) {
$result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds
WHERE id = '$id'");
@@ -1518,8 +1520,21 @@
$result = db_query($link,
"INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id)
VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
+
+ array_push($subscribed, $title);
}
}
+
+ if (count($subscribed) > 0) {
+ print "<div class=\"notice\">";
+ print "<b>Subscribed to feeds:</b>";
+ print "<ul class=\"nomarks\">";
+ foreach ($subscribed as $title) {
+ print "<li>$title</li>";
+ }
+ print "</ul>";
+ print "</div>";
+ }
}
if ($subop == "browse") {
diff --git a/prefs.js b/prefs.js
index 2a8a42d44..66c0de5dc 100644
--- a/prefs.js
+++ b/prefs.js
@@ -45,6 +45,8 @@ function feedlist_callback() {
try {
var container = document.getElementById('prefContent');
container.innerHTML=xmlhttp.responseText;
+ selectTab("feedConfig", true);
+
if (active_feed) {
var row = document.getElementById("FEEDR-" + active_feed);
if (row) {
@@ -1206,25 +1208,30 @@ function updatePrefsList() {
}
-function selectTab(id) {
+function selectTab(id, noupdate) {
+
+// alert(id);
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
return
}
- if (id == "feedConfig") {
- updateFeedList();
- } else if (id == "filterConfig") {
- updateFilterList();
- } else if (id == "labelConfig") {
- updateLabelList();
- } else if (id == "genConfig") {
- updatePrefsList();
- } else if (id == "userConfig") {
- updateUsersList();
- } else if (id == "feedBrowser") {
- updateBigFeedBrowser();
+ if (!noupdate) {
+
+ if (id == "feedConfig") {
+ updateFeedList();
+ } else if (id == "filterConfig") {
+ updateFilterList();
+ } else if (id == "labelConfig") {
+ updateLabelList();
+ } else if (id == "genConfig") {
+ updatePrefsList();
+ } else if (id == "userConfig") {
+ updateUsersList();
+ } else if (id == "feedBrowser") {
+ updateBigFeedBrowser();
+ }
}
var tab = document.getElementById(active_tab + "Tab");