From 4df36903b9631002fa5ddce350e61faadbd9ff75 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 12 Dec 2016 15:42:19 +0100 Subject: [PATCH] feature #565, check the checkbox state ...before we apply the appropriate checked/unchecked icon. This problem was obvious when using the shoft-click selection feature on Batch Manager. --- admin/themes/default/js/common.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/themes/default/js/common.js b/admin/themes/default/js/common.js index 48c553933..276718a73 100644 --- a/admin/themes/default/js/common.js +++ b/admin/themes/default/js/common.js @@ -6,7 +6,13 @@ jQuery.fn.fontCheckbox = function() { } }); this.find('input[type=checkbox]').on('change', function() { - jQuery(this).prev().toggleClass('icon-check icon-check-empty'); + jQuery(this).prev().removeClass(); + if (!jQuery(this).is(':checked')) { + jQuery(this).prev().addClass('icon-check-empty'); + } + else { + jQuery(this).prev().addClass('icon-check'); + } }); /* radio */