summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-16 08:28:10 +0100
committerAndrew Dolgov <[email protected]>2006-08-16 08:28:10 +0100
commita4dbc5247a35661f746f0f012c08a13db65713ee (patch)
treebda44b8ed6ad8820a2b2a5a51d9edc6320270c07 /prefs.js
parent68c1b64ff1950963db69780dc15b33015cdece6f (diff)
rework label editor from inline to infobox
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js28
1 files changed, 19 insertions, 9 deletions
diff --git a/prefs.js b/prefs.js
index 11743d2cc..28e54ee4f 100644
--- a/prefs.js
+++ b/prefs.js
@@ -82,6 +82,14 @@ function labellist_callback() {
}
}
+function labeltest_callback() {
+ var container = document.getElementById('label_test_result');
+ if (xmlhttp.readyState == 4) {
+ container.innerHTML=xmlhttp.responseText;
+ notify("");
+ }
+}
+
function feed_browser_callback() {
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
@@ -309,9 +317,12 @@ function editLabel(id) {
active_label = id;
+ selectTableRowsByIdPrefix('prefLabelList', 'LILRR-', 'LICHK-', false);
+ selectTableRowById('LILRR-'+id, 'LICHK-'+id, true);
+
xmlhttp.open("GET", "backend.php?op=pref-labels&subop=edit&id=" +
param_escape(id), true);
- xmlhttp.onreadystatechange=labellist_callback;
+ xmlhttp.onreadystatechange=infobox_callback;
xmlhttp.send(null);
}
@@ -663,6 +674,10 @@ function feedCatEditSave() {
function labelTest() {
+ var container = document.getElementById('label_test_result');
+ container.style.display = "block";
+ container.innerHTML = "<p>Loading, please wait...</p>";
+
var form = document.forms['label_edit_form'];
var sql_exp = form.sql_exp.value;
@@ -671,7 +686,7 @@ function labelTest() {
xmlhttp.open("GET", "backend.php?op=pref-labels&subop=test&expr=" +
param_escape(sql_exp) + "&descr=" + param_escape(description), true);
- xmlhttp.onreadystatechange=infobox_callback;
+ xmlhttp.onreadystatechange=labeltest_callback;
xmlhttp.send(null);
return false;
@@ -696,14 +711,9 @@ function labelEditCancel() {
active_label = false;
-// notify("Operation cancelled.");
-
+ selectPrefRows('label', false); // cleanup feed selection
closeInfoBox();
- xmlhttp.open("GET", "backend.php?op=pref-labels", true);
- xmlhttp.onreadystatechange=labellist_callback;
- xmlhttp.send(null);
-
return false;
}
@@ -1452,7 +1462,7 @@ function selectPrefRows(kind, select) {
} else if (kind == "label") {
opbarid = "labelOpToolbar";
nrow = "LILRR-";
- nchk = "LCHK-";
+ nchk = "LICHK-";
lname = "prefLabelList";
} else if (kind == "user") {
opbarid = "userOpToolbar";