Diff for /documentViewer/MpdlXmlTextServer.py between versions 1.2.2.3 and 1.7

version 1.2.2.3, 2010/06/18 19:41:28 version 1.7, 2010/08/11 10:17:46
Line 96  class MpdlXmlTextServer(SimpleItem): Line 96  class MpdlXmlTextServer(SimpleItem):
                             hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma_New'%(selfurl))                                      hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma_New'%(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, 'onClick', 'popupWin.focus();')  
                 pagedivs = pagedom.xpath("//div[@class='queryResultMorphExpansion']")                                  pagedivs = pagedom.xpath("//div[@class='queryResultMorphExpansion']")                
                 return serializeNode(pagenode)                          return serializeNode(pagenode)        
         if (queryType=="ftIndex")or(queryType=="ftIndexMorph"):          if (queryType=="ftIndex")or(queryType=="ftIndexMorph"):
Line 113  class MpdlXmlTextServer(SimpleItem): Line 113  class MpdlXmlTextServer(SimpleItem):
                             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, 'onClick', 'popupWin.focus();')
                         if href.startswith('../lt/lemma.xql'):                          if href.startswith('../lt/lemma.xql'):
                             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, 'onClick', 'popupWin.focus();')
                 return serializeNode(pagenode)                        return serializeNode(pagenode)      
         return "no text here"             return "no text here"   
                                                 
Line 176  class MpdlXmlTextServer(SimpleItem): Line 176  class MpdlXmlTextServer(SimpleItem):
               if len(pagedivs) > 0:                if len(pagedivs) > 0:
                   pagenode = pagedivs[0]                    pagenode = pagedivs[0]
                   return serializeNode(pagenode)                    return serializeNode(pagenode)
           if mode == "gis":
                 # first div contains text
                 pagedivs = pagedom.xpath("/div")
                 if len(pagedivs) > 0:
                     pagenode = pagedivs[0]
                     return serializeNode(pagenode)
                       
         if mode == "pureXml":          if mode == "pureXml":
               # first div contains text                # first div contains text
               pagedivs = pagedom.xpath("/div")                pagedivs = pagedom.xpath("/div")
Line 203  class MpdlXmlTextServer(SimpleItem): Line 210  class MpdlXmlTextServer(SimpleItem):
                             # 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, '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();')                                    l.setAttributeNS(None, 'onClick', '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=700, scrollbars=1'); return false;")                              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();')                                 l.setAttributeNS(None, 'onClick', 'popupWin.focus();')   
                         if href.startswith('#note-'):                          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))                                  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)

Removed from v.1.2.2.3  
changed lines
  Added in v.1.7


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