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("");
}
}
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=" +
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");
-
- 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 fcat_id = 0;
-
- if (fcat) {
- fcat_id = fcat[fcat.selectedIndex].id;
- }
+ // FIXME: add parameter validation
- 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 query = Form.serialize("edit_feed_form");
- if (!isValidURL(link)) {
- alert("Feed URL is invalid.");
- 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);
}
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") {