Select unread should clear previous selection (closes #19)
This commit is contained in:
parent
dc0c8985bd
commit
649e0af9fe
|
@ -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>
|
||||
|
||||
|
|
18
functions.js
18
functions.js
|
@ -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,14 +571,18 @@ 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);
|
||||
|
||||
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;
|
||||
}
|
||||
} else if (reset_others) {
|
||||
selectTableRow(content.rows[i], false);
|
||||
}
|
||||
} else if (reset_others) {
|
||||
selectTableRow(content.rows[i], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue