PDA

View Full Version : modal dialog and borderlayout inside a borderlayout tab!!!



vtswingkid
22 Feb 2007, 10:20 AM
Is it possible to do a modal dialog that only impacts its parent? Or are we still forced to place the dialog in the document body?

EDIT:
I suppose I can find a clever way to do what i want by using Element.mask and unmask.

Something like this....
Place a dialog and container div in the tab.
Put all the meat in the container div.
When I dialog is opened place it in the dialog div and mask the container div.
I think that should do it.

Any better ideas? Maybe this could be built in to dialog...

EDIT:
Here is my scenario and solution psuedo format....

I have N, W, C border layout.
Various tabs are open in C region.
One tab has a border layout and a dialog box open.
Using getRegion(...).el.mask() I disabled each region.
I used getNextSibling() from regions to find any split elements and and used mask to disable them.
....
Finishing the dialog unmaskes all of the elements. This simulates a modal dialog withen a tab for me.

Hope this helps anyone... Oh here is a snippet of code for masking and unmasking...



Ext.get('someTabId').createChild({id:'dialogId', tag:'div'});
layout = new Ext.BorderLayout("someTabId",{...
...
dialog = new Ext.BasicDialog('dialogId', {
...
layout.getRegion('north').el.mask();
layout.getRegion('west').el.mask();
Ext.get(layout.getRegion('west').el.getNextSibling()).mask(); //mask split bar
layout.getRegion('center').el.mask();



use unmask to reverse this.

jack.slocum
22 Feb 2007, 4:40 PM
That's a lot of masking. :)