承接 loveorigami/yii2-colorbox 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

loveorigami/yii2-colorbox

Composer 安装命令:

composer require loveorigami/yii2-colorbox

包简介

This widget is wrapper for awesome jQuery plugin Colorbox

README 文档

README

A customizable lightbox jQuery plugin for Yii2 based on Colorbox.

Installation

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.

Usage

  • In view:
use lo\widgets\colorbox\Colorbox;

<?= Colorbox::widget([
    'selector' => '.colorbox',
    'clientOptions' => [
        'maxWidth' => 800,
        'maxHeight' => 600,
    ],
    'coreStyle' => 2
]) ?>

Iframe

  • In Form (parent view)
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>
  • In Iframe (child view)
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>

统计信息

  • 总下载量: 11.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-21