summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-27 15:56:10 +0100
committerAndrew Dolgov <[email protected]>2005-11-27 15:56:10 +0100
commit1572afe508162a4e475669e3bb651ee659568c20 (patch)
tree808c0bb9fc55992676ec3de5a1bc0fb4130ab500 /functions.js
parent21cfcdf29b20d43c0577fb2168ba7af7d790a123 (diff)
headlines subtoolbar, misc api changes
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js46
1 files changed, 37 insertions, 9 deletions
diff --git a/functions.js b/functions.js
index 36aa8fd6a..d3886437b 100644
--- a/functions.js
+++ b/functions.js
@@ -32,6 +32,13 @@ function rpc_notify_callback() {
}
}
+function rpc_pnotify_callback() {
+ var container = parent.document.getElementById('notify');
+ if (xmlhttp_rpc.readyState == 4) {
+ container.innerHTML=xmlhttp_rpc.responseText;
+ }
+}
+
function param_escape(arg) {
if (typeof encodeURIComponent != 'undefined')
return encodeURIComponent(arg);
@@ -469,7 +476,8 @@ function selectTableRow(r, do_select) {
}
}
-function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select) {
+function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select,
+ classcheck) {
var content = document.getElementById(content_id);
@@ -479,15 +487,18 @@ function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select)
}
for (i = 0; i < content.rows.length; i++) {
- if (content.rows[i].id.match(prefix)) {
- selectTableRow(content.rows[i], do_select);
- }
+ if (!classcheck || content.rows[i].className.match(classcheck)) {
+
+ if (content.rows[i].id.match(prefix)) {
+ selectTableRow(content.rows[i], do_select);
+ }
- var row_id = content.rows[i].id.replace(prefix, "");
- var check = document.getElementById(check_prefix + row_id);
+ var row_id = content.rows[i].id.replace(prefix, "");
+ var check = document.getElementById(check_prefix + row_id);
- if (check) {
- check.checked = do_select;
+ if (check) {
+ check.checked = do_select;
+ }
}
}
}
@@ -504,7 +515,9 @@ function getSelectedTableRowIds(content_id, prefix) {
var sel_rows = new Array();
for (i = 0; i < content.rows.length; i++) {
- if (content.rows[i].className.match("Selected")) {
+ if (content.rows[i].id.match(prefix) &&
+ content.rows[i].className.match("Selected")) {
+
var row_id = content.rows[i].id.replace(prefix + "-", "");
sel_rows.push(row_id);
}
@@ -514,3 +527,18 @@ function getSelectedTableRowIds(content_id, prefix) {
}
+function toggleSelectRow(sender) {
+ var parent_row = sender.parentNode.parentNode;
+
+ if (sender.checked) {
+ if (!parent_row.className.match("Selected")) {
+ parent_row.className = parent_row.className + "Selected";
+ }
+ } else {
+ if (parent_row.className.match("Selected")) {
+ parent_row.className = parent_row.className.replace("Selected", "");
+ }
+ }
+}
+
+