fix cdm checkbox not selecting entire cell

This commit is contained in:
Andrew Dolgov 2013-02-28 14:22:13 +04:00
parent ce1cdfb6e0
commit 831408f0e8
2 changed files with 7 additions and 3 deletions

View File

@ -521,7 +521,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "<div>";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
id=\"RCHK-$id\">";
$reply['content'] .= "$marked_pic";

View File

@ -351,9 +351,13 @@ function toggleSelectListRow2(sender) {
}
/* this is for dijit Checkbox */
function toggleSelectRow2(sender, row) {
function toggleSelectRow2(sender, row, is_cdm) {
if (!row) row = sender.domNode.parentNode.parentNode;
if (!row)
if (!is_cdm)
row = sender.domNode.parentNode.parentNode;
else
row = sender.domNode.parentNode.parentNode.parentNode; // oh ffs
if (sender.checked && !row.hasClassName('Selected'))
row.addClassName('Selected');