singleExpand: false,
listeners: {
selectionchange: function(treeList, selection) {
- var me = this.up('panel');
- me.suspendLayout = true;
- me.activateCard(selection.data.id);
- me.suspendLayout = false;
- me.updateLayout();
+ let view = this.up('panel');
+ view.suspendLayout = true;
+ view.activateCard(selection.data.id);
+ view.suspendLayout = false;
+ view.updateLayout();
},
itemclick: function(treelist, info) {
var olditem = treelist.getSelection();
menu.setSelection(selection);
return cardid;
}
+ return '';
},
activateCard: function(cardid) {
var activeTab; // leaving this undefined means items[0] will be the default tab
if (stateid) {
- var state = me.sp.get(stateid);
+ let state = me.sp.get(stateid);
if (state && state.value) {
// if this tab does not exist, it chooses the first
activeTab = state.value;
var acard = me.getLayout().getActiveItem().itemId;
// get the itemid of the new value
var ncard = state.value || me.firstItem;
- if (ncard && acard != ncard) {
+ if (ncard && acard !== ncard) {
// select the chosen item
menu.setSelection(root.findChild('id', ncard, true) || root.firstChild);
}