checkbox.checked = true;
}
}
-// p_notify("");
+ notify("");
} catch (e) {
exception_error("feedlist_callback", e);
}
checkbox.checked = true;
}
}
-// p_notify("");
+ notify("");
}
}
checkbox.checked = true;
}
}
-// p_notify("");
+ notify("");
}
}
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
container.innerHTML=xmlhttp.responseText;
-// p_notify("");
+ notify("");
}
}
checkbox.checked = true;
}
}
-
-// p_notify("");
+ notify("");
}
}
if (xmlhttp.readyState == 4) {
container.innerHTML=xmlhttp.responseText;
-
-// p_notify("");
+
+ notify("");
}
}
if (link.value.length == 0) {
alert("Error: No feed URL given.");
- } else if (link.value.match("http://") == null &&
- link.value.match("https://") == null) {
+ } else if (!isValidURL(link.value)) {
alert("Error: Invalid feed URL.");
} else {
notify("Adding feed...");
active_feed = feed;
-/* xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=edit&id=" +
- param_escape(feed), true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null); */
-
+ // clean selection from all rows & select row being edited
selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-', 'FRCHK-', false);
-// selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-'+feed, 'FRCHK-'+feed,
-// true, false);
-
selectTableRowById('FEEDR-'+feed, 'FRCHK-'+feed, true);
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=editfeed&id=" +
if (sel_rows.length > 0) {
- var ok = confirm("Unsubscribe selected feeds?");
+ var ok = confirm("Unsubscribe from selected feeds?");
if (ok) {
- notify("Removing selected feeds...");
+ notify("Unsubscribing from selected feeds...");
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=remove&ids="+
param_escape(sel_rows.toString()), true);
closeInfoBox();
- active_feed = false;
-
-// notify("Operation cancelled.");
-
-/* xmlhttp.open("GET", "backend.php?op=pref-feeds", true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null); */
+ selectPrefRows('feed', false); // cleanup feed selection
+ active_feed = false;
}
function feedCatEditCancel() {
printLockingError();
return
}
-
- var link = document.getElementById("iedit_link").value;
- var title = document.getElementById("iedit_title").value;
- var upd_intl = document.getElementById("iedit_updintl");
- upd_intl = upd_intl[upd_intl.selectedIndex].id;
-
- var purge_intl = document.getElementById("iedit_purgintl");
+ // FIXME: add parameter validation
- purge_intl = purge_intl[purge_intl.selectedIndex].id;
-
- var fcat = document.getElementById("iedit_fcat");
-
- var is_pvt = document.getElementById("iedit_private");
- var is_rtl = document.getElementById("iedit_rtl");
-
- if (is_pvt) {
- is_pvt = is_pvt.checked;
- }
-
- if (is_rtl) {
- is_rtl = is_rtl.checked;
- }
+ var query = Form.serialize("edit_feed_form");
- var fcat_id = 0;
-
- if (fcat) {
- fcat_id = fcat[fcat.selectedIndex].id;
- }
-
- var pfeed = document.getElementById("iedit_parent_feed");
- var parent_feed_id = pfeed[pfeed.selectedIndex].id;
-
- if (link.length == 0) {
- notify("Feed link cannot be blank.");
- return;
- }
-
- if (title.length == 0) {
- notify("Feed title cannot be blank.");
- return;
- }
-
- var auth_login = document.getElementById("iedit_login").value;
- var auth_pass = document.getElementById("iedit_pass").value;
-
active_feed = false;
-
- notify("Saving feed...");
- var query = "op=pref-feeds&subop=editSave&id=" +
- feed + "&l=" + param_escape(link) + "&t=" + param_escape(title) +
- "&ui=" + param_escape(upd_intl) + "&pi=" + param_escape(purge_intl) +
- "&catid=" + param_escape(fcat_id) + "&login=" + param_escape(auth_login) +
- "&pfeed=" + param_escape(parent_feed_id) + "&pass=" + param_escape(auth_pass) +
- "&is_pvt=" + param_escape(is_pvt) + "&is_rtl=" + param_escape(is_rtl);
+ notify("Saving feed...");
xmlhttp.open("POST", "backend.php", true);
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- xmlhttp.send(query);
-
+ xmlhttp.send(query);
+
} catch (e) {
exception_error("feedEditSave", e);
}
var piggie = document.getElementById("piggie");
piggie.style.display = "block";
- if (navigator.userAgent.match("Firefox") && Math.random(1) > 0.5) {
+ if (navigator.userAgent.match("Gecko") && Math.random(1) > 0.5) {
piggie2_callback();
} else {
piggie_callback();
if (!noupdate) {
+ notify("Loading, please wait...", true);
+
+ // clean up all current selections, just in case
+ active_feed = false;
+ active_feed_cat = false;
+ active_filter = false;
+ active_label = false;
+ active_user = false;
+
if (id == "feedConfig") {
updateFeedList();
} else if (id == "filterConfig") {
d.style.display = "none";
} */
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
var d = document.getElementById("BRDET-" + id);
if (d.style.display == "block") {
feed_to_expand = id;
+ d.style.display = "block";
+ d.innerHTML = "Loading, please wait...";
+
xmlhttp.open("GET", "backend.php?op=pref-feed-browser&subop=details&id="
+ param_escape(id), true);
xmlhttp.onreadystatechange=expand_feed_callback;