YUI Tabs Issue

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/13/2009 9:57:22 AM
Gravatar
Total Posts 18

YUI Tabs Issue

Hi Joe,

I am just in the progress of migrating from mojoPortal 2.2.8.7 to the latest version so that we can take advantage of the new Content Workflow system, and although i've managed to upgrade the code etc, I'm having a problem with the YUI Tabs in a custom module. Basically, we have created a few modules ourselves and we used the Site Settings page as a template for using the YUI Tabs. However, now the styling doesn't seem to be applying to the tabs, and we get all the controls in a long list with the tabs at the top as links.  I'm aware that this can happen when an internet connection is not available, but an internet connection is definitely available, and the core pages that have tabs appear as expected (e.g. sitesettings.aspx).

I am now going to look through the code and try to work out what is causing it, but just wondered whether you code save me hours of trawling through code by casting your mind back, and trying to remember of anything significant has changed to how YUI tabs are implemented over the last 6 months or so (!).

Cheers,
Kev

8/13/2009 10:00:36 AM
Gravatar
Total Posts 18439

Re: YUI Tabs Issue

Make sure you are using the new Web.config not your old one and make sure you are not overriding any yui stuff in user.config, make sure you are using the stylesheetcombiner and scriptloader controls in your layout.master, compare it to skins in the /Data/skins folder.

Hope it helps,

Joe 

8/13/2009 10:04:27 AM
Gravatar
Total Posts 18439

Re: YUI Tabs Issue

Make sure the div wrapping your tabs has the css class yui-navset and make sure that some outer div has the class yui-skin-sam

Hope it helps,

Joe 

8/13/2009 10:17:37 AM
Gravatar
Total Posts 18

Re: YUI Tabs Issue

Re your first reply, I would have thought that anything amiss there would stop ALL yui tabs from displaying. Anyway, I believe all is correct in my solution re first post.

Re second reply, I thought that the yui-skin-sam class was set at runtime by the the YUIPanel control? I've looked at your sitesettings.aspx and can't see this class being set in the HTML markup.

 

8/13/2009 10:23:15 AM
Gravatar
Total Posts 18439

Re: YUI Tabs Issue

I did make a change recently to not include the yui stuff by default to reduce the number of css and js when they are not needed. If your page inherits from mojoBasePage, then in the OnInit, you can add this:

ScriptConfig.IncludeYuiTabs = true;
IncludeYuiTabsCss = true; 

or you can set thos properties directly on ScriptLoader and StyeSheetCombiner in your layout.master to make it load that stuff on every page.

Hope it helps,

Joe

8/13/2009 10:34:50 AM
Gravatar
Total Posts 18

Re: YUI Tabs Issue

Excellent, it works now.

As a suggestion, would it not make sense for the YUIPanel control to set those flags to true?

 

8/13/2009 10:44:58 AM
Gravatar
Total Posts 18439

Re: YUI Tabs Issue

Well use of YUI Panel doesn't equate always to use of YUI tabs, it only equates to using the yui-sam-skin.

I'm leaning more towards jQuery but using both YUI and jQuery leads to a lot of js and css added to the page. The only thing about the YUI tabs that I like better is that it behaves very well with nested tabs whereas jquery can get out of whack if you try to nest tabs. So I still am using the YUI tabs in admin pages but I'm generally not using it anymore for content since the jQuery tabs look nicer and have more skins. So it seems desireable by default to leave out the YUI tab stuff on public facing content system pages to keep tha pages lighter but its a little less of a concern on admin pages. But anyone who wants to use the YUI stuff in their content can easily set those properties on the ScriptLoader and StyleSheetCombiner and then it will be included on all pages. I'm just trying to improve the score using YSlow and Google PageSpeed.

Best,

Joe

8/13/2009 10:53:40 AM
Gravatar
Total Posts 18

Re: YUI Tabs Issue

That makes sense.

Re the YUI tabs, we have tried to keep our admin screen consistent with the core admin screens so that the user experience is seamless. So I guess when/if you migrate your admin pages to jQuery tabs then we will too!

Thanks for sorting this one out Joe.

Cheers,
Kev

 

You must sign in to post in the forums. This thread is closed to new posts.