From: Andrew Dolgov Date: Thu, 29 Dec 2005 14:31:20 +0000 (+0100) Subject: Select unread should clear previous selection (closes #19) X-Git-Tag: schema_freeze_for_1.1.2~57 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=649e0af9feecfb58c064addd8ee2fb7568ac45c8;p=tt-rss.git Select unread should clear previous selection (closes #19) --- diff --git a/backend.php b/backend.php index 0efb4827..e53b657b 100644 --- a/backend.php +++ b/backend.php @@ -1273,9 +1273,9 @@ print " Select: All, + 'RROW-', 'RCHK-', true, '', true)\">All, Unread, + 'RROW-', 'RCHK-', true, 'Unread', true)\">Unread, None    diff --git a/functions.js b/functions.js index e408fb8d..b75da2bd 100644 --- a/functions.js +++ b/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); } } }