burnbright/silverstripe-colorpicker

SilverStripe表单字段,用于选择颜色。

安装: 968

依赖: 1

建议者: 0

安全: 0

星标: 2

关注者: 2

分支: 23

语言:JavaScript

类型:silverstripe模块

dev-master 2014-07-17 04:21 UTC

This package is auto-updated.

Last update: 2024-08-24 19:16:04 UTC


README

ColorPicker模块为SilverStripe CMS添加了颜色选择输入字段。它使用了ColorPicker jQuery插件。

历史

此模块来自http://bummzack.ch/colorpicker/,由Roman Schmid(别名banal)创作。有关此模块历史的更多信息,请访问http://www.silverstripe.org/customising-the-cms/show/6114

Dimension27为其创建了一个git仓库,以便它可以轻松地在silverstripe项目中重用。

当前版本

1.0

安装

  1. 克隆仓库,例如:git clone git://github.com/dimension27/silverstripe-colorpicker.git colorpicker
  2. 运行 /dev/build
  3. 使用ColorField

用法

将ColorField添加到您的页面就像这样简单

// place this inside your getCMSFields method
$fields->addFieldToTab(
    'Root.Content.Main', 
    new ColorField('BgColor', 'Background Color')
);