Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bscheshirwork/yii2-bootstrap3-jui-conflict-fix

Fix conflict of bootstrap tooltip/button if jquery-ui is enabled
https://github.com/bscheshirwork/yii2-bootstrap3-jui-conflict-fix

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# Asset bundle who fixed conflict between bootstrap plugins and jQuery-UI plugins

For case if you see unexpected `jquery-ui tooltip`
![jquery-ui tooltip](https://user-images.githubusercontent.com/5769211/51123967-39469500-182e-11e9-8e7c-7662a31f54a8.gif)

instead of `bootstrap tooltip`
![bootstrap tooltip](https://user-images.githubusercontent.com/5769211/51123968-39df2b80-182e-11e9-87e5-50070eeae87e.gif)

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

add

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

to the require section of your `composer.json` file.

## Usage

Add

```php
...
/* @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`):
```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`):
```php
...
/* @var $this \yii\web\View */
/* @var $content string */
backend\assets\AppAsset::register($this);
?>
...
= $content ?>
...
```