A customizable lightbox jQuery plugin for Yii2 based on Colorbox.
The preferred way to install this extension is through composer.
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.
use lo\widgets\colorbox\Colorbox;
<?= Colorbox::widget([
'selector' => '.colorbox',
'clientOptions' => [
'maxWidth' => 800,
'maxHeight' => 600,
],
'coreStyle' => 2
]) ?>
use lo\widgets\colorbox\Colorbox;
echo Colorbox::widget([
'coreStyle' => 3,
'reload' => true,
'selector' => '.iframe-page',
'clientOptions' => [
'width' => '95%',
'height' => '95%',
'iframe' => true,
'fixed' => true,
],
])
<form>
...
<a class="iframe-page" href="/site.com/admin/module/controller/update?id=1" title="edit child item" tabindex="-1"><i class="fa fa-pencil"></i> Edit child item</a>
...
</form>
use lo\widgets\colorbox\Colorbox;
echo Colorbox::widget([
'iframeTarget' => '.form-save, .form-cancel'
]);
<form>
...
<button type="submit" class="btn btn-success form-save">Save</button>
<button type="button" class="btn btn-default form-cancel">Cancel</button>
...
</form>
No stable releases.
Comments