Diff for /OSAS/OSA_system/OSAS_addfiles.py between versions 1.3 and 1.4

version 1.3, 2003/10/06 16:22:09 version 1.4, 2003/10/06 18:47:33
Line 153  class OSAS_add_contextData(Folder): Line 153  class OSAS_add_contextData(Folder):
         self.id=id          self.id=id
         self.collection=collection          self.collection=collection
   
     def generateTree(self,depth=3):      def getChilds(self,id,depth,items):
         """Erzeugt HTML-Tree der Collection"""  
           
   
         def getChilds(id,depth,items):  
             list=[]              list=[]
             for object in item:          for object in items:
               print object[2]
                 if (depth==object[2])&(id==object[0]):                  if (depth==object[2])&(id==object[0]):
                     list.append[object]                  list.append(object)
           return list
   
       def printChilds(self,startItem,depth,items,enddepth):
   
         exec("items=self.getPhysicalRoot()."+self.collection+".getCollectionTree()")          def spaces(depth):
               tmp=""
               k=0
               while k<2*depth:
                   k+=1
                   tmp=tmp+"&nbsp;"+"&nbsp;"
               return tmp
   
           def retLink(object):
               return "<input type='checkbox' name='collection' value='%s'>%s</input>"% (str(object),object.title)
                
           depth+=1
           childs=self.getChilds(startItem,depth,items)
           tmp=""
           for child in childs:
               if depth < enddepth:
                   tmp=tmp+spaces(depth)
                   tmp= tmp+retLink(child[1])+"<br>"+self.printChilds(child[1],depth,items,enddepth)+"<br>"
               else:
                   tmp=tmp+spaces(2*depth)
                   tmp = tmp+retLink(child[1])+"<br>"
   
           return tmp
                   
       def generateTree(self,depth=3):
           """Erzeugt HTML-Tree der Collection"""
       
           exec("items=self.getPhysicalRoot()."+self.collection+".getCollectionTree()")
           #print items[0][0]
                   
           childs=self.printChilds(items[0][0],0,items,3)
                                   
                   
   
         return a[1][0].id          return "<html><body"+childs+"</html></body>"
   
     def addContextData(self):      def addContextData(self):
         pt=PageTemplateFile('products/OSA_system/contextDataMain.zpt').__of__(self)          pt=PageTemplateFile('products/OSA_system/contextDataMain.zpt').__of__(self)

Removed from v.1.3  
changed lines
  Added in v.1.4


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