D
D
Dmitry Petrik2014-11-18 12:14:31
css
Dmitry Petrik, 2014-11-18 12:14:31

Yii. Styling the CJuiTabs widget. How to change style?

Everything seemed obvious...

$this->beginWidget('zii.widgets.jui.CJuiTabs',array(
  'id'=>'tabs',
        'cssFile'=>'mystyle.css',
        'htmlOptions'=> array('class'=>'tabbable tabbable-custom boxless',),
));

But in fact, in addition to the mystyle.css file, jquery-ui.css is also included. The
widget class is also obtained
tabbable tabbable-custom boxless ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible

Those. the standard set of classes (ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible) is not replaced as it should be, but supplemented by my classes.
Just trying to figure it out, am I the only one with such problems or is it a common "disease"?
Update
In general, everything is sad. It looks like CJuiTabs and Yii are not good friends.
To remove CJuiTabs styles in the config, add
'components'=>array(
                'clientScript' => array(
                    'scriptMap' => array(
                          'jquery-ui.css' => false,
                    )
                  ),
)

And then we start editing jquery-ui.min.js
We find the class "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" in the code, change it to our own. Etc.
I hope there is a more elegant solution. This question is still open :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Tarasenko, 2014-11-18
@STarasenko

I dare to guess that something like this.
$this->widget('zii.widgets.jui.CJuiTabs', array(
...
'themeUrl'=>'/css/jquery-ui-1.8/themes',
'theme'=>'redmond',
.. .
);
PS Haven't tried

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question