| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | # |
|---|
| 3 | # File: LatLngField.py |
|---|
| 4 | # |
|---|
| 5 | # Copyright (c) 2008 by ['takanori', 'yuta'] |
|---|
| 6 | # Generator: ArchGenXML Version 2.1 |
|---|
| 7 | # http://plone.org/products/archgenxml |
|---|
| 8 | # |
|---|
| 9 | # GNU General Public License (GPL) |
|---|
| 10 | # |
|---|
| 11 | |
|---|
| 12 | __author__ = """takanori <takanori@takanory.net>, yuta <unknown>""" |
|---|
| 13 | __docformat__ = 'plaintext' |
|---|
| 14 | |
|---|
| 15 | #LatLngField |
|---|
| 16 | |
|---|
| 17 | from AccessControl import ClassSecurityInfo |
|---|
| 18 | from Acquisition import aq_base |
|---|
| 19 | |
|---|
| 20 | from Products.CMFCore.utils import getToolByName |
|---|
| 21 | |
|---|
| 22 | from Products.Archetypes.Field import ObjectField,encode,decode |
|---|
| 23 | from Products.Archetypes.Registry import registerField |
|---|
| 24 | from Products.Archetypes.utils import DisplayList |
|---|
| 25 | from Products.Archetypes import config as atconfig |
|---|
| 26 | from Products.Archetypes.Widget import * |
|---|
| 27 | from Products.Archetypes.Field import * |
|---|
| 28 | from Products.Archetypes.Schema import Schema |
|---|
| 29 | try: |
|---|
| 30 | from Products.generator import i18n |
|---|
| 31 | except ImportError: |
|---|
| 32 | from Products.Archetypes.generator import i18n |
|---|
| 33 | |
|---|
| 34 | from Products.ATGoogleMaps import config |
|---|
| 35 | |
|---|
| 36 | ##code-section module-header #fill in your manual code here |
|---|
| 37 | ##/code-section module-header |
|---|
| 38 | |
|---|
| 39 | from zope.interface import implements |
|---|
| 40 | |
|---|
| 41 | from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | class LatLngField(ObjectField): |
|---|
| 48 | """ |
|---|
| 49 | """ |
|---|
| 50 | ##code-section class-header #fill in your manual code here |
|---|
| 51 | ##/code-section class-header |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | _properties = ObjectField._properties.copy() |
|---|
| 56 | _properties.update({ |
|---|
| 57 | 'type': 'latlngfield', |
|---|
| 58 | ##code-section field-properties #fill in your manual code here |
|---|
| 59 | ##/code-section field-properties |
|---|
| 60 | |
|---|
| 61 | }) |
|---|
| 62 | |
|---|
| 63 | security = ClassSecurityInfo() |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | security.declarePrivate('set') |
|---|
| 67 | security.declarePrivate('get') |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | def getRaw(self, instance, **kwargs): |
|---|
| 71 | return ObjectField.getRaw(self, instance, **kwargs) |
|---|
| 72 | |
|---|
| 73 | def set(self, instance, value, **kwargs): |
|---|
| 74 | return ObjectField.set(self, instance, value, **kwargs) |
|---|
| 75 | |
|---|
| 76 | def get(self, instance, **kwargs): |
|---|
| 77 | return ObjectField.get(self, instance, **kwargs) |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | registerField(LatLngField, |
|---|
| 81 | title='LatLngField', |
|---|
| 82 | description='') |
|---|
| 83 | |
|---|
| 84 | ##code-section module-footer #fill in your manual code here |
|---|
| 85 | ##/code-section module-footer |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | |
|---|