$login = db_fetch_result($result, 0, "login");
- print "<h1>$login</h1>";
+# print "<h1>$login</h1>";
print "<table width='100%'>";
$stored_articles = db_fetch_result($result, 0, "stored_articles");
# print "<tr><td>Username</td><td>$login</td></tr>";
- print "<tr><td>Access level</td><td>$access_level</td></tr>";
+# print "<tr><td>Access level</td><td>$access_level</td></tr>";
print "<tr><td>Last logged in</td><td>$last_login</td></tr>";
print "<tr><td>Stored articles</td><td>$stored_articles</td></tr>";
onclick=\"updateBigFeedBrowser()\" value=\"Show\">
</div>";
- print "<p>Selection:
+ print "<p id=\"fbrOpToolbar\">Selection:
<input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
- value=\"Subscribe\">";
+ disabled=\"true\" value=\"Subscribe\">";
print "<ul class='nomarks' id='browseBigFeedList'>";
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
}
- $check_box = "<input onclick='toggleSelectListRow(this)' class='feedBrowseCB'
+ $check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB'
type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
$class = ($feedctr % 2) ? "even" : "odd";
return getSelectedTableRowIds("prefFeedCatList", "FCATR");
}
+function getSelectedFeedsFromBrowser() {
+
+ var list = document.getElementById("browseFeedList");
+ if (!list) list = document.getElementById("browseBigFeedList");
+
+ var selected = new Array();
+
+ for (i = 0; i < list.childNodes.length; i++) {
+ var child = list.childNodes[i];
+ if (child.id && child.id.match("FBROW-")) {
+ var id = child.id.replace("FBROW-", "");
+
+ var cb = document.getElementById("FBCHK-" + id);
+
+ if (cb.checked) {
+ selected.push(id);
+ }
+ }
+ }
+
+ return selected;
+}
+
/*function readSelectedFeeds(read) {
if (sel_rows.length > 0) {
- var ok = confirm("Remove selected feeds?");
+ var ok = confirm("Unsubscribe from selected feeds?");
if (ok) {
function feedBrowserSubscribe() {
try {
- var list = document.getElementById("browseFeedList");
-
- if (!list) list = document.getElementById("browseBigFeedList");
-
- var selected = new Array();
- for (i = 0; i < list.childNodes.length; i++) {
- var child = list.childNodes[i];
- if (child.id && child.id.match("FBROW-")) {
- var id = child.id.replace("FBROW-", "");
-
- var cb = document.getElementById("FBCHK-" + id);
-
- if (cb.checked) {
- selected.push(id);
- }
- }
- }
+ var selected = getSelectedFeedsFromBrowser();
if (selected.length > 0) {
closeInfoBox();
}
}
-
+function toggleSelectFBListRow(sender) {
+ toggleSelectListRow(sender);
+ disableContainerChildren("fbrOpToolbar", getSelectedFeedsFromBrowser() == 0);
+}