Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Tinebase): westpanel state was not preserved
Browse files Browse the repository at this point in the history
Change-Id: I3edfe1f07231a8e41a9f74abdcae300564b510e3
Reviewed-on: http://gerrit.tine20.com/customers/14879
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
  • Loading branch information
corneliusweiss committed Dec 2, 2019
1 parent 1b17afe commit 062ef52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tine20/Calendar/js/WestPanel.js
Expand Up @@ -25,6 +25,8 @@ Tine.Calendar.WestPanel = Ext.extend(Tine.widgets.mainscreen.WestPanel, {
cls: 'cal-tree',
canonicalName: 'Event',

defaultCollapseContainerTree: true,

getAdditionalItems: function() {
return [
Ext.apply(this.getAttendeeFilter(), this.defaults),
Expand Down
13 changes: 9 additions & 4 deletions tine20/Tinebase/js/widgets/mainscreen/WestPanel.js
Expand Up @@ -72,7 +72,12 @@ Ext.extend(Tine.widgets.mainscreen.WestPanel, Ext.ux.Portal, {
* west panel has containerTreePanel (defaults to null -> autodetection)
*/
hasContainerTreePanel: null,


/**
* @cfg {Boolean} defaultCollapseContainerTree
*/
defaultCollapseContainerTree: false,

/**
* @cfg {Bool} hasFavoritesPanel
* west panel has favorites panel (defaults to null -> autodetection)
Expand Down Expand Up @@ -158,8 +163,8 @@ Ext.extend(Tine.widgets.mainscreen.WestPanel, Ext.ux.Portal, {
var collection = this.getPortalColumn().items,
c = new Array(collection.getCount()), k = collection.keys, items = collection.items;

// sd not apply broken state
if (_.compact(state.order).length < items.length) {
// do not apply broken state
if (_.remove(state.order, function(v) {return _.isNumber(v) && !_.isNaN(v)}).length < items.length) {
return;
}

Expand Down Expand Up @@ -339,7 +344,7 @@ Ext.extend(Tine.widgets.mainscreen.WestPanel, Ext.ux.Portal, {

items.push(Ext.apply(this.getContainerTreePanel(), {
title: isContainerTreePanel ? containersName : false,
collapsed: isContainerTreePanel
collapsed: isContainerTreePanel && this.defaultCollapseContainerTree
}, this.defaults));

}
Expand Down

0 comments on commit 062ef52

Please sign in to comment.