PDA

View Full Version : Potential Release 4 and draw issues



ericd
31 Dec 2006, 6:22 AM
Morning all,

I know that release 4 is not official yet but I have a dialog that basically is the same as Jack's NestedLayout sample that use to work using the current official release and now things do not display properly. For example, refer to said above NestedLayout example, the west ContentPanel title bar (Navigation) does not show up anymore until close it (<<) then reopen it (>>). Afterwards, its ok. Same applies to the (More Information) panel. I need to close (<<) then reopen it (>>) and things get drawn properly

I know it might be issues with 4 not being official yet, but I need to use the Tree component that Jack put together. Any clues?

I know an image would help and I will get an http link opened on my servers. Right now, you need to have RSA keys that I generate to access anything here.. I am a security freak :)

Eric

ericd
31 Dec 2006, 7:10 AM
Problem already reported.... sorry bout this

jack.slocum
31 Dec 2006, 7:23 AM
That's ok. Are you set up for svn yet? I am generally on top of bugs very quickly in the pre-release code.

ericd
31 Dec 2006, 7:30 AM
Yes sir, I am.... getting the brand spanking new release as we speak.. thanks

jack.slocum
31 Dec 2006, 7:36 AM
Some new stuff I have been working on (Ext.MessageBox):

http://yui-ext.com/playpen/yui-ext.0.40/examples/dialog/msg-box.html

ericd
31 Dec 2006, 7:37 AM
Got the latest and greatest, rebuilt everything.... same issue :( mmmm

ericd
31 Dec 2006, 7:42 AM
I should stop replying to myself :shock: Things are ok now... I just moved around the order of the scripts about and all is ok.... i will have to clean this up someday!!! DUH

But I still have the same problem as before (never actually reported it it... i prefer to figure things out myself) that when I resize the dialog, the ContentPanel dont resize with it, but if I minimize (<<) a panel then restore (>>) it, things get resize properly...

jack.slocum
31 Dec 2006, 7:42 AM
This is running the latest SVN code:

http://yui-ext.com/playpen/yui-ext.0.40/examples/layout/complex.html

Did you rebuild your css and js?

ericd
31 Dec 2006, 7:48 AM
All is ok (things get redrawn no problem anymore) the resize issue remains. And yes, I rebuilt css and js The only diff from your sample is that your sample is the whole body and mine a dialog

jack.slocum
31 Dec 2006, 7:56 AM
Which resize issue?

ericd
31 Dec 2006, 8:05 AM
Good point.... I have a resizable dialog (eventually will be a window) in which I implemented your Complex example. When I resize the dialog, the ContentPanels/Toolbar do not resize themselves with the dialog, unlike your example, where the ContentPanels resize themselves to match the document.body. This is getting me thinking, I should review my divs....

Animal
31 Dec 2006, 9:47 AM
It needs to be a layoutDialog: http://www.yui-ext.com/playpen/yui-ext.0.40/docs/output/YAHOO.ext.LayoutDialog.html

ericd
31 Dec 2006, 10:25 AM
It is !

// Create the Search window
m_LLBSearchWindow = new YAHOO.ext.LayoutDialog("search-dialog", {
modal:false,
width:800,
height:600,
shadow:true,
minWidth:300,
minHeight:250,
resizable:true,
proxyDrag:true,
center:{autoscroll:true}
});

jack.slocum
31 Dec 2006, 4:17 PM
You might want to see what you are doing different than these two examples which use a layout dialog and have nested layouts as well:

http://www.yui-ext.com/playpen/yui-ext.0.40/examples/dialog/layout.html
http://www.yui-ext.com/playpen/yui-ext.0.40/examples/view/chooser.html

ericd
1 Jan 2007, 8:40 AM
Thanks, got it.. your example worked wonders. I had created a BorderLayout on top of my dialog. Wiping out the BorderLayout and constructing as per your example solved the issue. Great way to start the NewYear :)

jclawson
3 Feb 2007, 11:41 PM
The example links you provided do not contain a nested layout. IE: YAHOO.ext.NestedLayoutPanel. I need to add a nested layout panel to a dialog. The layout dialog is not updating the size of the nested layout panel. How do you solve this issue?

ericd
4 Feb 2007, 5:17 AM
Here is some code.... What I still need to do (figure out) is that I want all my divs to be named automatically and they have to be unique, since I want to support multiple instances of a same window. I did try the auto generate thing but it did not really work (ok, I did not spend much time on it)

I hope this helps.....

// Window specific stuff
var initWindowLayout = function()
{
//
var vdm_master = document.getElementById("master_location");

// Window setup
var WindowRoot = document.createElement("div");
WindowRoot.id = m_UniqueWindowIdentifier;
vdm_master.appendChild(WindowRoot);

var windowHeader = document.createElement("div");
windowHeader.id = m_WindowHeaderID;
windowHeader.className = "ydlg-hd";
windowHeader.appendChild(document.createTextNode("Hello"));
windowHeader.align = "left";
WindowRoot.appendChild(windowHeader);

//
var windowBody = document.createElement("div");
windowBody.id = m_WindowBodyID;
windowBody.className = "ydlg-bd";
WindowRoot.appendChild(windowBody);
};

var initLayout = function()
{
var windowBody = document.getElementById(m_WindowBodyID);

var WindowLayout = document.createElement("div");
WindowLayout.id = "container";
windowBody.appendChild(WindowLayout);

// Layout setup
var toolbarLocation = document.createElement("div");
toolbarLocation.id = "toolbarLocation";
WindowLayout.appendChild(toolbarLocation);

var toolbar = document.createElement("div");
toolbar.id = "aToolbar";
toolbarLocation.appendChild(toolbar);

//
var LocationTree = document.createElement("div");
LocationTree.id = "aTree";
WindowLayout.appendChild(LocationTree);

var LocationPanel = document.createElement("div");
LocationPanel.id = "aPanel";
WindowLayout.appendChild(LocationPanel);

//
var contentLocation = document.createElement("div");
contentLocation.id = "content";
WindowLayout.appendChild(contentLocation);

//
var content1Location = document.createElement("div");
content1Location.id = "content1";
WindowLayout.appendChild(content1Location);

//
var content2Location = document.createElement("div");
content2Location .id = "content2";
WindowLayout.appendChild(content2Location );

//
var content3Location = document.createElement("div");
content3Location .id = "content3";
WindowLayout.appendChild(content3Location );

//
var statusLocation = document.createElement("div");
statusLocation.id = "status";
WindowLayout.appendChild(statusLocation);
};

var createLayout = function()
{
// Set up the window internal layout
var Layout = m_Window.getLayout();
Layout.beginUpdate();

// Set up toolbars
var Toolbar = new YAHOO.ext.Toolbar('Toolbar');

Button = Toolbar.addButton({text: 'aaa', className: 'view-tab', click: aaa.createDelegate(this)});

var toolbarLocation = new YAHOO.ext.ContentPanel('toolbarLocation', {fitToFrame:true, closable: false, toolbar:Toolbar});
Layout.add('north', toolbarLocation);

// Set up Tree view
var treePanel = new YAHOO.ext.ContentPanel('Tree', {title: 'Tree', fitToFrame:true, closable: false});
treePanel.getUpdateManager().update({version:"1.0", session:"hi there", url:a_url, scripts:true}); Layout.add('west', treePanel);

// Set up another Tree view
var anotherPanel = new YAHOO.ext.ContentPanel('Another tree', {title: 'Another Tree View', fitToFrame:true, closable: false});
anotherPanel.setUrl(b_url, {version:"1.0", session:"hi there"}, true);
Layout.add('west', anotherPanel );

// Set up Status view
var statusPanel = new YAHOO.ext.ContentPanel('status', {fitToFrame:true, closable: false});
statusPanel .setUrl(c_url, {version:"1.0", session:"hi there"}, true);
Layout.add('south', statusPanel );

// Set up the search input view and results view
var innerLayout = new YAHOO.ext.BorderLayout('content', {
hideOnLayout: true,
north: {
initialSize:70,
titlebar:true
},
center: {
split:true,
initialSize:200,
autoScroll:true,
collapsible:false,
titlebar:true,
animate:true
},
south: {
split:true,
initialSize:200,
autoScroll:true,
collapsible:true,
titlebar:true,
animate:false
}
});

// Set up a view
var aPanel = new YAHOO.ext.ContentPanel('content1', {title: 'content1', closable: false});
aPanel .getUpdateManager().update({version:"1.0", session:"hi there", url:d_url, scripts:true});
innerLayout.add('north', aPanel );

// Set up another view
var bPanel = new YAHOO.ext.ContentPanel('content2', {title: 'content2', pinned:false, dynamic:true, closable:false});
bPanel.getUpdateManager().update({version:"1.0", session:"hi there", url:e_url, scripts:true});
innerLayout.add('center', bPanel);

// Set up and another
lastPanel = new YAHOO.ext.ContentPanel('content3', {title: 'content3', pinned:false, dynamic:true, closable:false});
lastPanel .getUpdateManager().update({version:"1.0", session:"hi there", url:f_url, scripts:true});
innerLayout.add('south', lastPanel );

//
Layout.add('center', new YAHOO.ext.NestedLayoutPanel(innerLayout));
Layout.getRegion('west').showPanel('content1');
Layout.endUpdate();
};

createWindow : function(uniqueTagID)
{
initWindowLayout();
initSearchLayout();
initEvents();

// Create the Search window
m_Window = new YAHOO.ext.Window(m_UniqueWindowIdentifier, {
modal:false,
width:800,
height:600,
shadow:true,
minWidth:300,
minHeight:250,
resizable:true,
proxyDrag:true,
center:{autoscroll:true},
hideOnLayout: true,
maximizable:true,
minimizable:true,
north: {
split:false,
initialSize:25,
titlebar:false
},
west: {
split:true,
initialSize:225,
minSize:175,
maxSize:400,
titlebar:true,
collapsible:true,
animate:true,
autoScroll:true,
cmargins:{top:0,bottom:2,right:2,left:2}

},
center: {
collapsible:false
},
south: {
split:true,
initialSize:100,
minSize:100,
maxSize:200,
titlebar:true,
collapsible:true,
animate:true,
autoScroll:true
}
});

// Create the layout
createLayout();

m_Window.show();
}