Yii 1.1: Using jQuery UI 1.8.10 themes with Yii 1.1.6

2 followers

When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }

to:

.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }

The widgets won't look perfect (for which you need to play around some more) but they'll at least be visible.

I hope this saves someone's time.

Total 7 comments

#2936 report it
a110y at 2011/02/27 05:31am
RE: RE: RE: It's simpler than it seems

I was referring to your comment: "this wont work with custom themes." and not "simply download a theme from themeroller and use the jquery-ui.css found here http://blog.jqueryui.com/2010/11/jquery-ui-1-8-6/"

The official themes are bound to work; apologies if it was unclear.

#2935 report it
Codehack at 2011/02/26 03:45pm
RE: RE: It's simpler than it seems

My method works for all themes that are in themeroller. if you read my reply carefully you will notice that i mention themeroller specifically. I'm using 4 of those themes without issues.

#2926 report it
a110y at 2011/02/26 04:59am
RE: It's simpler than it seems

Are you saying that by logic or experience? It worked for me when using the Aristo custom theme; thus, my solution is empirical.

#2921 report it
Codehack at 2011/02/25 04:22pm
It's simpler than it seems

simply download a theme from themeroller and use the jquery-ui.css found here http://blog.jqueryui.com/2010/11/jquery-ui-1-8-6/

this wont work with custom themes.

#2919 report it
Trejder at 2011/02/25 01:51pm
jQuery UI Update Scheduled

Since you're lazy :], as you say, you should be interested that jQuery UI update to 1.8.10 has been scheduled to 1.1.7 release! :] More information here.

#2918 report it
a110y at 2011/02/25 10:21am
Yes of course

Yes, of course you can do that. But I wasn't so eager about changing multiple lines instead of one ... I'm lazy. :p

#2915 report it
Trejder at 2011/02/25 05:49am
jQuery 1.8.6 vs. 1.8.10

I write it in a separate comment to not to mess two things together. About your problem described in this article - you can also, instead of doing, what you wrote here, force your Yii not to load jQuery on-board (1.8.6) and load your own copy of jQuery 1.8.10 just as you would load any other JavaScript code. There are a lot of post on the forum how to force Yii not to load any core CS libs.

If you manually update your jQuery UI version this way, you should have your stylling problems solved, if I'm not mistaken.

Leave a comment

Please to leave your comment.

Write new article