D
D
des1roer2015-05-18 11:37:57
Yii
des1roer, 2015-05-18 11:37:57

Yii bootstrap 2.1.1 TypeError: $.fn.popover is undefined?

full text of the error

TypeError: $.fn.popover is undefined
elem[ ontype ] = null;

I am using yii bootstrap 2.1.1 + yii heart. After clicking on the dateptker in the controller
$content = $this->renderPartial('admin', array(
        'model' => $model,
    ), false, true);       
    }

scripts are loaded
POST localhost/mining/analiz/analizCreate/reports_ajax
GET localhost/mining/assets/8a0db51/jquery.js?_=143193...
GET localhost/mining/assets/8a0db51/jquery.ba-bbq.js?_...
GET localhost/mining/assets/a34e3285/bootstrap-editabl...

and then this error. It seems like they offer to swap jquery and bootstrap.js
tried to change the order in components\bootstrap.php
protected function registerJsPackagesIfEnabled()
{
    if (!$this->enableJS)
        return;

    if (!$this->ajaxJsLoad && Yii::app()->request->isAjaxRequest)
        return;

    $this->registerPackage('bootstrap.js');
    $this->registerPackage('bootstrap-noconflict');

    if ($this->enableBootboxJS)
        $this->registerPackage('bootbox');

    if ($this->enableNotifierJS)
        $this->registerPackage('notify');

    $this->registerPopover();
    $this->registerTooltip();
}
      protected function addOurPackagesToYii()
{
    foreach ($this->packages as $name => $definition) {
        $this->assetsRegistry->addPackage($name, $definition);
    }
    $this->assetsRegistry->scriptMap['jquery-ui.min.js'] = $this->getAssetsUrl() . '/js/jquery-ui-no-conflict.min.js';
}

but i still get this order
<script src="/mining/assets/8a0db51/jquery.js" type="text/javascript">
<script src="/mining/assets/a34e3285/bootstrap/js/bootstrap.js" type="text/javascript">

who knows how to win?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question