Permalink
Browse files

Fix sort-reversed checkbox js.

  • Loading branch information...
1 parent a0d0c93 commit 0e7836ad3c7d02db930ea5ab5b1c3d1c4ef24efb Timo Stollenwerk committed Mar 19, 2012
Showing with 9 additions and 4 deletions.
  1. +4 −3 docs/HISTORY.txt
  2. +5 −1 plone/formwidget/querystring/querywidget.js
View
7 docs/HISTORY.txt
@@ -1,10 +1,11 @@
Changelog
=========
-1.0 (unreleased)
-----------------
+1.0b2 (unreleased)
+------------------
-- nothing yet.
+- Fix sort-reversed checkbox javascript.
+ [timo]
1.0b1 (2012-03-09)
View
6 plone/formwidget/querystring/querywidget.js
@@ -247,7 +247,11 @@
// Synchronize the z3c.form '#form-widgets-sort_reversed' field
// with the '#sort_order' field on user interaction.
$("#sort_order").live('click', function () {
- $('#form-widgets-sort_reversed-0').attr('checked', $(this).attr('checked'));
+ if ($(this).is(":checked")) {
+ $('#form-widgets-sort_reversed-0').attr('checked', true);
+ } else {
+ $('#form-widgets-sort_reversed-0').attr('checked', false);
+ }
});
// Hide the z3c.form widgets for sorting because they are only needed

0 comments on commit 0e7836a

Please sign in to comment.