Collapsiblock is installed and working properly with most blocks.

However the Language Block is always expanded, regardless of the "Block collapse behavior" setting - ie. even when the Language Switcher is set to "Collapsible, collapsed by default".

Clicking on the block title correctly collapses/expands the Language Switcher block, similar to other blocks. The only problem is to make it collapsed by default.

CommentFileSizeAuthor
#3 delete-active-255969-1.patch928 bytessoul88

Comments

gagarine’s picture

Title: Does not work properly with Language Switcher block » With Language Switcher block collapsed by default doesn't work
Assigned: Unassigned » gagarine

I confirm this bug... I will try to fix this soon.

EDIT:
I get it. The JS tests if they are an active menu in the block. If they are the block stay open. With the language switcher they are always an active menu so it stay open all the time.

      if (stat ==  4 || (cookieData[id] == 0 || (stat == 3 && cookieData[id] == undefined)) && !$(this).find('a.active').size()) {

Don't know what is the best way to fix that for the moment.. Perhaps a settings like "open if they are an active menu".

soul88’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

same problem with search_api_sorts.

Actually it seems that any link generate with a help of l()function will have .active class.

common.inc line 2423

  // Append active class.
  if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
      (empty($options['language']) || $options['language']->language == $language_url->language)) {
    $options['attributes']['class'][] = 'active';
  }
soul88’s picture

StatusFileSize
new928 bytes

small patch to fix that

darvanen’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Parent issue: » #2447245: Blocks are expanded with active menu link

This patch is not backwards-compatible.
This issue is being tackled in #2447245: Blocks are expanded with active menu link.