1. #71
    Ext User
    Join Date
    Jul 2007
    Posts
    29
    Vote Rating
    0
    farracha is on a distinguished road

      0  

    Default


    I modified your script to accomplish my needs.

    Code:
    this.win = new Ext.ux.DockWindow({
    			id: c.id + "_win",
    			layout:'fit',
    			plain: true,
    			title: c.title,
    			ddGroup: this.ddGroup,
    			panel: c,
    			stateful: true,
    			collapsible: c.collapsible,
    			closable: c.closable,
    			closeAction: c.closeAction,
    			hidemode: 'visibility',
    			tools: c.tools,
    			constrain: this.constrain == true ? this.constrain : false,
    			constrainHeader: this.constrainHeader == true ? this.constrainHeader : false,
    			width: this.width,
    			height: this.height
    		});
    And for the new tools I might want when the panels are on an accordion, I altered the wrap function
    Code:
    wrap: function(config) {
    		var cfg = {title: this.title, closable: this.closable, border:false, items: this, layout:'fit', wrapped: this};
    		if(this.closable) 
    		 {
    			cfg.tools = [
    			{
    				id:'close'
    				,handler: function(e, target, panel){
    					var w = panel.wrapped;
    					if(w.closeAction == 'hide') {
    						w.undock();
    						w.win.hide();
    					}
    					else {
    						var ct = panel.ownerCt;
    						ct.remove(panel, true);
    						ct.doLayout();
    					}
    				}
    			},
    			{
    				id:'left'
    				,handler: function(e, target, panel){
    					var w = panel.wrapped;
    					w.undock();
    				}
    			}];
    		}
    		Ext.applyIf(cfg, config);
    		this.wrapper = new Ext.Panel(cfg);
    		return this.wrapper;
    	},
    I have set the fill property to false on the accordion, but the panels still fills all the space. When you have only two panels for example, the second one is "missed" in the bottom.
    Any suggestion why the fill is always on?


    Thanks

  2. #72
    Ext User
    Join Date
    Sep 2009
    Posts
    1
    Vote Rating
    0
    adlakha.vaibhav is on a distinguished road

      0  

    Default problem while clicking on dockable panels

    problem while clicking on dockable panels


    When i use this plugin with ext-all-debug.js shipped with ext3.0, the panel clicks do not happen correctly, i can only select the tab by clicking on bottom left corner. However this works fine with ext2.1 the difference is dedug.js, no changes were required to the script i tried. Has someone run into a similar issue.

  3. #73
    Ext User
    Join Date
    Jun 2009
    Posts
    15
    Vote Rating
    0
    xLP is on a distinguished road

      0  

    Default


    Quote Originally Posted by adlakha.vaibhav View Post
    When i use this plugin with ext-all-debug.js shipped with ext3.0, the panel clicks do not happen correctly, i can only select the tab by clicking on bottom left corner. However this works fine with ext2.1 the difference is dedug.js, no changes were required to the script i tried. Has someone run into a similar issue.
    Hi,

    I'm having this problem too, on several computers and browsers (IE, FF).
    A colleague told me he couldn't encounter the bug, but maybe he was always clicking some corner (I wasn't aware you could activate by clicking lower left corner of the tab until I read your post).

    This seems linked to a change in ExtJS, I don't know where, I traced inside the code and couldn't find something different comparing to ExtJS 2.1.

    Disabling line 25553 in ext-all-debug.js
    Code:
    this.DDM.stopEvent(e);
    would fix it, at least in some conditions, BUT:
    - I don't like touching ext-all file
    - This line is present in 2.1 and doesn't seem to cause any problem...

    I finally found another way, and I'd love to get DockPanel author opinion about it: in DockTabPanel, use the following:

    Code:
        _initDD: function(c) {
            var tabHeader = Ext.get(this.getTabEl(c));
            c.win.dd.setOuterHandleElId(tabHeader.id);
        
        Ext.EventManager.on(tabHeader.id, "mousedown",
                    this.onStripMouseDown, this);
        
            c.docked = true;
        },
    (You'll note I just added one line).

    Why? Tracing, it appeared that with ExtJS 2.1, the drag handler code of ExtJS would get executed (some "handleMouseDown"), and then onStripMouseDown would get executed too, whereas in ExtJs 3, only handleMouseDown gets executed... (which is also the reason why I try commenting the "stopEvent").
    So well, I tried adding the event again, and this fixed the problem.

    Maybe the event should be unregistered somewhere else, don't know... Monsterjoe, any tip?

    Also, one more info, according to my tests, using ExtJS 3, onStripMouseDown is never executed on a tab panel which has DockPanel as plugin...

  4. #74
    Sencha User
    Join Date
    Mar 2010
    Posts
    49
    Vote Rating
    0
    chaddjohnson is on a distinguished road

      0  

    Default


    Thank you xLP. I was experiencing the same issue, and this remedies the situation. No idea if it's the "right" solution, but nevertheless, I can click on tabs and give them focus now.

  5. #75
    Sencha User
    Join Date
    Mar 2009
    Posts
    10
    Vote Rating
    0
    mike.tallroth is on a distinguished road

      0  

    Default Cannot read property 'disabled' of undefined

    Cannot read property 'disabled' of undefined


    After successfully applying the patch provided by xLP, the tab focus worked properly, but then I was getting an error from the findTargets() function in ext-all-debug.js, which was being called by the onStripMouseDown event handler.

    Cannot read property 'disabled' of undefined

    It turns out with the patch applied, when you try to close the tab (not drag it or focus it), the onStripMouseDown handler gets called a second time, after the first call already destroyed the tab.

    By adding one more line to xLP's patch, this time in the onStripMouseDown handler, one more gotcha is fixed. This was using 3.0.3 only, haven't tested anything else.

    Code:
            if(t.close){
                if(t.item.closeAction == 'hide') {
                    t.item.undock();
                    t.item.win.hide();
                    t.item.saveState();
                }
                else {
                    this.remove(t.item);
                }
                e.stopPropagation();
                return;
            }
    Note, I've only added one line, the call to stopPropagation.

  6. #76
    Ext User
    Join Date
    Jul 2010
    Posts
    4
    Vote Rating
    0
    Joanne is on a distinguished road

      0  

    Default


    Thank you for your suggestion, Mike! I also got the same problem and your solution works well, even for Ext 3.2.1.

    Quote Originally Posted by mike.tallroth View Post
    After successfully applying the patch provided by xLP, the tab focus worked properly, but then I was getting an error from the findTargets() function in ext-all-debug.js, which was being called by the onStripMouseDown event handler.

    Cannot read property 'disabled' of undefined

    It turns out with the patch applied, when you try to close the tab (not drag it or focus it), the onStripMouseDown handler gets called a second time, after the first call already destroyed the tab.

    By adding one more line to xLP's patch, this time in the onStripMouseDown handler, one more gotcha is fixed. This was using 3.0.3 only, haven't tested anything else.

    Code:
            if(t.close){
                if(t.item.closeAction == 'hide') {
                    t.item.undock();
                    t.item.win.hide();
                    t.item.saveState();
                }
                else {
                    this.remove(t.item);
                }
                e.stopPropagation();
                return;
            }
    Note, I've only added one line, the call to stopPropagation.

  7. #77
    Sencha User
    Join Date
    May 2011
    Posts
    7
    Vote Rating
    0
    e-get2 is on a distinguished road

      0  

    Exclamation in Extjs v4 ???

    in Extjs v4 ???


    I can't made DockPanel works in Extjs v4, this is the error:

    Uncaught TypeError: Cannot call method 'onDock' of undefined

    I'm using the code download of the post...

    For Extjs 2.2 works.... but for v4 don't works...

    When we will have an update???

    This plugin is very necessary.