Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Cannot Manually Register Bootstrap, forced to use Bootstap Extension #119

Closed
surfer190 opened this issue Sep 7, 2014 · 5 comments
Closed

Comments

@surfer190
Copy link

 public function registerAssets()
    {
        $am = Yii::app()->getAssetManager();
        $cs = Yii::app()->getClientScript();
        $form = yii::app()->editable->form;
        $mode = $this->mode ? $this->mode : yii::app()->editable->defaults['mode'];

        // bootstrap
        if($form === EditableConfig::FORM_BOOTSTRAP) {
            if (($bootstrap = yii::app()->getComponent('bootstrap'))) {
                $bootstrap->registerCoreCss();
                $bootstrap->registerCoreScripts();
            } else {
                throw new CException('You need to setup Yii-bootstrap extension first.');
            }

You are force to register the bootstrap extension

@acorncom
Copy link

acorncom commented Sep 8, 2014

@surfer190 See Pull Request #115 that I opened (and that has been merged), should resolve your issue.

@surfer190
Copy link
Author

Just for anyone who doesn't know it is in the dev branch.

git checkout dev

But this does not solve my problem.

I have registered bootstrap manually in layout as:

<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/bootstrap.min.js'); ?> 
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/css/bootstrap.min.css');?>

@surfer190
Copy link
Author

So: OR include Bootstrap js and css manually:

Does not apply anymore?

found at: http://x-editable.demopage.ru/

@Julian-B90
Copy link
Collaborator

what is now your problem?

@surfer190
Copy link
Author

The problem is that the yii bootstap extension is required however the documentation specifies that bootstrap css and js can be added manually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants