首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Yii在Yiistrap上安装x-editable

Yii在Yiistrap上安装x-editable
EN

Stack Overflow用户
提问于 2013-12-13 12:19:47
回答 1查看 589关注 0票数 0

在我的web应用程序中,我想使用x-editable作为Yiistrap .I,按照下面的链接"http://x-editable.demopage.ru/“中提到的步骤操作。我正在使用工作正常的Yiistrap,我无法安装x- .But我收到此错误"Alias“editable。*”无效。请确保它指向现有的目录或文件。““我受保护的/config/main.php文件

代码语言:javascript
复制
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'
         ),
         ),

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

EN

回答 1

Stack Overflow用户

发布于 2013-12-13 13:48:17

在x-editable指令上:

代码语言:javascript
复制
Yii::setPathOfAlias('editable', dirname(__FILE__).'/../extensions/x-editable');

从以下代码中删除x-

代码语言:javascript
复制
'aliases' => array(
     // ...
     'editable'=>realpath(__DIR__. '/../extensions/x-editable'),
),
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20559013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档