vitalets / x-editable-yii

Yii extension for creating editable elements
http://x-editable.demopage.ru
MIT License
112 stars 34 forks source link

Bootstrap and its behaviors do not have a method or closure named "registerCoreCss". #94

Open rajeshmjn opened 10 years ago

rajeshmjn commented 10 years ago

<?php

// uncomment the following to define a path alias // Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable // CWebApplication properties can be configured here. Yii::setPathOfAlias('editable', dirname(FILE).'/../extensions/x-editable');

//Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/extensions/yiibooster/css/bootstrap.min.css');
//Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/extensions/yiibooster/js/bootstrap.min.js');

return array( 'basePath'=>dirname(FILE).DIRECTORY_SEPARATOR.'..', 'name'=>'Admin Panel',

// preloading 'log' component
'preload'=>array('log', 'bootstrap'),

// autoloading model and component classes
'import'=>array(

    'application.models.*',
    'application.components.*',
            'editable.*',
        //image uploader importer 
            'application.modules.image.components.*',
            'application.modules.image.models.Image',

        //end of image importer
            'application.modules.newsevent.models.*',
            'application.modules.album.models.*',
            'application.modules.menu.models.*',
),
    'defaultController'=>'site',
'modules'=>array(
    // uncomment the following to enable the Gii tool

    'gii'=>array(
        'class'=>'system.gii.GiiModule',
        'password'=>'abcdef',
        // If removed, Gii defaults to localhost only. Edit carefully to taste.
        'ipFilters'=>array('127.0.0.1','::1'),
    ),
        //image uploader modules code
            'image'=>array(
            'createOnDemand'=>true, // requires apache mod_rewrite enabled
            'install'=>true, // allows you to run the installer
            ),
        //end of image uploader modules code
            'newsevent', 'banner', 'album', 'gallery', 'client', 'social', 'recipe', 'menu','content',
),

// application components
'components'=>array(
    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),

            'bootstrap' => array(
                   'class' => 'application.extensions.yiibooster.components.Bootstrap',
                   'responsiveCss' => true,

            ),
                //X-editable config
            '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'
                )
            ),  

    // uncomment the following to enable URLs in path-format

// 'urlManager'=>array( // 'urlFormat'=>'path', // 'rules'=>array( // 'controller:w+/id:d+'=>'/view', // 'controller:w+/action:w+/id:d+'=>'/', // 'controller:w+/action:w+'=>'/', // ), // ),

    //'db'=>array(
    //  'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
    //),
    // uncomment the following to use a MySQL database

    'db'=>array(
        'connectionString' => 'mysql:host=localhost;dbname=dbu',
        'emulatePrepare' => true,
        'username' => 'root',
        'password' => '',
        'charset' => 'utf8',                        
    ),

    'errorHandler'=>array(
        // use 'site/error' action to display errors
        'errorAction'=>'site/error',
    ),
    'log'=>array(
        'class'=>'CLogRouter',
        'routes'=>array(
            array(
                'class'=>'CFileLogRoute',
                'levels'=>'error, warning',
            ),
            // uncomment the following to show log messages on web pages
            /*
            array(
                'class'=>'CWebLogRoute',
            ),
            */
        ),
    ),

// //image uploder components // 'image'=>array( // 'class'=>'ImgManager', // 'versions'=>array( // 'small'=>array('width'=>120,'height'=>120), // 'medium'=>array('width'=>320,'height'=>320), // 'large'=>array('width'=>640,'height'=>640), // ), // ),

            //endof image uploader components
),

// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
    // this is used in contact page
    'adminEmail'=>'webmaster@example.com',
),

);

i've include bootstrap as yiibooster but it throw the exception

izemize commented 10 years ago

Yii Booster preload required css, js files. Simply uncomment it.

jamesmbowler commented 10 years ago

I'm getting the same error, looks like those methods were deprecated in Yii bootstrap: https://github.com/clevertech/YiiBooster/blob/master/CHANGELOG.md

Commenting those lines out in Editable.php seems to work fine for me.