You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2016/10/27 20:57:02 UTC
wicket git commit: WICKET-6261 CheckGroupSelector default selection
state incorrect when the list of Checks is empty
Repository: wicket
Updated Branches:
refs/heads/master ed872b821 -> cb22baeab
WICKET-6261 CheckGroupSelector default selection state incorrect when the list of Checks is empty
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/cb22baea
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/cb22baea
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/cb22baea
Branch: refs/heads/master
Commit: cb22baeab9a4947f0639534567e5d016d20341d7
Parents: ed872b8
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Oct 27 22:56:45 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Oct 27 22:56:45 2016 +0200
----------------------------------------------------------------------
.../java/org/apache/wicket/markup/html/form/CheckSelector.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/cb22baea/wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js
index 10e8a09..66f2e19 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js
@@ -61,7 +61,7 @@
*/
updateSelectorState: function(selectorId, findCheckboxes) {
var checkboxes = findCheckboxes(),
- allChecked = true;
+ allChecked = checkboxes.length > 0;
for (var i = 0; i < checkboxes.length; i++) {
if ((checkboxes[i].disabled === false) && (checkboxes[i].checked === false)) {
@@ -152,4 +152,4 @@
}
};
-})();
\ No newline at end of file
+})();