Skip to content

Instantly share code, notes, and snippets.

@MihailoJoksimovic
Created March 11, 2014 13:53
Show Gist options
  • Save MihailoJoksimovic/9486065 to your computer and use it in GitHub Desktop.
Save MihailoJoksimovic/9486065 to your computer and use it in GitHub Desktop.
Ext.define('RfqSe.view.MaterialDetails', {
extend: 'Ext.panel.Panel',
alias: 'widget.materialdetails',
margin: '5 0',
rfq: null,
tabToOpen: 'general',
defaults: {
xtype: 'panel',
layout: 'fit',
collapsed: true
},
layout: {
// layout-specific configs go here
type: 'accordion',
animate: true
},
initComponent: function() {
var me = this;
this.title = "DETAILDATEN";
this.items = [{
title: 'Allgemeine Daten',
collapsed: (me.tabToOpen == 'general') ? false : true, // Collapsed unless 'general' tab should be open
items: [{
padding: 5,
xtype: 'materialdetailsgeneraldata',
rfq: me.rfq
}]
},{
title: 'Dokumente',
collapsed: (me.tabToOpen == 'documents') ? false : true, // Collapsed unless 'documents' tab should be open
items: [{
padding: 5,
xtype: 'materialdetailsdocuments',
rfq: me.rfq
}]
},{
title: 'Positionen',
collapsed: (me.tabToOpen == 'positions') ? false : true, // Collapsed unless 'positions' tab should be open
items: [{
padding: 5,
xtype: 'materialdetailspositions',
rfq: me.rfq
}]
}];
this.callParent(arguments);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment