Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 138:e6beb338f85f
onDblclick to onClick
author | abukhman |
---|---|
date | Thu, 15 Jul 2010 15:16:52 +0200 |
parents | 6a33aa624ba4 |
children | 6345583d809a |
comparison
equal
deleted
inserted
replaced
137:2fa9d30f4ab0 | 138:e6beb338f85f |
---|---|
94 hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl) | 94 hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl) |
95 if href.startswith('../lt/lemma.xql'): | 95 if href.startswith('../lt/lemma.xql'): |
96 hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma_New'%(selfurl)) | 96 hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma_New'%(selfurl)) |
97 l.setAttributeNS(None, 'target', '_blank') | 97 l.setAttributeNS(None, 'target', '_blank') |
98 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") | 98 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") |
99 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') | 99 l.setAttributeNS(None, 'onClick', 'popupWin.focus();') |
100 pagedivs = pagedom.xpath("//div[@class='queryResultMorphExpansion']") | 100 pagedivs = pagedom.xpath("//div[@class='queryResultMorphExpansion']") |
101 return serializeNode(pagenode) | 101 return serializeNode(pagenode) |
102 if (queryType=="ftIndex")or(queryType=="ftIndexMorph"): | 102 if (queryType=="ftIndex")or(queryType=="ftIndexMorph"): |
103 pagedivs= pagedom.xpath("//div[@class='queryResultPage']") | 103 pagedivs= pagedom.xpath("//div[@class='queryResultPage']") |
104 if len(pagedivs)>0: | 104 if len(pagedivs)>0: |
111 hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s'%(viewMode,tocMode,tocPN,pn)) | 111 hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s'%(viewMode,tocMode,tocPN,pn)) |
112 if href.startswith('../lt/lex.xql'): | 112 if href.startswith('../lt/lex.xql'): |
113 hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl) | 113 hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl) |
114 l.setAttributeNS(None, 'target', '_blank') | 114 l.setAttributeNS(None, 'target', '_blank') |
115 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") | 115 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") |
116 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') | 116 l.setAttributeNS(None, 'onClick', 'popupWin.focus();') |
117 if href.startswith('../lt/lemma.xql'): | 117 if href.startswith('../lt/lemma.xql'): |
118 hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma'%selfurl) | 118 hrefNode.nodeValue = href.replace('../lt/lemma.xql','%s/template/head_main_lemma'%selfurl) |
119 l.setAttributeNS(None, 'target', '_blank') | 119 l.setAttributeNS(None, 'target', '_blank') |
120 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") | 120 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=400, scrollbars=1'); return false;") |
121 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') | 121 l.setAttributeNS(None, 'onClick', 'popupWin.focus();') |
122 return serializeNode(pagenode) | 122 return serializeNode(pagenode) |
123 return "no text here" | 123 return "no text here" |
124 | 124 |
125 def getNumPages(self, docinfo): | 125 def getNumPages(self, docinfo): |
126 """get list of pages from fulltext and put in docinfo""" | 126 """get list of pages from fulltext and put in docinfo""" |
201 # change href | 201 # change href |
202 hrefNode.nodeValue = href.replace('lt/lex.xql','%s/template/head_main_voc'%selfurl) | 202 hrefNode.nodeValue = href.replace('lt/lex.xql','%s/template/head_main_voc'%selfurl) |
203 # add target | 203 # add target |
204 l.setAttributeNS(None, 'target', '_blank') | 204 l.setAttributeNS(None, 'target', '_blank') |
205 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;") | 205 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;") |
206 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') | 206 l.setAttributeNS(None, 'onClick', 'popupWin.focus();') |
207 if href.startswith('lt/lemma.xql'): | 207 if href.startswith('lt/lemma.xql'): |
208 selfurl = self.absolute_url() | 208 selfurl = self.absolute_url() |
209 hrefNode.nodeValue = href.replace('lt/lemma.xql','%s/template/head_main_lemma'%selfurl) | 209 hrefNode.nodeValue = href.replace('lt/lemma.xql','%s/template/head_main_lemma'%selfurl) |
210 l.setAttributeNS(None, 'target', '_blank') | 210 l.setAttributeNS(None, 'target', '_blank') |
211 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;") | 211 l.setAttributeNS(None, 'onClick',"popupWin = window.open(this.href, 'contacts', 'location,width=500,height=600,top=180, left=700, scrollbars=1'); return false;") |
212 l.setAttributeNS(None, 'onDblclick', 'popupWin.focus();') | 212 l.setAttributeNS(None, 'onClick', 'popupWin.focus();') |
213 if href.startswith('#note-'): | 213 if href.startswith('#note-'): |
214 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn)) | 214 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn)) |
215 return serializeNode(pagenode) | 215 return serializeNode(pagenode) |
216 return "no text here" | 216 return "no text here" |
217 | 217 |