bscheshirwork/yii2-bootstrap3-jui-conflict-fix

Fix conflict of bootstrap tooltip/button if jquery-ui is enabled

dev-master 2019-01-14 16:05 UTC

This package is auto-updated.

Last update: 2024-11-15 06:09:47 UTC


README

For case if you see unexpected jquery-ui tooltip jquery-ui tooltip

instead of bootstrap tooltip bootstrap tooltip

Installation

The preferred way to install this extension is through composer.

add

"bscheshirwork/yii2-bootstrap3-jui-conflict-fix": "@dev"

to the require section of your composer.json file.

Usage

Add

...
/* @var $form yii\widgets\ActiveForm */
...
bscheshirwork\bjf\BootstrapJuiConflictFixAsset::register($this);

to top of view who use bootstrap and jui together (for example yii\bootstrap\BootstrapAsset from you own AppAsset in main template and yii\jui\JuiAsset from widget zxbodya/yii2-gallery-manager)

note: BootstrapJuiConflictFixAsset must be register first!

Example:

view (like /views/crud/_form.php):

...
/* @var $form yii\widgets\ActiveForm */
...
bscheshirwork\bjf\BootstrapJuiConflictFixAsset::register($this);
?>
...
    <?= GalleryManager::widget(
        [
            'model' => $model,
            'behaviorName' => 'galleryBehavior',
            'apiRoute' => 'crud/gallery-api'
        ]
    ); ?>
...

template (like /views/layouts/main.php):

...
/* @var $this \yii\web\View */
/* @var $content string */
backend\assets\AppAsset::register($this);
?>
...
    <?= $content ?>
...