Yii在Yiistrap上安装x-editable


Yii installing x-editable on Yiistrap

在我的web应用程序中,我想使用Yiistrap的x-editable。我遵循了以下链接中提到的步骤"http://x-editable.demopage.ru/".我使用的Yiistrap运行良好。但我无法安装x-editable。我收到此错误"Alias"editable.*"无效。确保它指向现有的目录或文件。"我的受保护/config/main.php文件

return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'My Web Application',
'aliases' => array(
        'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),

         'x-editable'=>realpath(__DIR__. '/../extensions/x-editable'),
    ),

    // preloading 'log' component
    'preload'=>array('log'),
    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
'bootstrap.helpers.TbHtml',
 'editable.*' //easy include of editable classes
    ),
    'modules'=>array(
        // uncomment the following to enable the Gii tool
        'gii'=>array(
            'class'=>'system.gii.GiiModule',
            'password'=>'***',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array('bootstrap.gii'),
        ),
    ),
// application components
'components'=>array(
    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),
    // uncomment the following to enable URLs in path-format
     'editable' => array(
        'class'     => 'editable.EditableConfig',
        'form'      => 'bootstrap',        //form style: 'bootstrap', 'jqueryui', 'plain' 
        'mode'      => 'popup',            //mode: 'popup' or 'inline'  
        'defaults'  => array(              //default settings for all editable elements
           'emptytext' => 'Click to edit'
         ),
         ),

这不是完整的代码,我必须编辑的代码在我遵循的教程中提到。

关于x可编辑指令:

Yii::setPathOfAlias('editable', dirname(__FILE__).'/../extensions/x-editable');

从此代码中删除x-

'aliases' => array(
     // ...
     'editable'=>realpath(__DIR__. '/../extensions/x-editable'),
),