Commit 2109e95e authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

backport stable

......@@ -7,3 +7,5 @@ f8e8c25ede97879057b57cd12dc872a00d0e0c2b cubicweb-addressbook-version-1.6.0
7b23909c781d815513bddb0ccadea6b5f206349a cubicweb-addressbook-debian-version-1.6.0-1
b27a29ef86a9f193513febd31adaac8918bf03a6 cubicweb-addressbook-version-1.6.1
c40f8650e6bab2258d71972a74b8a1896051df3b cubicweb-addressbook-debian-version-1.6.1-1
51da42653740e24b6f8071438b62e15608712bce cubicweb-addressbook-version-1.6.2
90246a73378e7f4e57854492b46107c007071e4f cubicweb-addressbook-debian-version-1.6.2-1
......@@ -4,7 +4,7 @@
modname = 'addressbook'
distname = "cubicweb-%s" % modname
numversion = (1, 6, 1)
numversion = (1, 6, 2)
version = '.'.join(str(num) for num in numversion)
license = 'LGPL'
......
cubicweb-addressbook (1.6.2-1) unstable; urgency=low
* new upstream release
-- Sylvain Thénault <sylvain.thenault@logilab.fr> Wed, 06 Apr 2011 16:10:41 +0200
cubicweb-addressbook (1.6.1-1) unstable; urgency=low
* new upstream release for cw 3.9
......
"""addressbook hooks
:organization: Logilab
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:copyright: 2001-2011 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
......@@ -23,7 +23,7 @@ class AutoSetLatLng(Hook):
if not gmapkey:
return
geoattrs = set(('street', 'street2', 'postalcode', 'city', 'country'))
changed_attrs = set(self.entity.keys())
changed_attrs = set(self.entity.cw_edited)
if (geoattrs & changed_attrs
and not self.entity.get('latitude')
and not self.entity.get('longitude')):
......
......@@ -7,6 +7,7 @@ msgstr ""
"PO-Revision-Date: 2010-03-08 16:37+0100\n"
"Last-Translator: Logilab Team <contact@logilab.fr>\n"
"Language-Team: en <contact@logilab.fr>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -89,6 +90,9 @@ msgctxt "PostalAddress"
msgid "latitude"
msgstr "lalitude"
msgid "latitude in degree"
msgstr ""
msgid "longitude"
msgstr "longitude"
......@@ -96,6 +100,9 @@ msgctxt "PostalAddress"
msgid "longitude"
msgstr "longitude"
msgid "longitude in degree"
msgstr ""
msgid "mobile"
msgstr "mobile"
......@@ -140,10 +147,10 @@ msgctxt "PostalAddress"
msgid "street2"
msgstr "street2"
msgctxt "PhoneNumber"
msgctxt "IMAddress"
msgid "type"
msgstr "type"
msgctxt "IMAddress"
msgctxt "PhoneNumber"
msgid "type"
msgstr "type"
......@@ -4,6 +4,7 @@ msgstr ""
"PO-Revision-Date: 2008-03-28 18:14+0100\n"
"Last-Translator: Logilab Team <contact@logilab.fr>\n"
"Language-Team: fr <contact@logilab.fr>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -88,6 +89,9 @@ msgctxt "PostalAddress"
msgid "latitude"
msgstr ""
msgid "latitude in degree"
msgstr ""
msgid "longitude"
msgstr ""
......@@ -95,6 +99,9 @@ msgctxt "PostalAddress"
msgid "longitude"
msgstr ""
msgid "longitude in degree"
msgstr ""
msgid "mobile"
msgstr ""
......@@ -139,10 +146,10 @@ msgctxt "PostalAddress"
msgid "street2"
msgstr ""
msgctxt "PhoneNumber"
msgctxt "IMAddress"
msgid "type"
msgstr ""
msgctxt "IMAddress"
msgctxt "PhoneNumber"
msgid "type"
msgstr ""
......@@ -7,6 +7,7 @@ msgstr ""
"PO-Revision-Date: 2008-02-15 10:30+0100\n"
"Last-Translator: Logilab Team <contact@logilab.fr>\n"
"Language-Team: fr <contact@logilab.fr>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -89,6 +90,9 @@ msgctxt "PostalAddress"
msgid "latitude"
msgstr "latitude"
msgid "latitude in degree"
msgstr "latitude en degré"
msgid "longitude"
msgstr "longitude"
......@@ -96,6 +100,9 @@ msgctxt "PostalAddress"
msgid "longitude"
msgstr "longitude"
msgid "longitude in degree"
msgstr "longitude en degré"
msgid "mobile"
msgstr "mobile"
......@@ -140,10 +147,10 @@ msgctxt "PostalAddress"
msgid "street2"
msgstr "rue (2)"
msgctxt "PhoneNumber"
msgctxt "IMAddress"
msgid "type"
msgstr "type"
msgctxt "IMAddress"
msgctxt "PhoneNumber"
msgid "type"
msgstr "type"
sync_schema_props_perms('latitude')
sync_schema_props_perms('longitude')
from yams.buildobjs import EntityType, String, Float
from yams.constraints import IntervalBoundConstraint
_ = unicode
......@@ -13,11 +14,15 @@ class PostalAddress(EntityType):
street = String(fulltextindexed=True, required=True, maxsize=256)
street2 = String(fulltextindexed=True, maxsize=256)
postalcode = String(fulltextindexed=True, required=True, maxsize=256)
city = String(fulltextindexed=True, required=True, maxsize=256)
country = String(fulltextindexed=True, maxsize=256)
city = String(fulltextindexed=True, required=True, maxsize=256,
internationalizable=True) # see static-message.pot
country = String(fulltextindexed=True, maxsize=256,
internationalizable=True) # see static-message.pot
state = String(fulltextindexed=True, maxsize=256)
latitude = Float()
longitude = Float()
latitude = Float(constraints=[IntervalBoundConstraint(-90, 90)],
description=_('latitude in degree'))
longitude = Float(constraints=[IntervalBoundConstraint(-180, 180)],
description=_('longitude in degree'))
class IMAddress(EntityType):
im_account = String(fulltextindexed=True, required=True, maxsize=64)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment