Changed color widget interfaces ZTK-1.1
authorThierry Florac <tflorac@ulthar.net>
Tue, 23 Oct 2012 15:07:24 +0200
branchZTK-1.1
changeset 182 207ef3d0e871
parent 181 3bdaee25ec3a
child 183 db7a00baf389
Changed color widget interfaces
src/ztfy/utils/browser/color.py
src/ztfy/utils/browser/configure.zcml
--- a/src/ztfy/utils/browser/color.py	Fri Oct 19 09:56:41 2012 +0200
+++ b/src/ztfy/utils/browser/color.py	Tue Oct 23 15:07:24 2012 +0200
@@ -26,7 +26,7 @@
 from z3c.form.browser.text import TextWidget
 from z3c.form.widget import FieldWidget
 from zope.component import adapter
-from zope.interface import implementer, implements
+from zope.interface import implementer, implementsOnly
 
 # import local packages
 from ztfy.jqueryui import jquery_colorpicker
@@ -39,7 +39,7 @@
 class ColorWidget(TextWidget):
     """Color widget"""
 
-    implements(IColorWidget)
+    implementsOnly(IColorWidget)
 
     def update(self):
         TextWidget.update(self)
--- a/src/ztfy/utils/browser/configure.zcml	Fri Oct 19 09:56:41 2012 +0200
+++ b/src/ztfy/utils/browser/configure.zcml	Tue Oct 23 15:07:24 2012 +0200
@@ -51,13 +51,13 @@
 	<z3c:widgetTemplate
 		mode="input"
 		template="templates/color_input.pt"
-		widget=".color.ColorWidget"
+		widget=".color.IColorWidget"
 		layer="z3c.form.interfaces.IFormLayer" />
 
 	<z3c:widgetTemplate
 		mode="display"
 		template="templates/color_display.pt"
-		widget=".color.ColorWidget"
+		widget=".color.IColorWidget"
 		layer="z3c.form.interfaces.IFormLayer" />
 
 	<!-- TextLine list widget -->