it-blaster/color-picker-type-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

it-blaster/color-picker-type-bundle

最新稳定版本:v1.0.3

Composer 安装命令:

composer require it-blaster/color-picker-type-bundle

包简介

The FormType for choosing a color

README 文档

README

Scrutinizer Code Quality Build Status License Total Downloads Latest Unstable Version Latest Stable Version

The FormType for choosing a color based on Iris.

Installation

Add it-blaster/color-picker-type-bundle to your composer.json file and run composer

...
"require": {
    "it-blaster/color-picker-type-bundle": "1.0.*"
}
...

Register the bundle in your AppKernel.php

...
new Fenrizbes\ColorPickerTypeBundle\FenrizbesColorPickerTypeBundle(),
...

Include bundle's scripts and Iris' dependencies in your page:

...
<script src="path/to/jquery.js"></script>
<script src="path/to/jquery-ui.js"></script>
<script src="{{ asset('bundles/fenrizbescolorpickertype/lib/js/iris.min.js') }}"></script>
<script src="{{ asset('bundles/fenrizbescolorpickertype/js/color_picker_type.js') }}"></script>
...

Usage

Just set the color_picker FormType for your field as follows:

...
    ->add('color', 'color_picker')
...

Options

You can pass all the Iris' options as a picker_options value:

...
    ->add('color', 'color_picker', array(
        'picker_options' => array(
            'color'    => false,
            'mode'     => 'hsl',
            'hide'     => true,
            'border'   => true,
            'target'   => false,
            'width'    => 200,
            'palettes' => false,
            'controls' => array(
                'horiz' => 's',
                'vert'  => 'l',
                'strip' => 'h'
            )
        )
    ))
...

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 7
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-15