Remove conditional logic and make it harder for states to get out of sync.
This commit is contained in:
parent
e3858da843
commit
9fddf5014f
@ -176,8 +176,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
|
||||
parent.find("input[type='text']").val(value);
|
||||
var checkbox = parent.find("input[type='checkbox']");
|
||||
if (!checkbox.attr('checked'))
|
||||
checkbox.attr('checked', true).change();
|
||||
checkbox.prop('checked', true).change();
|
||||
return false;
|
||||
};
|
||||
for (var c = 0; c < choices.length; c++) {
|
||||
@ -219,7 +218,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
|
||||
var editCheck = $('<input type="checkbox" />')
|
||||
.change(function() {
|
||||
cluster.edit = !cluster.edit;
|
||||
cluster.edit = this.checked;
|
||||
}).appendTo(tr.insertCell(3));
|
||||
|
||||
if (cluster.edit) {
|
||||
|
Loading…
Reference in New Issue
Block a user