Changeset 103:daedc22e4e76 in documentViewer
- Timestamp:
- May 19, 2010, 4:19:45 PM (15 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r102 r103 706 706 tocPN = pageinfo['tocPN'] 707 707 selfurl = self.absolute_url() 708 logging.debug("documentViewer (gettoc) /mpdl/interface/doc-query.xql?document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode)) 708 709 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"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode) ,outputUnicode=False) 709 710 pagexml = page.replace('?document=%s'%str(docpath),'?url=%s'%url) … … 723 724 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)) 724 725 hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl) 725 l.setAttributeNS(None, "onClick", "id='highlighting'") 726 726 l.setAttributeNS(None, "onClick", "id='highlighting'") 727 727 return serializeNode(pagenode) 728 728 … … 761 761 762 762 if href.startswith('../lt/lex.xql'): 763 selfurl = self.absolute_url()764 hrefNode.nodeValue = href.replace(' lt/lex.xql','%s/template/head_main_voc'%selfurl)763 # selfurl = self.absolute_url() 764 hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl) 765 765 l.setAttributeNS(None, 'target', '_blank') 766 766 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") 767 767 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') 768 768 if href.startswith('../lt/lemma.xql'): 769 selfurl = self.absolute_url()770 hrefNode.nodeValue = href.replace(' lt/lemma.xql','%s/template/head_main_lemma'%selfurl)769 #selfurl = self.absolute_url() 770 hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma'%selfurl) 771 771 l.setAttributeNS(None, 'target', '_blank') 772 772 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") … … 805 805 #queryResultPage 806 806 if len(pagedivs) > 0: 807 807 808 pagenode = pagedivs[0] 809 links = pagenode.xpath("//a") 810 for l in links: 811 hrefNode = l.getAttributeNodeNS(None, u"href") 812 if hrefNode: 813 href= hrefNode.nodeValue 814 if href.startswith('#note-0006-01'): 815 selfurl = self.absolute_url() 816 hrefNode.nodeValue = href.replace("href='#note-'",'xaxa/%s/'%selfurl) 808 817 return serializeNode(pagenode) 809 818 if mode == "xml":
Note: See TracChangeset
for help on using the changeset viewer.