Fixes bugs with 'collapsed' saved to cookies (#4080)
Credit to @w20k. Fixes #4047
This commit is contained in:
parent
d5eca59dc6
commit
880d614bc5
|
|
@ -1102,8 +1102,8 @@ self.saveGroupStatus($(group).data('group-code'),true)}})}
|
|||
SidenavTree.prototype.expandGroup=function(group,duration){var
|
||||
$list=$('> ul',group),self=this
|
||||
duration=duration===undefined?100:duration
|
||||
$list.css({'overflow':'hidden','display':'','height':0})
|
||||
$list.animate({'height':$list[0].scrollHeight},{duration:duration,queue:false,complete:function(){$list.css({'overflow':'visible','height':'auto'})
|
||||
$list.css({'overflow':'hidden','height':0})
|
||||
$list.animate({'height':$list[0].scrollHeight},{duration:duration,queue:false,complete:function(){$list.css({'overflow':'visible','height':'auto','display':''})
|
||||
$(group).attr('data-status','expanded')
|
||||
$(window).trigger('oc.updateUi')
|
||||
self.saveGroupStatus($(group).data('group-code'),false)}})}
|
||||
|
|
|
|||
|
|
@ -100,13 +100,13 @@
|
|||
|
||||
$list.css({
|
||||
'overflow': 'hidden',
|
||||
'display': '',
|
||||
'height': 0
|
||||
})
|
||||
$list.animate({'height': $list[0].scrollHeight}, { duration: duration, queue: false, complete: function() {
|
||||
$list.css({
|
||||
'overflow': 'visible',
|
||||
'height': 'auto'
|
||||
'height': 'auto',
|
||||
'display': ''
|
||||
})
|
||||
$(group).attr('data-status', 'expanded')
|
||||
$(window).trigger('oc.updateUi')
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<h3><?= e(trans($category)) ?></h3>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<ul <?= $collapsed ? 'style="overflow: visible; height: 0px; display: none;"' : null ?>>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<li class="<?= strtolower($item->owner) == $context->owner && strtolower($item->code) == $context->itemCode ? 'active' : false ?>" data-keywords="<?= e(trans($item->keywords)) ?>">
|
||||
<a href="<?= $item->url ?>" ontouchstart="">
|
||||
|
|
|
|||
Loading…
Reference in New Issue