}
}
-function infobox_callback() {
- if (xmlhttp.readyState == 4) {
- var box = document.getElementById('infoBox');
- var shadow = document.getElementById('infoBoxShadow');
-
- if (box) {
- box.innerHTML=xmlhttp.responseText;
- if (shadow) {
- shadow.style.display = "block";
- } else {
- box.style.display = "block";
- }
- }
- }
-}
-
-
function prefslist_callback() {
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
var sqlexp = document.getElementById("ladd_expr");
if (sqlexp.value.length == 0) {
- notify("Missing SQL expression.");
+ alert("Can't add label: missing SQL expression.");
} else {
notify("Adding label...");
var action = document.getElementById("fadd_action");
if (regexp.value.length == 0) {
- notify("Missing filter expression.");
+ alert("Can't add filter: missing filter expression.");
} else {
notify("Adding filter...");
var link = document.getElementById("fadd_link");
if (link.value.length == 0) {
- notify("Missing feed URL.");
+ alert("Error: No feed URL given.");
} else {
notify("Adding feed...");
var cat = document.getElementById("fadd_cat");
if (cat.value.length == 0) {
- notify("Missing feed category.");
+ alert("Can't add category: no name specified.");
} else {
notify("Adding feed category...");
var sqlexp = document.getElementById("uadd_box");
if (sqlexp.value.length == 0) {
- notify("Missing user login.");
+ alert("Can't add user: no login specified.");
} else {
notify("Adding user...");
}
-function readSelectedFeeds(read) {
+/*function readSelectedFeeds(read) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
-}
+} */
function removeSelectedLabels() {
xmlhttp.send(null);
}
} else {
- notify("Please select some labels first.");
+ alert("No labels are selected.");
}
}
}
} else {
- notify("Please select some labels first.");
+ alert("No users are selected.");
}
}
xmlhttp.send(null);
}
} else {
- notify("Please select some filters first.");
+ alert("No filters are selected.");
}
}
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
} else {
- notify("Please select some feeds first.");
+ alert("No categories are selected.");
}
active_feed = false;
- notify("Operation cancelled.");
+// notify("Operation cancelled.");
/* xmlhttp.open("GET", "backend.php?op=pref-feeds", true);
xmlhttp.onreadystatechange=feedlist_callback;
active_feed_cat = false;
- notify("Operation cancelled.");
+// notify("Operation cancelled.");
xmlhttp.open("GET", "backend.php?op=pref-feeds", true);
xmlhttp.onreadystatechange=feedlist_callback;
var link = document.getElementById("iedit_link").value;
var title = document.getElementById("iedit_title").value;
- var upd_intl = document.getElementById("iedit_updintl").value;
- var purge_intl = document.getElementById("iedit_purgintl").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) {
"&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_pvt=" + param_escape(is_pvt) + "&is_rtl=" + param_escape(is_rtl);
xmlhttp.open("POST", "backend.php", true);
xmlhttp.onreadystatechange=feedlist_callback;
active_label = false;
- notify("Operation cancelled.");
+// notify("Operation cancelled.");
xmlhttp.open("GET", "backend.php?op=pref-labels", true);
xmlhttp.onreadystatechange=labellist_callback;
active_user = false;
- notify("Operation cancelled.");
+// notify("Operation cancelled.");
xmlhttp.open("GET", "backend.php?op=pref-users", true);
xmlhttp.onreadystatechange=userlist_callback;
active_filter = false;
- notify("Operation cancelled.");
+// notify("Operation cancelled.");
xmlhttp.open("GET", "backend.php?op=pref-filters", true);
xmlhttp.onreadystatechange=filterlist_callback;
}
var login = document.getElementById("iedit_ulogin").value;
- var level = document.getElementById("iedit_ulevel").value;
+ var level = document.getElementById("iedit_ulevel");
+
+ level = level[level.selectedIndex].id;
+
var email = document.getElementById("iedit_email").value;
if (login.length == 0) {
}
var regexp = document.getElementById("iedit_regexp").value;
- var descr = document.getElementById("iedit_descr").value;
var match = document.getElementById("iedit_match");
var v_match = match[match.selectedIndex].text;
var action = document.getElementById("iedit_filter_action");
var action_id = action[action.selectedIndex].id;
-// notify("Saving filter " + filter + ": " + regexp + ", " + descr + ", " + match);
-
if (regexp.length == 0) {
- notify("Filter expression cannot be blank.");
+ alert("Can't save filter: match expression is blank.");
return;
}
active_filter = false;
xmlhttp.open("GET", "backend.php?op=pref-filters&subop=editSave&id=" +
- filter + "&r=" + param_escape(regexp) + "&d=" + param_escape(descr) +
- "&m=" + param_escape(v_match) + "&fid=" + param_escape(feed_id) +
- "&aid=" + param_escape(action_id), true);
+ filter + "&r=" + param_escape(regexp) + "&m=" + param_escape(v_match) +
+ "&fid=" + param_escape(feed_id) + "&aid=" + param_escape(action_id), true);
notify("Saving filter...");
var rows = getSelectedLabels();
if (rows.length == 0) {
- notify("No labels are selected.");
+ alert("No labels are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one label.");
+ alert("Please select only one label.");
return;
}
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
var rows = getSelectedFeeds();
if (rows.length == 0) {
- notify("No feeds are selected.");
+ alert("No feeds are selected.");
return;
}
-// if (rows.length > 1) {
-// notify("Please select one feed.");
-// return;
-// }
+ if (rows.length > 1) {
+ notify("Please select only one feed.");
+ return;
+ }
// var id = rows[0];
var rows = getSelectedFilters();
if (rows.length == 0) {
- notify("No filters are selected.");
+ alert("No filters are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one filter.");
+ alert("Please select only one filter.");
return;
}
var rows = getSelectedFeedCats();
if (rows.length == 0) {
- notify("No categories are selected.");
+ alert("No categories are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one category.");
+ alert("Please select only one category.");
return;
}
var opml_file = document.getElementById("opml_file");
if (opml_file.value.length == 0) {
- notify("Please select OPML file to upload.");
+ alert("No OPML file to upload.");
return false;
} else {
return true;
}
}
-function closeInfoBox() {
- var box = document.getElementById('infoBox');
- var shadow = document.getElementById('infoBoxShadow');
-
- if (shadow) {
- shadow.style.display = "none";
- } else if (box) {
- box.style.display = "none";
- }
-}
-
function categorizeSelectedFeeds() {
if (!xmlhttp_ready(xmlhttp)) {
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
return confirm("Reset to defaults?");
}
-function browseFeeds() {
+function browseFeeds(limit) {
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=browse", true);
xmlhttp.onreadystatechange=infobox_callback;
}
}
-function updateBigFeedBrowser() {
+function updateBigFeedBrowser(limit) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
p_notify("Loading, please wait...");
- xmlhttp.open("GET", "backend.php?op=pref-feed-browser", true);
+ var query = "backend.php?op=pref-feed-browser";
+
+ var limit_sel = document.getElementById("feedBrowserLimit");
+
+ if (limit_sel) {
+ var limit = limit_sel[limit_sel.selectedIndex].value;
+ query = query + "&limit=" + param_escape(limit);
+ }
+
+ xmlhttp.open("GET", query, true);
xmlhttp.onreadystatechange=feed_browser_callback;
xmlhttp.send(null);
-
}
function browserToggleExpand(id) {
exception_error("browserExpand", e);
}
}
+
+function validateNewPassword(form) {
+ if (form.OLD_PASSWORD.value == "") {
+ alert("Current password cannot be blank");
+ return false;
+ }
+ if (form.NEW_PASSWORD.value == "") {
+ alert("New password cannot be blank");
+ return false;
+ }
+ return true;
+}