Diff for /ECHO_content/ECHO_Nav.py between versions 1.27 and 1.31

version 1.27, 2004/05/11 14:57:35 version 1.31, 2004/06/07 13:37:26
Line 179  class ECHO_pageTemplate(ZopePageTemplate Line 179  class ECHO_pageTemplate(ZopePageTemplate
                                        'html/ECHO_pageTemplateDefault.html')                                         'html/ECHO_pageTemplateDefault.html')
   
     manage_options=ZopePageTemplate.manage_options+(      manage_options=ZopePageTemplate.manage_options+(
         {'label':'Weight and Type','action':'changeECHO_pageTemplateWeightForm'},          {'label':'Main Config','action':'changeECHO_pageTemplateWeightForm'},
         )          )
   
     def content_html(self):      def content_html(self):
Line 284  class ECHO_navigation(Folder): Line 284  class ECHO_navigation(Folder):
   
     displayedMetaTypes=displayTypes      displayedMetaTypes=displayTypes
           
       def getR(self):
       """re"""
       return self.REQUEST
   
     def __init__(self,id,title,pathToHierarchy):      def __init__(self,id,title,pathToHierarchy):
         """init"""          """init"""
         self.id=id          self.id=id
Line 361  class ECHO_navigation(Folder): Line 365  class ECHO_navigation(Folder):
                 tempObj=self.pathToHierarchy[0:]                  tempObj=self.pathToHierarchy[0:]
                 tempObj=re.sub("/",".",tempObj)                  tempObj=re.sub("/",".",tempObj)
                 tempObj="self.aq_parent"+tempObj                  tempObj="self.aq_parent"+tempObj
           #print tempObj
                 objtemp=eval(tempObj)                  objtemp=eval(tempObj)
   
                 obj=objtemp                  obj=objtemp
Line 516  class ECHO_navigation(Folder): Line 520  class ECHO_navigation(Folder):
   
     return len(self.barFromHash(self.createNavHash(0)))       return len(self.barFromHash(self.createNavHash(0))) 
   
       def startOfHierarchy(self,list):
           splitted=self.pathToHierarchy.split("/")
           last=splitted[len(splitted)-1]
           #print last,list
           try:
               nr=list.index(last)
           except:
               nr=0
           return nr+1
       
     def secondNavElements(self):      def secondNavElements(self):
         """Zweite Ordnung"""          """Zweite Ordnung"""
                   
Line 527  class ECHO_navigation(Folder): Line 541  class ECHO_navigation(Folder):
   
         splitted=ult_temp.split("/")          splitted=ult_temp.split("/")
                   
       #print "AU",self.absolute_url(),splitted
       #start=[splitted[2]] #orig
           startNr= self.startOfHierarchy(splitted)
           
       start=[splitted[startNr]]
   
         start=[splitted[2]]  
         #print start          #print start
                 
         keys=self.barFromHash(hash,start=start)          keys=self.barFromHash(hash,start=start)
Line 553  class ECHO_navigation(Folder): Line 571  class ECHO_navigation(Folder):
 ##         else:  ##         else:
 ##             start=[splitted[len(splitted)-1]]  ##             start=[splitted[len(splitted)-1]]
   
         start=splitted[2:order+1]          #start=splitted[2:order+1] #orig
           startNr= self.startOfHierarchy(splitted)
           #print startNr
       start=splitted[startNr:order+startNr-1] 
         #print start          #print start
                 
         keys=self.barFromHash(hash,start=start)          keys=self.barFromHash(hash,start=start)
Line 611  def createPath(url1,url2): Line 632  def createPath(url1,url2):
         if temp2[0]==test:          if temp2[0]==test:
             del temp2[0]              del temp2[0]
   
       #print "CP:"+url1+"::"+url2+"::"+url1+"/"+string.join(temp2,"/")
     return url1+"/"+string.join(temp2,"/")      return url1+"/"+string.join(temp2,"/")
   
 def sortWeight(x,y):  def sortWeight(x,y):

Removed from v.1.27  
changed lines
  Added in v.1.31


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