So, I’ve been playing around with Yii for a while now, and, hopefully, I will see the benefits of the time I’ve put in later, when I’ve reach a certain point… I have a feeling things will be done faster later on…
Anyway, I noticed that zii.widgets.jui.CJuiButton is using jquery themes, which is all nice and dandy. However, it looks odd, when I add a CJuiButton next to a CHtml::ajaxButton! So, what I’m wondering here is, how can I change the CHtml::ajaxButton to match the CJuiButton easiest? Is setting a class enough? If so, what?
Basically, I just want to be able to match these buttons somehow, so it doesn’t look odd.
I think you could extend CJuiButton and create your own button. I’ve never done this but I think it is possible. So, you can create a new class, extends CJuiButton, and put it con components folder. And just call ext.components.CJuiButton instead of zii.widgets.jui.CJuiButton
How will that help me with the CHtml::ajaxButton? From what I can tell, the CHtml::ajaxButton button isn’t skinned/themed at all per default… looks like some default kind of button rendered straight from the browser…
You don’t happen to have anything there ready? This can’t be the first time someone thought of this. Would be nice to extend the CHtml class to theme just like CJuiButton does…
Also, I just noticed that maybe I should extend the CJuiButton class, as that uses CHtml:: internally! Would be an awesome solution, however there are a few bumps on the road inheriting from it as it throws an exception when it’s not any of the defined ones… I can catch it though, but it’s not a nice solution. Works for now though I guess…