[Checkins] SVN: z3ext.cssregistry/trunk/ Added property title

Nikolay Kim fafhrd at datacom.kz
Wed Oct 29 08:28:53 EDT 2008


Log message for revision 92666:
  Added property title

Changed:
  U   z3ext.cssregistry/trunk/CHANGES.txt
  U   z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt
  U   z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py
  U   z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py
  U   z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py

-=-
Modified: z3ext.cssregistry/trunk/CHANGES.txt
===================================================================
--- z3ext.cssregistry/trunk/CHANGES.txt	2008-10-29 12:17:18 UTC (rev 92665)
+++ z3ext.cssregistry/trunk/CHANGES.txt	2008-10-29 12:28:53 UTC (rev 92666)
@@ -5,10 +5,12 @@
 1.3.1 (2008-10-28)
 ------------------
 
-- Correct Persistent property management
+- Added property title
 
 - Property description is i18n aware
 
+- Fix Persistent property management
+
 - Added translations: ru, nl
 
 

Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt	2008-10-29 12:17:18 UTC (rev 92665)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt	2008-10-29 12:28:53 UTC (rev 92666)
@@ -34,7 +34,7 @@
 	    tal:attributes="class python:repeat['prop'].even() and 'even' or 'odd'">
 	  <td><input type="checkbox" name="property:list"
 		     tal:attributes="value prop" /></td>
-	  <td tal:content="python:context[prop].description or prop"></td>
+	  <td tal:content="python:context[prop].title or prop"></td>
 	  <td><input type="text" 
 		     tal:attributes="name string:prop-$prop;
 				     value python:context[prop].value" /></td>

Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py	2008-10-29 12:17:18 UTC (rev 92665)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py	2008-10-29 12:28:53 UTC (rev 92666)
@@ -46,6 +46,11 @@
 	description = _(u'Property name'),
 	required = True)
 
+    title = schema.TextLine(
+	title = _(u'Title'),
+        description = _(u'Property title'),
+	required = False)
+
     description = schema.TextLine(
 	title = _(u'Description'),
         description = _(u'Property description'),

Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py	2008-10-29 12:17:18 UTC (rev 92665)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py	2008-10-29 12:28:53 UTC (rev 92666)
@@ -25,9 +25,10 @@
 class Property(object):
     interface.implements(ICSSProperty)
 
-    def __init__(self, name, value, description='', type=''):
+    def __init__(self, name, value, title='', description='', type=''):
         self.name = name
         self.value = value
+        self.title = title
         self.description = description
         self.type = type
 

Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py	2008-10-29 12:17:18 UTC (rev 92665)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py	2008-10-29 12:28:53 UTC (rev 92666)
@@ -54,6 +54,11 @@
         description = u'Property value',
 	required = True)
 
+    title = MessageID(
+	title = u'Title',
+        description = u'Property title',
+	required = False)
+
     description = MessageID(
 	title = u'Description',
         description = u'Property description',
@@ -130,6 +135,7 @@
 
 
 def csspropertyHandler(_context, name, value, registry='',
-                       layer=interface.Interface, description='', type=''):
+                       layer=interface.Interface,
+                       title='', description='', type=''):
     registry = registries[(registry, layer)]
-    registry[name] = Property(name, value, description, type)
+    registry[name] = Property(name, value, title, description, type)



More information about the Checkins mailing list