the height of the </code> is <code>height:256px; but for filters with a few options the box is very big
take a look at screenshot

Comments

zserno’s picture

StatusFileSize
new472 bytes

True.
Ideally the height should be computed based on the number of elements. As a workaround I attach a patch that removes this hard-coded height value. Please check if it's better for you.

zserno’s picture

Status: Active » Needs work
giorgosk’s picture

the height seems better but for filters with many options the box will become to big

you can probably have a condition where when the options are more than say 10 you include the 256px height and it gives scrollbars

otherwise you don't give a height to the container and it gets an height auto calculated

an alternative would be within the views configuration to allow the user to specify height or leave empty (auto height)

giorgosk’s picture

Another option would be to preserve the id from the original fields so someone could at least use CSS and change the heights of individual dropdownlists that are big

giorgosk’s picture

here is a javascript based solution for sexyexposed.js

Drupal.behaviors.sexyExposed = function (context) {
  var settings = Drupal.settings.sexyExposed;
  $.each(settings, function (key, element) {
    if($(element).children().size() < 8)
      $(element).dropdownchecklist();
    else
      $(element).dropdownchecklist({maxDropHeight: 256});
  });
};

when there are less than 8 options then no height is given
more than 8 height is limited and scrollars appear

it would be nice to make the number of options configurable

zserno’s picture

@GiorgosK: Thanks for your ideas. We're working on a general solution where users will be able to override height optionally.

zserno’s picture

Status: Needs work » Needs review
StatusFileSize
new31.66 KB
new3.63 KB

Attached patch provides a textfield to enter number of items that should be visible in the drop-down list.
See attached screenshot.

zserno’s picture

Status: Needs review » Fixed

Committed to HEAD: http://drupal.org/cvs?commit=411348.
Also added a -dev release. Will be up once the packaging script runs again (in 12 hours).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.