View Full Version : Remove dock from kitchen sink.

1 Oct 2010, 2:13 AM
My app follows the kitchen sink code structure.
My inner cards have top docks of their own, so I want to remove the top toolbar that appears for every card in the kitchen sink. I was able to hide the toolbar. But when I try to make the card resize and cover the empty space,
it doesnt comeout right. My panel fills up the top space but then there is unfilled space in the bottom.

Can someone help me with this. I tried doLayout and doComponentLayout and all the inner cards but they didnt work.

This is how I got this much done. This is the modified portion of index.js in the kitchen sink demo.


onNavPanelItemTap: function(subList, subIdx, el, e) {
var store = subList.getStore(),
record = store.getAt(subIdx),
recordNode = record.node,
nestedList = this.navigationPanel,
title = nestedList.renderTitleText(recordNode),
card, preventHide, anim;

if (record) {
card = record.get('card');
anim = record.get('animation');
preventHide = record.get('preventHide');

if (Ext.orientation == 'portrait' && !Ext.is.Phone && !recordNode.childNodes.length && !preventHide) {

if(!Ext.is.Phone) {
if(this.navigationBar.isVisible()) {

if (card) {
this.setCard(card, anim || 'slide');
this.currentCard = card;
if(card.alias == 'admin') {
card.setCard(bookSettings,{type: 'slide', direction: 'right'});
} else if(card.alias == 'sell') {
if(card.alias == 'book') {
card.setCard(expressClientPanel,{type: 'slide', direction: 'right'});

if (title) {
this.fireEvent('navigate', this, record);

1 Oct 2010, 6:41 AM
You need to do the doComponentLayout on the parent of the dock not the dock itself.

3 Oct 2010, 8:24 PM
I tried doing on a lot of things like this.currentCard,this.navigationPanel etc. But there always a space in the first card switch and then everything go alright in the card switch after that. Could some one help me with this. I havent been able to fix this since 0.93 version.

4 Oct 2010, 10:28 PM
Does someone know how to fix this. Still can find a way to get it done. The code wrote earlier solved this in version 0.93 but since then I just cant get it done.

5 Oct 2010, 2:35 AM
Just got it fixed. I just hide the dock while it was created and everything is fine.