Results 1 to 4 of 4

Thread: Title-bar click collapse results in incorrect layouting

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User Izhaki's Avatar
    Join Date
    Apr 2009
    Location
    London
    Posts
    118
    Vote Rating
    14
      0  

    Default Title-bar click collapse results in incorrect layouting

    I've notice that when clicking on a title bar of a collapsed panel (in border layout), the resultant layout is a mess (tool button + collapsed panel stay down).

    All is good if one presses the collapse/expand button, but not the title.

    You can see this on the 3.3 examples: Layout Managers > Layout Browser > Basic > Border, by collapsing the footer and then clicking on the collapsed panel.

  2. #2
    Sencha User Izhaki's Avatar
    Join Date
    Apr 2009
    Location
    London
    Posts
    118
    Vote Rating
    14
      0  

    Default

    Well, not sure I'm doing it right, but this fix work for me:

    Code:
    Ext.override(Ext.layout.BorderLayout.Region, {
        getCollapsedEl : function(){
            if(!this.collapsedEl){
                if(!this.toolTemplate){
                    var tt = new Ext.Template(
                         '<div class="x-tool x-tool-{id}">&#160;</div>'
                    );
                    tt.disableFormats = true;
                    tt.compile();
                    Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt;
                }
                this.collapsedEl = this.targetEl.createChild({
                    cls: "x-layout-collapsed x-layout-collapsed-"+this.position,
                    id: this.panel.id + '-xcollapsed'
                });
                this.collapsedEl.enableDisplayMode('block');
    
                if(this.collapseMode == 'mini'){
                    this.collapsedEl.addClass('x-layout-cmini-'+this.position);
                    this.miniCollapsedEl = this.collapsedEl.createChild({
                        cls: "x-layout-mini x-layout-mini-"+this.position, html: "&#160;"
                    });
                    this.miniCollapsedEl.addClassOnOver('x-layout-mini-over');
                    this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
                    this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true});
                }else {
                    if(this.collapsible !== false && !this.hideCollapseTool) {
                        var t = this.expandToolEl = this.toolTemplate.append(
                                this.collapsedEl.dom,
                                {id:'expand-'+this.position}, true);
                        t.addClassOnOver('x-tool-expand-'+this.position+'-over');
                        t.on('click', this.onExpandClick, this, {stopEvent:true});
                    }
                    if(this.floatable !== false || this.titleCollapse){
                       this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
                       this.collapsedEl.on("click", this.onExpandClick, this);
                    }
                }
            }
            return this.collapsedEl;
        },
    });

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    1
    Vote Rating
    0
      0  

    Default

    Same here too. Your fix is working great, thanks. I wonder why nobody noticed it yet...

  4. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Great Job ?

    It just fixes the problem of my Webpage. thanks a llllllot.

Similar Threads

  1. Replies: 1
    Last Post: 10 Aug 2011, 1:01 PM
  2. Replies: 2
    Last Post: 31 Oct 2010, 2:11 PM
  3. [3.1.1] Title not hidden on collapse of regions.
    By jeroenooms in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 21 Mar 2010, 10:07 PM
  4. Replies: 2
    Last Post: 17 Dec 2008, 9:45 AM
  5. Collapse and Title
    By Lloyd K in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Nov 2007, 10:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •