1. #1
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default Remove dock from kitchen sink.

    Remove dock from kitchen sink.


    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.



    Code:
    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) {
                this.navigationPanel.hide();
            }     
    
            if(!Ext.is.Phone) {
                if(this.navigationBar.isVisible()) {
                    this.navigationBar.hide();
    				this.navigationBar.doComponentLayout();
                }
            }
    		
    		if (card) {
                this.setCard(card, anim || 'slide');
                this.currentCard = card;
                if(card.alias == 'admin') {
                    bookSettings.onBackTap();
                    card.setCard(bookSettings,{type: 'slide', direction: 'right'});
                } else if(card.alias == 'sell') {
                    card.setCard(openNestedList,'slide');
                }
                if(card.alias == 'book') {
                    card.setCard(expressClientPanel,{type: 'slide', direction: 'right'});
                }
            }
    
            if (title) {
                this.navigationBar.setTitle(title);
            }
            this.toggleUiBackButton();
            this.fireEvent('navigate', this, record);
        },

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,821
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You need to do the doComponentLayout on the parent of the dock not the dock itself.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    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. #4
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    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. #5
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Just got it fixed. I just hide the dock while it was created and everything is fine.

Similar Threads

  1. Kitchen sink backButton ui
    By Michou in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 1 Oct 2010, 3:35 AM
  2. TabBar to contain kitchen sink example?
    By omulriain in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 19 Sep 2010, 2:28 PM
  3. background image for kitchen sink overlay.js
    By drossmedia in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 16 Sep 2010, 5:23 AM
  4. Remove a dock in kitchen sink
    By blessan in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 14 Sep 2010, 8:43 PM
  5. How to add class in Kitchen Sink 0.94?
    By blessan in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 9 Sep 2010, 9:18 PM

Thread Participants: 1