File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
2
2
3
+ PL-node-v0.8.2
4
+ - FIX: Added grunt-contrib-copy args to copy all found source/css/*.css
5
+ - ADD: Added upgrade instructions to README
6
+ - FIX: Fix issue with styleguide accordions not closing upon click of a sibling menu.
7
+ - THX: @getsetbro for reporting more issues :)
8
+
3
9
PL-node-v0.8.1
4
10
- FIX: v8 is not pulling in values from global data.json
5
11
- FIX: MQ list breaks if media queries don't have spaces
Original file line number Diff line number Diff line change 19
19
$ ( w ) . resize ( function ( ) { //Update dimensions on resize
20
20
sw = document . body . clientWidth ;
21
21
sh = document . body . clientHeight ;
22
+
23
+ setAccordionHeight ( ) ;
22
24
} ) ;
23
25
24
26
/* Pattern Lab accordion dropdown */
27
+ // Accordion dropdown
25
28
$ ( '.sg-acc-handle' ) . on ( "click" , function ( e ) {
26
- var $this = $ ( this ) ,
27
- $panel = $this . next ( '.sg-acc-panel' ) ;
28
29
e . preventDefault ( ) ;
30
+
31
+ var $this = $ ( this ) ,
32
+ $panel = $this . next ( '.sg-acc-panel' ) ,
33
+ subnav = $this . parent ( ) . parent ( ) . hasClass ( 'sg-acc-panel' ) ;
34
+
35
+ //Close other panels if link isn't a subnavigation item
36
+ if ( ! subnav ) {
37
+ $ ( '.sg-acc-handle' ) . not ( $this ) . removeClass ( 'active' ) ;
38
+ $ ( '.sg-acc-panel' ) . not ( $panel ) . removeClass ( 'active' ) ;
39
+ }
40
+
41
+ //Activate selected panel
29
42
$this . toggleClass ( 'active' ) ;
30
43
$panel . toggleClass ( 'active' ) ;
44
+ setAccordionHeight ( ) ;
31
45
} ) ;
32
46
47
+ //Accordion Height
48
+ function setAccordionHeight ( ) {
49
+ var $activeAccordion = $ ( '.sg-acc-panel.active' ) . first ( ) ,
50
+ accordionHeight = $activeAccordion . height ( ) ,
51
+ availableHeight = sh - $headerHeight ; //Screen height minus the height of the header
52
+
53
+ $activeAccordion . height ( availableHeight ) ; //Set height of accordion to the available height
54
+ }
55
+
33
56
$ ( '.sg-nav-toggle' ) . on ( "click" , function ( e ) {
34
57
e . preventDefault ( ) ;
35
58
$ ( '.sg-nav-container' ) . toggleClass ( 'active' ) ;
You can’t perform that action at this time.
0 commit comments