Diff for /documentViewer/documentViewer.py between versions 1.52 and 1.54

version 1.52, 2010/05/19 16:19:45 version 1.54, 2010/05/20 08:46:00
Line 669  class documentViewer(Folder): Line 669  class documentViewer(Folder):
         pageinfo['textPN'] = self.REQUEST.get('textPN','1')          pageinfo['textPN'] = self.REQUEST.get('textPN','1')
                   
         pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30')          pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30')
         pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '20')          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'])          toc = int (pageinfo['tocPN'])
         pageinfo['textPages'] =int (toc)          pageinfo['textPages'] =int (toc)
Line 724  class documentViewer(Folder): Line 724  class documentViewer(Folder):
                             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))                              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)                                                                        hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)                                          
                             l.setAttributeNS(None, "onClick", "id='highlighting'")                                            l.setAttributeNS(None, "onClick", "id='highlighting'")              
                               l.setAttributeNS(None, "highlightQuery", "id='highlighting'") 
                 return serializeNode(pagenode)                  return serializeNode(pagenode)
                   
         if (queryType=="fulltextMorph"):          if (queryType=="fulltextMorph"):
Line 761  class documentViewer(Folder): Line 762  class documentViewer(Folder):
                                                 
                         if href.startswith('../lt/lex.xql'):                          if href.startswith('../lt/lex.xql'):
                            # selfurl = self.absolute_url()                             # selfurl = self.absolute_url()
                             hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl)                                       hrefNode.nodeValue = href.replace('../lt/lex.xql','%s../template/head_main_voc'%selfurl)         
                             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=400, scrollbars=1'); return false;")                              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();')                              l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
                         if href.startswith('../lt/lemma.xql'):                          if href.startswith('../lt/lemma.xql'):
                             #selfurl = self.absolute_url()                              #selfurl = self.absolute_url()
                             hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma'%selfurl)                                      hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s../template/head_main_lemma'%selfurl)        
                             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=400, scrollbars=1'); return false;")                              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();')                              l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();')
Line 880  class documentViewer(Folder): Line 881  class documentViewer(Folder):
          pagedom = Parse(pagexml)           pagedom = Parse(pagexml)
          numdivs = pagedom.xpath("//div[@class='queryResultHits']")           numdivs = pagedom.xpath("//div[@class='queryResultHits']")
          tocSearch = int(getTextFromNode(numdivs[0]))           tocSearch = int(getTextFromNode(numdivs[0]))
          tc=int((tocSearch/20)+1)           tc=int((tocSearch/10)+1)
          logging.debug("documentViewer (gettoc) tc: %s"%(tc))           logging.debug("documentViewer (gettoc) tc: %s"%(tc))
          return tc           return tc
   

Removed from v.1.52  
changed lines
  Added in v.1.54


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