[Zope3-checkins] CVS: Zope3/src/zope/schema - __init__.py:1.7 _field.py:1.7 interfaces.py:1.6

Paul Everitt paul@zope.com
Thu, 10 Apr 2003 05:34:31 -0400


Update of /cvs-repository/Zope3/src/zope/schema
In directory cvs.zope.org:/tmp/cvs-serv20235/schema

Modified Files:
	__init__.py _field.py interfaces.py 
Log Message:

Created new widget in the Rotterdam skin for editing the source of an
item, such as the ZPT source.  Created a schema field called
SourceText (instead of Text).  This is only used for Templated Page at
the moment.

Minor UI cleanups:

  o Removed [Personalized Elements]

  o Moved User label up to save space

  o Fixed float on context inspectors (e.g. Metadata, Help, etc.)



=== Zope3/src/zope/schema/__init__.py 1.6 => 1.7 ===
--- Zope3/src/zope/schema/__init__.py:1.6	Tue Mar 25 06:47:56 2003
+++ Zope3/src/zope/schema/__init__.py	Thu Apr 10 05:34:30 2003
@@ -19,6 +19,6 @@
 from zope.schema._field import Field, Container, Iterable, Orderable
 from zope.schema._field import MinMaxLen, ValueSet, Sequence, Bytes, BytesLine
 from zope.schema._field import Text, TextLine, Bool, Int, Float, Tuple, List
-from zope.schema._field import Password, Dict, Datetime
+from zope.schema._field import Password, Dict, Datetime, SourceText
 from zope.schema._schema import getFields, getFieldsInOrder
 from zope.schema._schema import getFieldNames, getFieldNamesInOrder


=== Zope3/src/zope/schema/_field.py 1.6 => 1.7 ===
--- Zope3/src/zope/schema/_field.py:1.6	Tue Mar 25 06:47:56 2003
+++ Zope3/src/zope/schema/_field.py	Thu Apr 10 05:34:30 2003
@@ -23,6 +23,7 @@
 
 from zope.schema.interfaces import IField, IContainer, IIterable, IOrderable
 from zope.schema.interfaces import IMinMaxLen, IValueSet, IText, ITextLine
+from zope.schema.interfaces import ISourceText
 from zope.schema.interfaces import IBool, IInt, IBytes, IBytesLine, IFloat
 from zope.schema.interfaces import IDatetime, ISequence, ITuple, IList, IDict
 from zope.schema.interfaces import IPassword
@@ -56,6 +57,11 @@
 implements(Password, IPassword)
 implements(Bool, IBool)
 implements(Int, IInt)
+
+class SourceText(Text):
+    __doc__ = ISourceText.__doc__
+    __implements__ = ISourceText
+    _type = unicode
 
 class Bytes(MinMaxLen, ValueSet):
     __doc__ = IBytes.__doc__


=== Zope3/src/zope/schema/interfaces.py 1.5 => 1.6 ===
--- Zope3/src/zope/schema/interfaces.py:1.5	Tue Mar 25 06:47:56 2003
+++ Zope3/src/zope/schema/interfaces.py	Thu Apr 10 05:34:30 2003
@@ -260,6 +260,9 @@
 class IText(IMinMaxLen, IValueSet, IIterable):
     u"""a Field containing a unicode string."""
 
+class ISourceText(IText):
+    u"""Field for source text of object."""
+
 class ITextLine(IText):
     u"""a Field containing a unicode string without newlines."""
 
@@ -331,3 +334,4 @@
         constraint=_fields,
         required=False,
         )
+