Last change
on this file since 754 was
754,
checked in by piv, 17 years ago
|
copied from trunk
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[754] | 1 | from zope.component import adapts |
---|
| 2 | from zope.interface import implements |
---|
| 3 | |
---|
| 4 | from archetypes.schemaextender.interfaces import ISchemaExtender |
---|
| 5 | from archetypes.schemaextender.field import ExtensionField |
---|
| 6 | |
---|
| 7 | from Products.Archetypes.atapi import RichWidget, ComputedWidget |
---|
| 8 | from Products.Archetypes.public import TextField, ComputedField |
---|
| 9 | from Products.Archetypes.atapi import AnnotationStorage |
---|
| 10 | #from Products.ATContentTypes.content.document import ATDocument |
---|
| 11 | from Products.ATContentTypes.interface import IATDocument |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | from quintagroup.mobileextender import mobileextenderMessageFactory as _ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | class MobileField(ExtensionField, TextField): |
---|
| 18 | """A mobile field content mobile version of content.""" |
---|
| 19 | |
---|
| 20 | class MobileExtender(object): |
---|
| 21 | |
---|
| 22 | fields = [ |
---|
| 23 | MobileField('mobile_content', |
---|
| 24 | #required=False, |
---|
| 25 | #storage = AnnotationStorage(migrate=True), |
---|
| 26 | #default_output_type = 'text/x-html-safe', |
---|
| 27 | schemata = 'mobile', |
---|
| 28 | default = "", |
---|
| 29 | widget = RichWidget( |
---|
| 30 | label = _(u'label_mobile_content', default=u'Mobile Content'), |
---|
| 31 | rows = 25, |
---|
| 32 | allow_file_upload = True), |
---|
| 33 | ), |
---|
| 34 | ] |
---|
| 35 | |
---|
| 36 | def __init__(self, context): |
---|
| 37 | self.context = context |
---|
| 38 | |
---|
| 39 | def getFields(self): |
---|
| 40 | return self.fields |
---|
| 41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.