summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBo Simonsen <bo@geekworld.dk>2012-10-11 14:37:59 (GMT)
committerBo Simonsen <bo@geekworld.dk>2012-10-11 14:37:59 (GMT)
commit2f29eb70abf3bbaf5c4e512d3494f4cf67ae22c1 (patch)
tree03b5fc8d69056d05ca74a480825ab75c683ddff6
parentb9519eaf8353b87da458a350a63ea596133a8bda (diff)
downloadplone.formwidget.querystring-2f29eb70abf3bbaf5c4e512d3494f4cf67ae22c1.zip
plone.formwidget.querystring-2f29eb70abf3bbaf5c4e512d3494f4cf67ae22c1.tar.gz
plone.formwidget.querystring-2f29eb70abf3bbaf5c4e512d3494f4cf67ae22c1.tar.bz2
We can now hide the multiselectionwidget
-rw-r--r--plone/formwidget/querystring/querywidget.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/plone/formwidget/querystring/querywidget.js b/plone/formwidget/querystring/querywidget.js
index fbddfa5..630cfde 100644
--- a/plone/formwidget/querystring/querywidget.js
+++ b/plone/formwidget/querystring/querywidget.js
@@ -322,13 +322,20 @@
});
$('.multipleSelectionWidget dt').live('click', function () {
- if ($(this).parent().children('dd').hasClass('hiddenStructure')) {
- $(this).parent().children('dd').removeClass('hiddenStructure');
- } else {
- $(this).parent().children('dd').addClass('hiddenStructure');
+ $(this).parent().children('dd').toggle();
+ });
+
+ /* Clicking outside a multipleSelectionWidget will close all open
+ multipleSelectionWidgets */
+
+ $(window).click(function(event){
+ if ($(event.target).parents('.multipleSelectionWidget').length) {
+ return;
}
+ $('.multipleSelectionWidget dd').hide();
});
+
$('.queryindex').live('change', function () {
var fname = $(this).closest('.QueryWidget').attr('data-fieldname');
var index = $(this).find(':selected')[0].value;