version 1.103.2.4, 2012/01/19 19:03:28
|
version 1.103.2.5, 2012/08/27 09:45:33
|
Line 264 class ECHO_basis:
|
Line 264 class ECHO_basis:
|
locale=self.ZopeFind(self,obj_ids=["locale_"+lang]) |
locale=self.ZopeFind(self,obj_ids=["locale_"+lang]) |
|
|
if locale: |
if locale: |
return self.decode(locale[0][1].title) |
return unicodify(locale[0][1].title) |
else: |
|
try: |
return unicodify(self.title) |
return self.decode(self.title) |
|
except: |
|
return self.title |
|
|
|
def getLabel(self): |
def getLabel(self): |
"""title""" |
"""title""" |
Line 296 class ECHO_basis:
|
Line 293 class ECHO_basis:
|
ret=self.getId() |
ret=self.getId() |
return ret |
return ret |
|
|
return self.decode(self.label) |
return unicodify(self.label) |
|
|
def changeECHOEntriesForm(self): |
def changeECHOEntriesForm(self): |
"""change Entries for the ECHO Navigation environment""" |
"""change Entries for the ECHO Navigation environment""" |
Line 373 class ECHO_basis:
|
Line 370 class ECHO_basis:
|
res = self.ZopeFind(self, obj_metatypes=('ECHO_mapText')) |
res = self.ZopeFind(self, obj_metatypes=('ECHO_mapText')) |
if len(res) > 0: |
if len(res) > 0: |
text = res[0][1] |
text = res[0][1] |
return text |
return unicodify(text) |
return None |
return None |
|
|
def ECHO_graphicEntry(self): |
def ECHO_graphicEntry(self): |
Line 481 class ECHO_basis:
|
Line 478 class ECHO_basis:
|
text = "link" |
text = "link" |
|
|
tiptext = ob.getTip() |
tiptext = ob.getTip() |
|
|
tag = "" |
tag = "" |
if bt['isN4']: |
if bt['isN4']: |
# N4 needs layer for highlighting |
# N4 needs layer for highlighting |
Line 491 class ECHO_basis:
|
Line 489 class ECHO_basis:
|
tag = '<a id="a.%s" class="maplink" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" %s %s'%(id,id,id,href,targetattr) |
tag = '<a id="a.%s" class="maplink" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" %s %s'%(id,id,id,href,targetattr) |
if tiptext: |
if tiptext: |
tag += ' title="%s"'%tiptext |
tag += ' title="%s"'%tiptext |
tag += ">" + text + "</a>" |
|
|
logging.debug("createMapLink: text=%s"%repr(text)) |
|
tag += ">%s</a>"%text |
|
|
return tag |
return tag |
|
|
def createMapAux(self, ob, arrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil", circlesrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/kreis", target="_blank",backLink=None,alternativArrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil_blau"): |
def createMapAux(self, ob, arrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil", circlesrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/kreis", target="_blank",backLink=None,alternativArrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil_blau"): |
Line 511 class ECHO_basis:
|
Line 512 class ECHO_basis:
|
else: |
else: |
targetattr = 'target="%s"'%target |
targetattr = 'target="%s"'%target |
tiptext = ob.getTip() |
tiptext = ob.getTip() |
tag = "" |
|
|
|
|
tag = "" |
if bt['isN4']: |
if bt['isN4']: |
# |
# |
# N4 needs layer and img elements |
# N4 needs layer and img elements |
Line 1273 class MapArea(SimpleItem):
|
Line 1274 class MapArea(SimpleItem):
|
if self.tip is None: |
if self.tip is None: |
if hasattr(self, 'aq_parent'): |
if hasattr(self, 'aq_parent'): |
parent = self.aq_parent |
parent = self.aq_parent |
|
# text-popup type |
if parent.contentType == 'text-popup': |
if parent.contentType == 'text-popup': |
return parent.description |
return unicodify(parent.description) |
return self.tip |
|
|
# use map-text |
|
text = parent.getMapText() |
|
if text is not None: |
|
return text() |
|
|
|
return unicodify(self.tip) |
|
|
def setTip(self, text): |
def setTip(self, text): |
"""sets the text""" |
"""sets the text""" |
self.tiptext = text |
self.tiptext = text |
|
|
def getText(self): |
def getText(self): |
"""returns the text fpr the area""" |
"""returns the text for the area""" |
if hasattr(self, 'aq_parent'): |
if hasattr(self, 'aq_parent'): |
parent = self.aq_parent |
parent = self.aq_parent |
text = parent.getMapText() |
text = parent.getMapText() |
Line 1295 class MapArea(SimpleItem):
|
Line 1303 class MapArea(SimpleItem):
|
"""returns the link label""" |
"""returns the link label""" |
if self.label is None: |
if self.label is None: |
if hasattr(self, 'aq_parent'): |
if hasattr(self, 'aq_parent'): |
return self.aq_parent.label or self.aq_parent.id |
return unicodify(self.aq_parent.label or self.aq_parent.id) |
return self.label |
return unicodify(self.label) |
|
|
def getTargetUrl(self): |
def getTargetUrl(self): |
"""returns the URL of the linked object""" |
"""returns the URL of the linked object""" |