Diff for /documentViewer/documentViewer.py between versions 1.44 and 1.62

version 1.44, 2010/04/08 11:04:51 version 1.62, 2010/05/21 14:37:37
Line 2 Line 2
 from OFS.Folder import Folder  from OFS.Folder import Folder
 from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate  from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile   from Products.PageTemplates.PageTemplateFile import PageTemplateFile 
   from Products.PythonScripts.standard import url_quote
 from AccessControl import ClassSecurityInfo  from AccessControl import ClassSecurityInfo
 from AccessControl import getSecurityManager  from AccessControl import getSecurityManager
 from Globals import package_home  from Globals import package_home
Line 10  from Ft.Xml.Domlette import Nonvalidatin Line 11  from Ft.Xml.Domlette import Nonvalidatin
 from Ft.Xml.Domlette import PrettyPrint, Print  from Ft.Xml.Domlette import PrettyPrint, Print
 from Ft.Xml import EMPTY_NAMESPACE, Parse  from Ft.Xml import EMPTY_NAMESPACE, Parse
   
   from xml.dom.minidom import parse, parseString
   
   
   
 import Ft.Xml.XPath  import Ft.Xml.XPath
 import cStringIO  import cStringIO
Line 93  class documentViewer(Folder): Line 97  class documentViewer(Folder):
     page_main_images = PageTemplateFile('zpt/page_main_images', globals())      page_main_images = PageTemplateFile('zpt/page_main_images', globals())
     page_main_text = PageTemplateFile('zpt/page_main_text', globals())      page_main_text = PageTemplateFile('zpt/page_main_text', globals())
     page_main_text_dict = PageTemplateFile('zpt/page_main_text_dict', globals())      page_main_text_dict = PageTemplateFile('zpt/page_main_text_dict', globals())
       page_main_xml = PageTemplateFile('zpt/page_main_xml', globals())
     head_main = PageTemplateFile('zpt/head_main', globals())      head_main = PageTemplateFile('zpt/head_main', globals())
     docuviewer_css = PageTemplateFile('css/docuviewer.css', globals())      docuviewer_css = PageTemplateFile('css/docuviewer.css', globals())
     info_xml = PageTemplateFile('zpt/info_xml', globals())      info_xml = PageTemplateFile('zpt/info_xml', globals())
Line 102  class documentViewer(Folder): Line 107  class documentViewer(Folder):
     changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals())      changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals())
   
           
     def __init__(self,id,imageScalerUrl=None,textServerName=None,title="",digilibBaseUrl=None,thumbcols=2,thumbrows=10,authgroups="mpiwg"):      def __init__(self,id,imageScalerUrl=None,textServerName=None,title="",digilibBaseUrl=None,thumbcols=2,thumbrows=5,authgroups="mpiwg"):
         """init document viewer"""          """init document viewer"""
         self.id=id          self.id=id
         self.title=title          self.title=title
Line 163  class documentViewer(Folder): Line 168  class documentViewer(Folder):
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)          return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
       
     security.declareProtected('View','index_html')      security.declareProtected('View','index_html')
     def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None):      def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None):
         '''          '''
         view it          view it
         @param mode: defines how to access the document behind url           @param mode: defines how to access the document behind url 
         @param url: url which contains display information          @param url: url which contains display information
         @param viewMode: if images display images, if text display text, default is auto (text,images or auto)          @param viewMode: if images display images, if text display text, default is auto (text,images or auto)
         @param tocMode: type of 'table of contents' for navigation (thumbs, text, figures)          @param tocMode: type of 'table of contents' for navigation (thumbs, text, figures, none)
           @param querySearch: type of different search modes (fulltext, fulltextMorph, xpath, xquery, ftIndex, ftIndexMorph, fulltextMorphLemma)
         '''          '''
                   
         logging.debug("documentViewer (index) mode: %s url:%s start:%s pn:%s"%(mode,url,start,pn))          logging.debug("documentViewer (index) mode: %s url:%s start:%s pn:%s"%(mode,url,start,pn))
Line 183  class documentViewer(Folder): Line 189  class documentViewer(Folder):
             self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary"              self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary"
                           
         docinfo = self.getDocinfo(mode=mode,url=url)          docinfo = self.getDocinfo(mode=mode,url=url)
         pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo,viewMode=viewMode,tocMode=tocMode)          
           
         if tocMode != "thumbs":          if tocMode != "thumbs":
             # get table of contents              # get table of contents
             docinfo = self.getToc(mode=tocMode, docinfo=docinfo)              docinfo = self.getToc(mode=tocMode, docinfo=docinfo)
   
           pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo,viewMode=viewMode,tocMode=tocMode)
           
         if viewMode=="auto": # automodus gewaehlt          if viewMode=="auto": # automodus gewaehlt
             if docinfo.get("textURL",''): #texturl gesetzt und textViewer konfiguriert              if docinfo.get("textURL",''): #texturl gesetzt und textViewer konfiguriert
                 viewMode="text"                  viewMode="text"
Line 538  class documentViewer(Folder): Line 547  class documentViewer(Folder):
         if textUrls and (len(textUrls) > 0):          if textUrls and (len(textUrls) > 0):
             textUrl = getTextFromNode(textUrls[0])              textUrl = getTextFromNode(textUrls[0])
             docinfo['textURLPath'] = textUrl                 docinfo['textURLPath'] = textUrl   
               if not docinfo['imagePath']:
                   # text-only, no page images
                   docinfo = self.getNumPages(docinfo) #im moment einfach auf eins setzen, navigation ueber die thumbs geht natuerlich nicht    
                     
         presentationUrls = dom.xpath("//texttool/presentation")          presentationUrls = dom.xpath("//texttool/presentation")
         docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag          docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag
Line 550  class documentViewer(Folder): Line 562  class documentViewer(Folder):
                 presentationUrl = url.replace('index.meta', presentationPath)                  presentationUrl = url.replace('index.meta', presentationPath)
             else:              else:
                 presentationUrl = url + "/" + presentationPath                  presentationUrl = url + "/" + presentationPath
             docinfo = self.getNumPages(docinfo) #im moment einfach auf eins setzen, navigation ueber die thumbs geht natuerlich nicht                      
             docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl, docinfo=docinfo, dom=dom)              docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl, docinfo=docinfo, dom=dom)
           
         docinfo = self.getAuthinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get access info          docinfo = self.getAuthinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get access info
Line 647  class documentViewer(Folder): Line 659  class documentViewer(Folder):
             if np % grpsize > 0:              if np % grpsize > 0:
                 pageinfo['numgroups'] += 1                  pageinfo['numgroups'] += 1
                                   
             
         pageinfo['viewMode'] = viewMode          pageinfo['viewMode'] = viewMode
         pageinfo['tocMode'] = tocMode          pageinfo['tocMode'] = tocMode
         pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '10')          pageinfo['query'] = self.REQUEST.get('query',' ')
           pageinfo['queryType'] = self.REQUEST.get('queryType',' ')
           pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext')
           pageinfo['textPN'] = self.REQUEST.get('textPN','1')
           pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','')
           pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30')
           pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10')
         pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1')          pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1')
           toc = int (pageinfo['tocPN'])
           pageinfo['textPages'] =int (toc)
           
           if 'tocSize_%s'%tocMode in docinfo:
               tocSize = int(docinfo['tocSize_%s'%tocMode])
               tocPageSize = int(pageinfo['tocPageSize'])
               # cached toc
              
               if tocSize%tocPageSize>0:
                   tocPages=tocSize/tocPageSize+1
               else:
                   tocPages=tocSize/tocPageSize
               pageinfo['tocPN'] = min (tocPages,toc)
                        
           pageinfo['searchPN'] =self.REQUEST.get('searchPN','1')
           pageinfo['sn'] =self.REQUEST.get('sn','')
   
         return pageinfo          return pageinfo
                                   
       def getSearch(self, pn=1, pageinfo=None,  docinfo=None, query=None, queryType=None):
           """get search list"""
           docpath = docinfo['textURLPath'] 
           url = docinfo['url']
           logging.debug("documentViewer (gettoc) docpath: %s"%(docpath))
           logging.debug("documentViewer (gettoc) url: %s"%(url))
           pagesize = pageinfo['queryPageSize']
           pn = pageinfo['searchPN']
           sn = pageinfo['sn']
           highlightQuery = pageinfo['highlightQuery']
           query =pageinfo['query']
           queryType =pageinfo['queryType']
           viewMode=  pageinfo['viewMode']
           tocMode = pageinfo['tocMode']
           tocPN = pageinfo['tocPN']
           selfurl = self.absolute_url()
           page=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s&highlightQuery=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode,highlightQuery) ,outputUnicode=False)                
           pagexml = page.replace('?document=%s'%str(docpath),'?url=%s'%url)
           pagedom = Parse(pagexml)
           if (queryType=="fulltext")or(queryType=="xpath")or(queryType=="xquery")or(queryType=="fulltextMorphLemma"):   
               pagedivs = pagedom.xpath("//div[@class='queryResultPage']")
               if len(pagedivs)>0:
                   pagenode=pagedivs[0]
                   links=pagenode.xpath("//a")
                   for l in links:
                       hrefNode = l.getAttributeNodeNS(None, u"href")
                       if hrefNode:
                           href = hrefNode.nodeValue
                           if href.startswith('page-fragment.xql'):
                               selfurl = self.absolute_url()            
                               pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN))
                               hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)                                           
                   return serializeNode(pagenode)
           
           if (queryType=="fulltextMorph"):
               pagedivs = pagedom.xpath("//div[@class='queryResult']")
               if len(pagedivs)>0:
                   pagenode=pagedivs[0]
                   links=pagenode.xpath("//a")
                   for l in links:
                       hrefNode = l.getAttributeNodeNS(None, u"href")
                       if hrefNode:
                           href = hrefNode.nodeValue
                           if href.startswith('page-fragment.xql'):
                               selfurl = self.absolute_url()       
                               pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN))
                               hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)  
                           if href.startswith('../lt/lemma.xql'):
                               selfurl = self.absolute_url()
                               hrefNode.nodeValue = href.replace('lt/lemma.xql','%s/template/head_main_lemma'%selfurl)        
                               l.setAttributeNS(None, 'target', '_blank')
                               l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;")
                               l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')                  
                   return serializeNode(pagenode)
   
           if (queryType=="ftIndex")or(queryType=="ftIndexMorph"):
               pagedivs= pagedom.xpath("//div[@class='queryResultPage']")
               if len(pagedivs)>0:
                   pagenode=pagedivs[0]
                   links=pagenode.xpath("//a")
                   for l in links:
                       hrefNode = l.getAttributeNodeNS(None, u"href")
                       if hrefNode:
                           href = hrefNode.nodeValue
                           hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s'%(viewMode,tocMode,tocPN,pn))
                          
                           if href.startswith('../lt/lex.xql'):
                               hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl)         
                               l.setAttributeNS(None, 'target', '_blank')
                               l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;")
                               l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
                           if href.startswith('../lt/lemma.xql'):
                               hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma'%selfurl)        
                               l.setAttributeNS(None, 'target', '_blank')
                               l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;")
                               l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
                   return serializeNode(pagenode)      
           return "no text here"   
   
     def getNumPages(self,docinfo=None):      def getNumPages(self,docinfo=None):
         """get list of pages from fulltext and put in docinfo"""          """get list of pages from fulltext and put in docinfo"""
Line 664  class documentViewer(Folder): Line 776  class documentViewer(Folder):
         docinfo['numPages'] = text.count("<pb ")          docinfo['numPages'] = text.count("<pb ")
         return docinfo          return docinfo
                 
     def getTextPage(self, mode="text", pn=1, docinfo=None):      def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None):
         """returns single page from fulltext"""          """returns single page from fulltext"""
         docpath = docinfo['textURLPath']          docpath = docinfo['textURLPath']
           path = docinfo['textURLPath']
           url = docinfo['url']
           viewMode= pageinfo['viewMode']
           tocMode = pageinfo['tocMode']
           tocPN = pageinfo['tocPN']
           selfurl = self.absolute_url()   
          
           #pn = pageinfo['searchPN']
        
         if mode == "text_dict":          if mode == "text_dict":
             textmode = "textPollux"              textmode = "textPollux"
         else:          else:
             textmode = mode              textmode = mode
                           
         pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn), outputUnicode=False)          textParam = "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn)
         # post-processing downloaded xml          if highlightQuery is not None:
               textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn)
               
           pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", textParam, outputUnicode=False)
         pagedom = Parse(pagexml)          pagedom = Parse(pagexml)
         # plain text mode          # plain text mode
         if mode == "text":          if mode == "text":
             # first div contains text              # first div contains text
             pagedivs = pagedom.xpath("/div")              pagedivs = pagedom.xpath("/div")
               #queryResultPage
             if len(pagedivs) > 0:              if len(pagedivs) > 0:
                 pagenode = pagedivs[0]                  pagenode = pagedivs[0]
                 return serializeNode(pagenode)                  links = pagenode.xpath("//a")
                   for l in links:
                       hrefNode = l.getAttributeNodeNS(None, u"href")
   
                       if hrefNode:
                           href= hrefNode.nodeValue
                           if href.startswith('#note-'):
                               hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn))
   
                   return serializeNode(pagenode)
           if mode == "xml":
                 # first div contains text
                 pagedivs = pagedom.xpath("/div")
                 if len(pagedivs) > 0:
                     pagenode = pagedivs[0]
                     return serializeNode(pagenode)
         # text-with-links mode          # text-with-links mode
         if mode == "text_dict":          if mode == "text_dict":
             # first div contains text              # first div contains text
Line 700  class documentViewer(Folder): Line 839  class documentViewer(Folder):
                             # is pollux link                              # is pollux link
                             selfurl = self.absolute_url()                              selfurl = self.absolute_url()
                             # change href                              # change href
                             hrefNode.nodeValue = href.replace('lt/lex.xql','%s/head_main_voc'%selfurl)                              hrefNode.nodeValue = href.replace('lt/lex.xql','%s/template/head_main_voc'%selfurl)
                             # add target                              # add target
                             l.setAttributeNS(None, 'target', '_blank')                              l.setAttributeNS(None, 'target', '_blank')
                               l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;")
                               l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
                               
                           if href.startswith('lt/lemma.xql'):    
                               selfurl = self.absolute_url()
                               hrefNode.nodeValue = href.replace('lt/lemma.xql','%s/template/head_main_lemma'%selfurl)
                               l.setAttributeNS(None, 'target', '_blank')
                               l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;")
                               l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
                           
                           if href.startswith('#note-'):
                               hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn))    
                               
                               
                 return serializeNode(pagenode)                  return serializeNode(pagenode)
                   
         return "no text here"          return "no text here"
   
       def getTranslate(self, query=None, language=None):
           """translate into another languages"""
           pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lex.xql","document=&language="+str(language)+"&query="+url_quote(str(query)))
           return pagexml
       
       def getLemma(self, lemma=None, language=None):
           """simular words lemma """
           pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lemma.xql","document=&language="+str(language)+"&lemma="+url_quote(str(lemma)))
           #pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lemma.xql","lemma=%s&language=%s"%(lemma,language),outputUnicode=False)
           return pagexml
   
       def getQuery (self,  docinfo=None, pageinfo=None, query=None, queryType=None, pn=1):
            """number of"""
            docpath = docinfo['textURLPath'] 
            pagesize = pageinfo['queryPageSize']
            pn = pageinfo['searchPN']
            query =pageinfo['query']
            queryType =pageinfo['queryType']
   
            tocSearch = 0
            tocDiv = None
            pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, query, pagesize, pn) ,outputUnicode=False)
            
            pagedom = Parse(pagexml)
            numdivs = pagedom.xpath("//div[@class='queryResultHits']")
            tocSearch = int(getTextFromNode(numdivs[0]))
            tc=int((tocSearch/10)+1)
            logging.debug("documentViewer (gettoc) tc: %s"%(tc))
            return tc
   
     def getToc(self, mode="text", docinfo=None):      def getToc(self, mode="text", docinfo=None):
         """loads table of contents and stores in docinfo"""          """loads table of contents and stores in docinfo"""
         logging.debug("documentViewer (gettoc) mode: %s"%(mode))          logging.debug("documentViewer (gettoc) mode: %s"%(mode))
         if 'tocSize_%s'%mode in docinfo:          if 'tocSize_%s'%mode in docinfo:
             # cached toc              # cached toc
             return docinfo              return docinfo
           
         docpath = docinfo['textURLPath']          docpath = docinfo['textURLPath']
         # we need to set a result set size          # we need to set a result set size
         pagesize = 1000          pagesize = 1000
Line 741  class documentViewer(Folder): Line 923  class documentViewer(Folder):
         #docinfo['tocDiv_%s'%mode] = tocDiv          #docinfo['tocDiv_%s'%mode] = tocDiv
         return docinfo          return docinfo
           
     def getTocPage(self, mode="toc", pn=1, pageinfo=None, docinfo=None):      def getTocPage(self, mode="text", pn=1, pageinfo=None, docinfo=None):
         """returns single page from the table of contents"""          """returns single page from the table of contents"""
         # TODO: this should use the cached TOC          # TODO: this should use the cached TOC
         if mode == "text":          if mode == "text":
Line 749  class documentViewer(Folder): Line 931  class documentViewer(Folder):
         else:          else:
             queryType = mode              queryType = mode
         docpath = docinfo['textURLPath']          docpath = docinfo['textURLPath']
           path = docinfo['textURLPath']
           #logging.debug("documentViewer (gettoc) pathNomer: %s"%(pathNomer))
         pagesize = pageinfo['tocPageSize']          pagesize = pageinfo['tocPageSize']
         pn = pageinfo['tocPN']          pn = pageinfo['tocPN']
           url = docinfo['url']
           selfurl = self.absolute_url()  
           viewMode=  pageinfo['viewMode']
           tocMode = pageinfo['tocMode']
           tocPN = pageinfo['tocPN']
       
         pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql", "document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath,queryType,pagesize,pn), outputUnicode=False)          pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql", "document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath,queryType,pagesize,pn), outputUnicode=False)
           page = pagexml.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s'%(selfurl,url, viewMode, tocMode, tocPN))
           text = page.replace('mode=image','mode=texttool')
           return text
         # post-processing downloaded xml          # post-processing downloaded xml
         pagedom = Parse(pagexml)          #pagedom = Parse(text)
         # div contains text          # div contains text
         pagedivs = pagedom.xpath("//div[@class='queryResultPage']")          #pagedivs = pagedom.xpath("//div[@class='queryResultPage']")
         if len(pagedivs) > 0:          #if len(pagedivs) > 0:
             pagenode = pagedivs[0]          #    pagenode = pagedivs[0]
             return serializeNode(pagenode)          #    return serializeNode(pagenode)
         else:          #else:
             return "No TOC!"          #    return "No TOC!"
   
           
     def changeDocumentViewer(self,title="",digilibBaseUrl=None,thumbrows=2,thumbcols=10,authgroups='mpiwg',RESPONSE=None):      def changeDocumentViewer(self,title="",digilibBaseUrl=None,thumbrows=2,thumbcols=5,authgroups='mpiwg',RESPONSE=None):
         """init document viewer"""          """init document viewer"""
         self.title=title          self.title=title
         self.digilibBaseUrl = digilibBaseUrl          self.digilibBaseUrl = digilibBaseUrl

Removed from v.1.44  
changed lines
  Added in v.1.62


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