From 9fddf5014fb227f634d909528ae18e1600dc8971 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 16 Oct 2015 18:53:21 -0400 Subject: [PATCH] Improved fix for #1056 & #1060 Remove conditional logic and make it harder for states to get out of sync. --- .../webapp/modules/core/scripts/dialogs/clustering-dialog.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js index dcb806094..4b3951f81 100644 --- a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js @@ -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 = $('') .change(function() { - cluster.edit = !cluster.edit; + cluster.edit = this.checked; }).appendTo(tr.insertCell(3)); if (cluster.edit) {