var xmlhttp = false;
var active_feed_cat = false;
-var active_filter = false;
var active_label = false;
var active_tab = false;
var feed_to_expand = false;
function filterlist_callback() {
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
-
container.innerHTML=xmlhttp.responseText;
-
- if (active_filter) {
- var row = document.getElementById("FILRR-" + active_filter);
- if (row) {
- if (!row.className.match("Selected")) {
- row.className = row.className + "Selected";
- }
- }
- var checkbox = document.getElementById("FICHK-" + active_filter);
-
- if (checkbox) {
- checkbox.checked = true;
- }
- }
notify("");
}
}
} else {
notify("Adding feed...");
- xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=add&link=" +
+ xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=add&feed_url=" +
param_escape(link.value), true);
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.send(null);
return
}
- active_filter = id;
+ document.getElementById("create_filter_btn").disabled = true;
- xmlhttp.open("GET", "backend.php?op=pref-filters&subop=edit&id=" +
- param_escape(id), true);
- xmlhttp.onreadystatechange=filterlist_callback;
- xmlhttp.send(null);
+ selectTableRowsByIdPrefix('prefFilterList', 'FILRR-', 'FICHK-', false);
+ selectTableRowById('FILRR-'+id, 'FICHK-'+id, true);
+ xmlhttp.open("GET", "backend.php?op=pref-filters&subop=edit&id=" + param_escape(id), true);
+ xmlhttp.onreadystatechange=infobox_callback;
+ xmlhttp.send(null);
}
function editFeed(feed) {
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(query);
+ closeInfoBox();
+
return false;
} catch (e) {
// notify("Operation cancelled.");
+ closeInfoBox();
+
xmlhttp.open("GET", "backend.php?op=pref-labels", true);
xmlhttp.onreadystatechange=labellist_callback;
xmlhttp.send(null);
}
selectPrefRows('user', false); // cleanup feed selection
-
closeInfoBox();
}
return
}
- active_filter = false;
-
-// notify("Operation cancelled.");
-
- xmlhttp.open("GET", "backend.php?op=pref-filters", true);
- xmlhttp.onreadystatechange=filterlist_callback;
- xmlhttp.send(null);
-
+ document.getElementById("create_filter_btn").disabled = false;
+
+ selectPrefRows('filter', false); // cleanup feed selection
+ closeInfoBox();
}
function labelEditSave() {
return;
}
+ closeInfoBox();
+
notify("Saving label...");
active_label = false;
query = Form.serialize("label_edit_form");
- xmlhttp.open("GET", "backend.php?" + query, true);
-
+ xmlhttp.open("GET", "backend.php?" + query, true);
xmlhttp.onreadystatechange=labellist_callback;
xmlhttp.send(null);
}
notify("Saving user...");
-
+
+ closeInfoBox();
+
var query = Form.serialize("user_edit_form");
xmlhttp.open("GET", "backend.php?" + query, true);
notify("Saving filter...");
- active_filter = false;
-
var query = Form.serialize("filter_edit_form");
+ closeInfoBox();
+
+ document.getElementById("create_filter_btn").disabled = false;
+
xmlhttp.open("GET", "backend.php?" + query, true);
xmlhttp.onreadystatechange=filterlist_callback;
xmlhttp.send(null);
notify("Loading, please wait...", true);
+ // close active infobox if needed
+ closeInfoBox();
+
// clean up all current selections, just in case
active_feed_cat = false;
- active_filter = false;
active_label = false;
if (id == "feedConfig") {
function validateNewPassword(form) {
if (form.OLD_PASSWORD.value == "") {
- alert("Current password cannot be blank");
+ alert("Old password cannot be blank");
return false;
}
if (form.NEW_PASSWORD.value == "") {