Exemple #1
0
 /**
  * Initialize css.
  */
 public static function css()
 {
     $cs = Yii::app()->getClientScript();
     // main css
     $cs->registerCssFile(Yii::app()->request->baseUrl . '/static/css/main.css');
     // 960 css
     $cs->registerCssFile(Yii::app()->request->baseUrl . '/static/css/960.css');
     // all jquery plugins css
     //$cs->registerCssFile(Yii::app()->request->baseUrl.'/static/css/jquery-1.3.x.plugins.css');
     // jquery-ui
     if (MParams::getRegisterJqueryUI() && MPath::interfaceExists(MParams::getInterface())) {
         $cs->registerCssFile(Yii::app()->request->baseUrl . '/static/css/ui/' . MParams::getInterface() . '/jquery-ui-' . MParams::jqueryUIVersion . '.custom.css');
     }
     // use this css if you want to globally redefine jquery-ui css framework classes
     $redefineJqueryUI = dirname(Yii::app()->basePath) . DIRECTORY_SEPARATOR . 'static' . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'ui.css';
     if (file_exists($redefineJqueryUI) && filesize($redefineJqueryUI) !== 0) {
         $cs->registerCssFile(Yii::app()->request->baseUrl . '/static/css/ui.css');
     }
 }