替换默认的jquery-ui.css路径

时间:2015-09-05 18:09:31

标签: php yii

我正在尝试让Yii 1.1.16读取我的自定义jQuery-ui.min.css文件,而不是默认提供的文件。

我尝试在我的clientScript中修改main.php,但似乎无法让它发挥作用。

这是我的代码

'components'=>array(
        'clientScript'=>array(
            'scriptMap' => array(
                'jquery-ui.css' => '/css/jquery-ui.min.css',
            ),
            'packages'=>array(
                'jquery'=>array(
                    'baseUrl'=>'js/',
                    'js'=>array('jquery.min.js'),
                ),
               'jquery.ui'=>array(
                    'baseUrl'=>'',
                    'js'=>array('js/jquery-ui.min.js'),
                    'depends' => array('jquery')
                ),
            ),

每次调用CJuiButton小部件时,它都会添加默认的css。任何解决方案?

1 个答案:

答案 0 :(得分:1)

确保在Diff diff = new Diff(doc1, doc2); diff.overrideDifferenceListener(new DifferenceListener() { ... @Override public int differenceFound(Difference difference) { if(difference.getId() == DifferenceConstants.HAS_CHILD_NODES_ID) { Node controlNode = difference.getControlNodeDetail().getNode(); Node testNode = difference.getTestNodeDetail().getNode(); if(controlNode.getChildNodes().getLength() == 0) { Node childNode = testNode.getChildNodes().item(0); // note the trim method call if(childNode.getNodeType() == Node.TEXT_NODE && childNode.getTextContent().trim().isEmpty()) { return DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL; } } else { // we're sure the other node has children in the else part Node childNode = controlNode.getChildNodes().item(0); if(childNode.getNodeType() == Node.TEXT_NODE && childNode.getTextContent().trim().isEmpty()) { return DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL; } } } return DifferenceListener.RETURN_ACCEPT_DIFFERENCE; } }); 中设置了正确的配置(main.php):

index.php

如果不起作用,请在$config = dirname(__FILE__) . '/../app/config/main.php'; Yii::createWebApplication($config)->run(); 小部件调用之前添加代码:

zii.widgets.jui.CJuiButton