Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bscheshirwork/yii2-bootstrap3-jui-conflict-fix
- Owner: bscheshirwork
- Created: 2019-01-14T15:44:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T16:05:58.000Z (almost 6 years ago)
- Last Synced: 2024-08-09T21:10:25.921Z (5 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 ?>
...
```