$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
- id=\"RCHK-$id\">";
+ class='rchk'>";
$reply['content'] .= "$marked_pic";
$reply['content'] .= "$published_pic";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
- id=\"RCHK-$id\">";
+ class='rchk'>";
$reply['content'] .= "$marked_pic";
$reply['content'] .= "$published_pic";
hotkey_actions["select_article_cursor"] = function() {
var id = getArticleUnderPointer();
if (id) {
- var cb = dijit.byId("RCHK-" + id);
- if (cb) {
- cb.attr("checked", !cb.attr("checked"));
- toggleSelectRowById(cb, "RROW-" + id);
- return false;
+ var row = $("RROW-" + id);
+
+ if (row) {
+ var cb = dijit.getEnclosingWidget(
+ row.getElementsByClassName("rchk")[0]);
+
+ if (cb) {
+ cb.attr("checked", !cb.attr("checked"));
+ toggleSelectRowById(cb, "RROW-" + id);
+ return false;
+ }
}
}
};
initHeadlinesMenu();
new_elems.each(function(child) {
- var cb = dijit.byId(child.id.replace("RROW-", "RCHK-"));
+ dojo.parser.parse(child);
- if (!cb) {
- dojo.parser.parse(child);
-
- if (!Element.visible(child))
- new Effect.Appear(child, { duration : 0.5 });
- } else {
- c.domNode.removeChild(child);
- }
+ if (!Element.visible(child))
+ new Effect.Appear(child, { duration : 0.5 });
});
} else {
function toggleSelected(id, force_on) {
try {
-
- var cb = dijit.byId("RCHK-" + id);
var row = $("RROW-" + id);
if (row) {
+ var cb = dijit.getEnclosingWidget(
+ row.getElementsByClassName("rchk")[0]);
+
if (row.hasClassName('Selected') && !force_on) {
row.removeClassName('Selected');
if (cb) cb.attr("checked", false);
children.each(function(child) {
var id = child.id.replace("RROW-", "");
- var cb = dijit.byId("RCHK-" + id);
+
+ var cb = dijit.getEnclosingWidget(
+ child.getElementsByClassName("rchk")[0]);
if (mode == "all") {
child.addClassName("Selected");
var row = $("RROW-" + id);
if (row) {
- var check = dijit.byId("RCHK-" + id);
+ var check = dijit.getEnclosingWidget(
+ row.getElementsByClassName("rchk")[0]);
if (check) {
check.attr("checked", marked);