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);
|
parent.find("input[type='text']").val(value);
|
||||||
var checkbox = parent.find("input[type='checkbox']");
|
var checkbox = parent.find("input[type='checkbox']");
|
||||||
if (!checkbox.attr('checked'))
|
checkbox.prop('checked', true).change();
|
||||||
checkbox.attr('checked', true).change();
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
for (var c = 0; c < choices.length; c++) {
|
for (var c = 0; c < choices.length; c++) {
|
||||||
@ -219,7 +218,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
|||||||
|
|
||||||
var editCheck = $('<input type="checkbox" />')
|
var editCheck = $('<input type="checkbox" />')
|
||||||
.change(function() {
|
.change(function() {
|
||||||
cluster.edit = !cluster.edit;
|
cluster.edit = this.checked;
|
||||||
}).appendTo(tr.insertCell(3));
|
}).appendTo(tr.insertCell(3));
|
||||||
|
|
||||||
if (cluster.edit) {
|
if (cluster.edit) {
|
||||||
|
Loading…
Reference in New Issue
Block a user