Headlines.onRowChecked: fix possible desync in checkbox and row selected state
This commit is contained in:
parent
dcd9914079
commit
4a0b644f61
|
@ -753,10 +753,19 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
return rv;
|
return rv;
|
||||||
},
|
},
|
||||||
onRowChecked: function (elem) {
|
onRowChecked: function (elem) {
|
||||||
// account for dojo checkboxes
|
// do not allow unchecking active article checkbox
|
||||||
elem = elem.domNode || elem;
|
if (row.hasClassName("active")) {
|
||||||
|
elem.attr("checked", 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
elem.up("div[id*=RROW]").toggleClassName("Selected");
|
const row = elem.domNode.up("div[id*=RROW]");
|
||||||
|
|
||||||
|
if (elem.attr("checked")) {
|
||||||
|
row.addClassName("Selected");
|
||||||
|
} else {
|
||||||
|
row.removeClassName("Selected");
|
||||||
|
}
|
||||||
|
|
||||||
this.updateSelectedPrompt();
|
this.updateSelectedPrompt();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue