Diff for /ECHO_content/ECHO_collection.py between versions 1.78 and 1.81

version 1.78, 2004/05/10 16:22:17 version 1.81, 2004/05/11 17:56:01
Line 518  class ECHO_resource(Folder): Line 518  class ECHO_resource(Folder):
     if type(coords)==StringType:      if type(coords)==StringType:
             coords=[coords]              coords=[coords]
   
       
     try:              try:        
             coordsnew=[ string.split(x,",") for x in coords]              coordsnew=[ string.split(x,",") for x in coords]
         except:          except:
Line 872  class ECHO_link(ECHO_externalLink): Line 871  class ECHO_link(ECHO_externalLink):
           
   
     def content_html(self):      def content_html(self):
         """template fuer content"""          """template fuer link"""
           if hasattr(self,"link_template"):
         return content_html(self,'link')          return content_html(self,'link')
           else:
               return content_html(self,'collection')
           
 def manage_addECHO_linkForm(self):  def manage_addECHO_linkForm(self):
         """Form for external Links"""          """Form for external Links"""
Line 1258  class ECHO_collection(Folder, Persistent Line 1260  class ECHO_collection(Folder, Persistent
   
     def hl_lib_js(self):      def hl_lib_js(self):
         """javascript"""          """javascript"""
         sendFile(self, 'js/hl_lib.js', 'text/plain')          return sendFile(self, 'js/hl_lib.js', 'text/plain')
         return   
   
     def js_lib_js(self):      def js_lib_js(self):
         """javascript"""          """javascript"""
         sendFile(self, 'js/js_lib.js', 'text/plain')          return sendFile(self, 'js/js_lib.js', 'text/plain')
         return   
   
     def getGraphicCoords(self):      def getGraphicCoords(self):
         """Give list of coordinates"""          """Give list of coordinates"""
Line 1706  class ECHO_root(Folder,Persistent,Implic Line 1706  class ECHO_root(Folder,Persistent,Implic
   
                   
                   
       def getResourcesXML(self,viewerType=None,filter=None):
           """gebe all ressourcen aus"""
           ret="""<?xml version="1.0" ?>
                    <index>"""
           for resource in self.ZopeFind(self,obj_metatypes=['ECHO_resource'],search_sub=1):
   
               echo_url=resource[1].absolute_url()
               if hasattr(resource[1],'link'):
                   viewer_url=resource[1].link
               else:
                   viewer_url="NO URL"
               if filter:
                   if re.search(filter,viewer_url):
                       ret+="""\n<resource echoLink="%s" viewerLink="%s"/>"""%(urllib.quote(echo_url,safe='/:?'),urllib.quote(viewer_url,safe='/:?'))
               else:
                   ret+="""\n<resource echoLink="%s" viewerLink="%s"/>"""%(urllib.quote(echo_url,safe='/:?'),urllib.quote(viewer_url,safe='/:?'))
           ret +="""\n</index>"""
           
           self.REQUEST.RESPONSE.setHeader("Content-Type", "text/xml")
           self.REQUEST.RESPONSE.write(ret)
           
           
 def manage_addECHO_root(self,id,title,RESPONSE=None):  def manage_addECHO_root(self,id,title,RESPONSE=None):
     """Add an ECHO_root"""      """Add an ECHO_root"""
     self._setObject(id,ECHO_root(id,title))      self._setObject(id,ECHO_root(id,title))

Removed from v.1.78  
changed lines
  Added in v.1.81


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>