-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3038953 by kavya_akhil: link without submenu, Issue #3038954 b…
…y wla_g: allow all trees closed by default
- Loading branch information
Showing
5 changed files
with
100 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
(function ($) { | ||
$(document).ready(function () { | ||
$('.accordion_menus_block_container').accordion({header: 'h2.accordion-title', autoHeight: false}); | ||
}); | ||
})(jQuery); | ||
(function ($, Drupal, drupalSettings) { | ||
'use strict'; | ||
|
||
Drupal.behaviors.accordionMenus = { | ||
attach: function (context, settings) { | ||
// Get data from server. | ||
var accordionMenus = drupalSettings.accordion_menus; | ||
var closedByDefault = accordionMenus.accordion_closed; | ||
|
||
// Set auto height. | ||
$('.accordion_menus_block_container').accordion({header: 'h2.accordion-title', autoHeight: true}); | ||
|
||
// Make collapsible by default. | ||
$.each(closedByDefault, function(i, val) { | ||
$('.accordion_menus_block_container.' + val).accordion({ header: 'h2.accordion-title', collapsible: true, active: false }); | ||
}); | ||
} | ||
}; | ||
|
||
})(jQuery, Drupal, drupalSettings); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters