PDA

View Full Version : Sidebar Titles



jeffwood
1 Nov 2006, 8:42 AM
So, I understand using

layout.add('east', new YAHOO.ext.ContentPanel('suggested', {title: 'Suggested Feeds', fitToFrame:true}));

to create the title for a pane ... ( using )...

east: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true,
autoScroll:false,
useShim:true,
collapsed:true,
cmargins: {top:0,bottom:2,right:2,left:2}
},

... but that doesn't seem to put the name on the collapsed bar where you're example shows 'Suggested Feeds' and 'My Feeds' ... etc.

Any tips on how to get that working ?

Thanks for such a wonderful toolkit ... I look forward to your response.

moraes
1 Nov 2006, 9:41 AM
Hi, Jeff. The title that appears on the feed-viewer is set on CSS:


.ylayout-collapsed-east{
background-image:url(images/suggested.gif);
background-repeat:no-repeat;
background-position:center;
}

Basically, you should add a class .ylayout-collapsed-[region] with the image definition.

jeffwood
1 Nov 2006, 9:48 AM
In the example it does mouse overs ... would that also be a style thing ?

moraes
1 Nov 2006, 10:25 AM
The hover effect is done by the *-over class:


.ylayout-collapsed-over{
cursor:pointer;
background-color:#d9e8fb;
}[/code]

jeffwood
1 Nov 2006, 11:18 AM
How might one go about adding support for multiple collapsed side sections ... only one showing, but ...

and additionally, what about outlook bar style functionality for the sidebar regions

jack ??? ( PLEASE!!!! )

jd

jack.slocum
1 Nov 2006, 10:03 PM
You mean where each tab would be visible and able to be individually clicked? It could be done but it would take quite a bit of code (too much to be worth it). Also each tab would need it's own sideways image (also a pain).

jeffwood
2 Nov 2006, 1:14 AM
Actually, what I'm referring to I can do with straight HTML in the pane ... so, it's not what I was thinking ...

I figured the multiple sidebar images would be a pain ... but, I think I've got a solution in mind now.

Thanks for the input & feedback ...

jack.slocum
2 Nov 2006, 1:48 AM
You can always inject whatever you want into the collapse element. It's lengthy to do generically, but might be easy to do using collapsedEl.update() (if you can't do it with CSS).