Merge branch 'master' into bbmaster
This commit is contained in:
commit
25525133a2
3 changed files with 13 additions and 9 deletions
|
@ -52,9 +52,10 @@ a[href]:hover {
|
|||
}
|
||||
|
||||
pre {
|
||||
padding: 0.2em;
|
||||
font-size: 100%;
|
||||
background-color: #f4f4f4;
|
||||
overflow: scroll;
|
||||
background-color: #f8f8f8;
|
||||
overflow: auto;
|
||||
max-height: 35em;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,9 +137,13 @@ class AdapterBase(object):
|
|||
def __eq__(self, other):
|
||||
if not isinstance(other, AdapterBase):
|
||||
return self.context == other
|
||||
#return False
|
||||
return self.context == other.context
|
||||
|
||||
def __ne__(self, other):
|
||||
if not isinstance(other, AdapterBase):
|
||||
return self.context != other
|
||||
return self.context != other.context
|
||||
|
||||
def getLoopsRoot(self):
|
||||
return self.context.getLoopsRoot()
|
||||
|
||||
|
@ -443,8 +447,9 @@ class RelationSetProperty(object):
|
|||
noSecurityCheck=self.noSecurityCheck)
|
||||
|
||||
def __set__(self, inst, value):
|
||||
value = [baseObject(c) for c in value]
|
||||
rs = self.factory(inst, self.predicateName)
|
||||
current = list(rs)
|
||||
current = [baseObject(c) for c in rs]
|
||||
for c in current:
|
||||
if c not in value:
|
||||
rs.remove(c)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2007 Helmut Merz helmutm@cy55.de
|
||||
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,8 +18,6 @@
|
|||
|
||||
"""
|
||||
XML-RPC views.
|
||||
|
||||
$Id$
|
||||
"""
|
||||
|
||||
from zope.app.container.interfaces import INameChooser
|
||||
|
@ -34,7 +32,7 @@ from zope.security.proxy import removeSecurityProxy
|
|||
from zope.cachedescriptors.property import Lazy
|
||||
|
||||
from cybertools.typology.interfaces import IType
|
||||
from loops.common import adapted
|
||||
from loops.common import adapted, AdapterBase
|
||||
from loops.concept import Concept
|
||||
from loops.i18n.browser import I18NView
|
||||
from loops.util import getUidForObject, getObjectForUid, toUnicode
|
||||
|
@ -166,7 +164,7 @@ def objectAsDict(obj, langInfo=None):
|
|||
'title': adapter.title, 'description': adapter.description,
|
||||
'type': getUidForObject(objType.typeProvider)}
|
||||
ti = objType.typeInterface
|
||||
if ti is not None and adapter != obj:
|
||||
if ti is not None and isinstance(adapter, AdapterBase): #adapter != obj:
|
||||
#for attr in (list(adapter._adapterAttributes) + list(ti)):
|
||||
for attr in list(ti):
|
||||
if attr not in ('__parent__', 'context', 'id', 'name',
|
||||
|
|
Loading…
Add table
Reference in a new issue