version 1.73, 2004/05/10 08:44:19
|
version 1.74, 2004/05/10 13:23:59
|
Line 989 class ECHO_collection(Folder, Persistent
|
Line 989 class ECHO_collection(Folder, Persistent
|
return ret |
return ret |
|
|
def createJSAreas(self): |
def createJSAreas(self): |
"""CreateJava""" |
"""new version of createJavaScript""" |
dynamical="\n" |
dynamical="\n" |
for ob in self.getGraphicCoords(): |
for ob in self.getGraphicCoords(): |
if ob[5] == "area": |
if ob[5] == "area": |
Line 998 class ECHO_collection(Folder, Persistent
|
Line 998 class ECHO_collection(Folder, Persistent
|
dynamical+="""addArea('%s', 'overview', %s, 'arrow');\n"""%(ob[1],ob[0]) |
dynamical+="""addArea('%s', 'overview', %s, 'arrow');\n"""%(ob[1],ob[0]) |
return dynamical |
return dynamical |
|
|
|
def createMapHead(self): |
|
"""generate divs""" |
|
pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/ECHO_content_map_frag_js')).__of__(self) |
|
return pt() |
|
|
|
def createMapLink(self, ob, text=None): |
|
"""generate map link""" |
|
id = ob[1] |
|
link = ob[1] |
|
if text == None: |
|
text = ob[2] |
|
tag = '<a id="a.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" href="%s" target="_blank"'%(id,id,id,link) |
|
if ob[3].contentType == 'text-popup': |
|
tag += ' title="%s"'%ob[3].description |
|
tag += ">" + text + "</a>" |
|
return tag |
|
|
|
def createMapAux(self, ob, arrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil"): |
|
"""generate map link image, text and other stuff""" |
|
id = ob[1] |
|
link = ob[1] |
|
vtype = ob[5] |
|
ctype = ob[3].contentType |
|
|
|
tag = '<a id="b.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" href="%s" target="_blank">'%(id,id,id,link) |
|
if vtype == "view point": |
|
rot = ob[4][4] |
|
tag += '<img id="i.%s" src="%s&rot=%s" border="1" style="position:absolute; top:-100px; left:-100px; border-style:none" />'%(id,arrowsrc,rot) |
|
else: |
|
tag += '<span id="i.%s" style="position:absolute; top:-100px; left:-100px; border-style:none"'%(id) |
|
if ctype == "text-popup": |
|
desc = ob[3].description |
|
tag += ' title="%s"'%desc |
|
tag += ' />' |
|
tag += '</a>' |
|
return tag |
|
|
|
|
security.declarePublic('getCreditObject') |
security.declarePublic('getCreditObject') |
def getCreditObject(self,name): |
def getCreditObject(self,name): |
"""credit id to credititem""" |
"""credit id to credititem""" |
Line 1224 class ECHO_collection(Folder, Persistent
|
Line 1262 class ECHO_collection(Folder, Persistent
|
sendFile(self, 'js/js_lib.js', 'text/plain') |
sendFile(self, 'js/js_lib.js', 'text/plain') |
return |
return |
|
|
|
|
def getGraphicCoords(self): |
def getGraphicCoords(self): |
"""Give list of coordinates""" |
"""Give list of coordinates""" |
subColTypes=['ECHO_collection','ECHO_resource'] |
subColTypes=['ECHO_collection','ECHO_resource'] |