colorpicker widget for z3c.form
Project description
Introduction
collective.z3cform.colorpicker provides two different jQuery based widgets:
Farbtastic, a simple color picker.
jPicker, a Photoshop style color picker supporting transparency
Requirements
plone >= 3.2.1
plone.app.z3cform
Usage
You can use this widget setting the “widgetFactory” property of a form field:
from zope import schema from z3c.form import form, field from collective.z3cform.colorpicker.colorpicker import ColorpickerFieldWidget from collective.z3cform.colorpicker.colorpickeralpha import ColorpickerAlphaFieldWidget class IColorForm(interface.Interface): color = schema.TextLine(title=u"Color", description=u"", required=False) alphacolor = schema.TextLine(title=u"Color with alpha layer support", description=u"", required=False) class Color(object): color = '#ff0000' alphacolor = 'ff0000cc' def __init__(self, context): self.context = context class ColorForm(form.Form): fields = field.Fields(IColorForm) fields['color'].widgetFactory = ColorpickerFieldWidget fields['alphacolor'].widgetFactory = ColorpickerAlphaFieldWidget ...
for more information see demo directory in the package sources.
Contributors
Giorgio Borelli - gborelli
Silvio Tomatis - silviot
Changelog
0.2 (2010-10-31)
included jPicker widget for alpha transparency support
0.1 (2009-06-19)
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for collective.z3cform.colorpicker-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720ca1558b1f5cf4bf7173af76edab8a6f7c063346998d438212811edfb91f14 |
|
MD5 | 06adad77fe7c8cb1e14b368694ff3fbb |
|
BLAKE2b-256 | bb54c9f61bbbfe2f3506a5509d7a49b94b0e1fa7ccbe7e1bcf998f5be03bc88e |