https://github.com/loveorigami/yii2-colorbox
This widget is wrapper for awesome jQuery plugin Colorbox
https://github.com/loveorigami/yii2-colorbox
colorbox widget yii2
Last synced: 2 months ago
JSON representation
This widget is wrapper for awesome jQuery plugin Colorbox
- Host: GitHub
- URL: https://github.com/loveorigami/yii2-colorbox
- Owner: loveorigami
- License: mit
- Created: 2017-11-21T08:48:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T12:58:53.000Z (about 7 years ago)
- Last Synced: 2025-03-02T20:07:31.927Z (3 months ago)
- Topics: colorbox, widget, yii2
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Colorbox Widget for Yii2
========================
A customizable lightbox jQuery plugin for Yii2 based on [Colorbox](http://www.jacklmoore.com/colorbox/).Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).Either run
```
php composer.phar require "loveorigami/yii2-colorbox" "*"
```or add
```
"loveorigami/yii2-colorbox" : "*"
```to the require section of your application's `composer.json` file.
Usage
-----
* In view:```php
use lo\widgets\colorbox\Colorbox;= Colorbox::widget([
'selector' => '.colorbox',
'clientOptions' => [
'maxWidth' => 800,
'maxHeight' => 600,
],
'coreStyle' => 2
]) ?>
```Iframe
-----
* In Form (parent view)```php
use lo\widgets\colorbox\Colorbox;echo Colorbox::widget([
'coreStyle' => 3,
'reload' => true,
'selector' => '.iframe-page',
'clientOptions' => [
'width' => '95%',
'height' => '95%',
'iframe' => true,
'fixed' => true,
],
])
``````html
...
Edit child item
...```
* In Iframe (child view)
```php
use lo\widgets\colorbox\Colorbox;echo Colorbox::widget([
'iframeTarget' => '.form-save, .form-cancel'
]);
``````html
...
Save
Cancel
...```