source: products/quintagroup.mobileextender/trunk/quintagroup/mobileextender/adapters.py @ 1561

Last change on this file since 1561 was 754, checked in by piv, 14 years ago

copied from trunk

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1from zope.component import adapts
2from zope.interface import implements
3
4from archetypes.schemaextender.interfaces import ISchemaExtender
5from archetypes.schemaextender.field import ExtensionField
6
7from Products.Archetypes.atapi import RichWidget, ComputedWidget
8from Products.Archetypes.public import TextField, ComputedField
9from Products.Archetypes.atapi import AnnotationStorage
10#from Products.ATContentTypes.content.document import ATDocument
11from Products.ATContentTypes.interface import IATDocument
12
13
14from quintagroup.mobileextender import mobileextenderMessageFactory as _
15
16
17class MobileField(ExtensionField, TextField):
18   """A mobile field content mobile version of content."""
19
20class 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.