The widget is now hidden when the page loads.

This commit is contained in:
Bo Simonsen 2012-10-26 14:30:06 +02:00
parent 26aa3553ae
commit d16c2ce505
2 changed files with 15 additions and 10 deletions

View File

@ -69,11 +69,8 @@ dl.multipleSelectionWidget,
}
.multipleSelectionWidget dd {
width: 198px;
border-width: 1px;
border-style: solid;
background: white;
overflow:auto;
height:6.5em;
}
.multipleSelectionWidget label {
display: block;
@ -98,3 +95,14 @@ dl.querywidget dd {
.criteria {
clear: both;
}
.widgetPulldownMenu {
border-width: 1px;
border-style: solid;
height:6.5em;
}
/* TODO: This should be fixed in public.css, so hiddenStructure will always
have the highest priority. */
.multipleSelectionWidget .hiddenStructure {
display: none !important;
}

View File

@ -229,7 +229,7 @@
if ($(event.target).parents('.multipleSelectionWidget').length) {
return;
}
$('.multipleSelectionWidget dd').hide();
$('.multipleSelectionWidget dd').addClass('hiddenStructure');
}
@ -284,9 +284,6 @@
$('#formfield-form-widgets-sort_on').hide();
$('#formfield-form-widgets-sort_reversed').hide();
// Bind the event that listens on the window and hide the widget
$(window).bind('click', $.querywidget.hideMultiSelectionWidgetEvent);
});
// Init widget
@ -336,11 +333,11 @@
$('.multipleSelectionWidget dt').live('click', function () {
var multiselectionwidget = $(this).parent().children('dd');
if($(multiselectionwidget).is(':visible')) {
$(multiselectionwidget).hide();
if(!$(multiselectionwidget).hasClass('hiddenStructure')) {
$(multiselectionwidget).addClass('hiddenStructure');
$(window).unbind('click', $.querywidget.hideMultiSelectionWidgetEvent);
} else {
$(multiselectionwidget).show();
$(multiselectionwidget).removeClass('hiddenStructure');
$(window).bind('click', $.querywidget.hideMultiSelectionWidgetEvent);
}
});