version 1.46, 2004/04/16 16:04:52
|
version 1.49, 2004/04/22 17:35:14
|
Line 28 from Globals import Persistent, package_
|
Line 28 from Globals import Persistent, package_
|
from Acquisition import Implicit |
from Acquisition import Implicit |
|
|
#from psycopg import libpq |
#from psycopg import libpq |
#from pyPgSQL import libpq |
from pyPgSQL import libpq |
import xml.dom.minidom |
import xml.dom.minidom |
|
|
import urllib |
import urllib |
Line 266 class ECHO_resource(Folder):
|
Line 266 class ECHO_resource(Folder):
|
viewClassificationList=viewClassificationListMaster |
viewClassificationList=viewClassificationListMaster |
|
|
getSubCols = ECHO_helpers.getSubCols |
getSubCols = ECHO_helpers.getSubCols |
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
Line 313 class ECHO_resource(Folder):
|
Line 320 class ECHO_resource(Folder):
|
except: |
except: |
return [] |
return [] |
|
|
|
def getContentType(self): |
|
try: |
|
return self.contentType |
|
except: |
|
return "" |
|
|
def ECHO_resource_config(self): |
def ECHO_resource_config(self): |
"""Main configuration""" |
"""Main configuration""" |
Line 436 class ECHO_externalLink(Folder):
|
Line 448 class ECHO_externalLink(Folder):
|
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
meta_type='ECHO_externalLink' |
meta_type='ECHO_externalLink' |
|
|
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
return content_html(self,'externalLink') |
return content_html(self,'externalLink') |
Line 525 class ECHO_collection(Folder, Persistent
|
Line 545 class ECHO_collection(Folder, Persistent
|
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
meta_type='ECHO_collection' |
meta_type='ECHO_collection' |
|
|
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
def createRessourcesFromXMLForm(self): |
def createRessourcesFromXMLForm(self): |
"""form""" |
"""form""" |
pt=PageTemplateFile('Products/ECHO_content/zpt/createRessourcesFromXMLForm.zpt').__of__(self) |
pt=PageTemplateFile('Products/ECHO_content/zpt/createRessourcesFromXMLForm.zpt').__of__(self) |
Line 597 class ECHO_collection(Folder, Persistent
|
Line 625 class ECHO_collection(Folder, Persistent
|
|
|
dynamical="" |
dynamical="" |
for ob in self.getGraphicCoords(): |
for ob in self.getGraphicCoords(): |
|
if ob[4][4] == "": |
dynamical+="""Coords.push(new Coord('%s', Img, %s));\n"""%(ob[1],ob[0]) |
dynamical+="""Coords.push(new Coord('%s', Img, %s));\n"""%(ob[1],ob[0]) |
|
else: |
|
dynamical+="""Coords.push(new Coord('%s', Img, %s));//%s\n"""%(ob[1],ob[0],ob[4][4]) |
|
dynamical+="ShowArrow(new getObj('i.%s'),Img,%s);\n"%(ob[1],ob[0]) |
ret+=javaHandler%dynamical |
ret+=javaHandler%dynamical |
return ret |
return ret |
|
|
Line 629 class ECHO_collection(Folder, Persistent
|
Line 661 class ECHO_collection(Folder, Persistent
|
return ret |
return ret |
|
|
security.declarePublic('ECHO_rerenderLinksMD') |
security.declarePublic('ECHO_rerenderLinksMD') |
def ECHO_rerenderLinksMD(self): |
def ECHO_rerenderLinksMD(self,obj=None): |
"""Rerender all Links""" |
"""Rerender all Links""" |
|
if not obj: |
|
obj = self |
|
|
for entry in self.__dict__.keys(): |
entries=obj.ZopeFind(obj,obj_metatypes=['ECHO_resource','ECHO_collection']) |
object=getattr(self,entry) |
|
|
|
|
|
try: |
|
|
|
if object.meta_type == 'ECHO_resource': |
for entry in entries: |
|
if entry[1].meta_type == 'ECHO_resource': |
|
entry[1].ECHO_getResourceMD(template="no") |
|
print "rerender",entry[1].getId() |
|
else: |
|
self.ECHO_rerenderLinksMD(entry[1]) |
|
|
object.ECHO_getResourceMD(template="no") |
|
|
|
except: |
|
"""nothing""" |
|
|
|
return "Rerenderd all links to resources in: "+self.title |
return "Rerenderd all links to resources in: "+self.title |
|
|
Line 822 class ECHO_collection(Folder, Persistent
|
Line 854 class ECHO_collection(Folder, Persistent
|
if len(coordtemp)>3: |
if len(coordtemp)>3: |
coord=coordtemp[0:4] |
coord=coordtemp[0:4] |
if hasattr(object,'label') and not object.label=="": |
if hasattr(object,'label') and not object.label=="": |
ids.append([string.join(coord,", "),object.getId(),object.label,object]) |
ids.append([string.join(coord,", "),object.getId(),object.label,object,coordtemp]) |
elif hasattr(object,'title'): |
elif hasattr(object,'title'): |
if not object.title=="": |
if not object.title=="": |
ids.append([string.join(coord,", "),object.getId(),object.title,object]) |
ids.append([string.join(coord,", "),object.getId(),object.title,object,coordtemp]) |
else: |
else: |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object]) |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object,coordtemp]) |
else: |
else: |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object]) |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object,coordtemp]) |
|
|
except: |
except: |
"""nothing""" |
"""nothing""" |
Line 947 class ECHO_root(Folder,Persistent,Implic
|
Line 979 class ECHO_root(Folder,Persistent,Implic
|
"""ECHO Root Folder""" |
"""ECHO Root Folder""" |
meta_type="ECHO_root" |
meta_type="ECHO_root" |
|
|
|
|
|
def getImageTag(self): |
|
"""needed by main_template""" |
|
return "" |
|
secondaryLink="" #needed by main_template |
|
secondaryLinkTitle="" #needed by main_template |
|
|
def getBgcolour(self): |
def getBgcolour(self): |
"""hack""" |
"""hack""" |
return "#dddddd" |
return "#dddddd" |
Line 985 class ECHO_root(Folder,Persistent,Implic
|
Line 1024 class ECHO_root(Folder,Persistent,Implic
|
entry[1].patchContentType(entry[1]) |
entry[1].patchContentType(entry[1]) |
|
|
|
|
return "Rerenderd all links to resources in: "+self.title |
return "changed all contenttypes in: "+self.title |
|
|
def ECHO_newViewerLink(self,obj=None): |
def ECHO_newViewerLink(self,obj=None): |
"""change links (:86 faellt weg)""" |
"""change links (:86 faellt weg)""" |