Select unread should clear previous selection (closes #19)

This commit is contained in:
Andrew Dolgov 2005-12-29 15:31:20 +01:00
parent dc0c8985bd
commit 649e0af9fe
2 changed files with 13 additions and 9 deletions

View File

@ -1273,9 +1273,9 @@
print "<td class=\"headlineActions\">
Select:
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
'RROW-', 'RCHK-', true)\">All</a>,
'RROW-', 'RCHK-', true, '', true)\">All</a>,
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
'RROW-', 'RCHK-', true, 'Unread')\">Unread</a>,
'RROW-', 'RCHK-', true, 'Unread', true)\">Unread</a>,
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
'RROW-', 'RCHK-', false)\">None</a>
&nbsp;&nbsp;

View File

@ -557,7 +557,7 @@ function selectTableRowById(elem_id, check_id, do_select) {
}
function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select,
classcheck) {
classcheck, reset_others) {
var content = document.getElementById(content_id);
@ -571,7 +571,6 @@ function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select,
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);
@ -579,6 +578,11 @@ function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select,
if (check) {
check.checked = do_select;
}
} else if (reset_others) {
selectTableRow(content.rows[i], false);
}
} else if (reset_others) {
selectTableRow(content.rows[i], false);
}
}
}