Changeset 443:ad5c3dedfc18 in documentViewer for MpdlXmlTextServer.py
- Timestamp:
- May 10, 2011, 3:24:55 PM (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r442 r443 21 21 manage_changeMpdlXmlTextServerForm = PageTemplateFile("zpt/manage_changeMpdlXmlTextServer", globals()) 22 22 23 def __init__(self,id,title="",serverUrl="http://mpdl- text.mpiwg-berlin.mpg.de/mpdl/interface/", serverName=None, timeout=40):23 def __init__(self,id,title="",serverUrl="http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/interface/", serverName=None, timeout=40): 24 24 #def __init__(self,id,title="",serverUrl="http://mpdl-text.mpiwg-berlin.mpg.de:30030/mpdl/interface/", serverName=None, timeout=40): 25 25 … … 204 204 pagexml = self.getServerData("page-fragment.xql",textParam) 205 205 dom = Parse(pagexml) 206 207 206 208 #original Pages 207 209 pagedivs = dom.xpath("//div[@class='pageNumberOrig']") 210 208 211 """if pagedivs == dom.xpath("//div[@class='pageNumberOrig']"): 209 212 if len(pagedivs)>0: … … 344 347 # check all a-tags 345 348 links = pagenode.xpath("//a") 349 346 350 for l in links: 347 351 hrefNode = l.getAttributeNodeNS(None, u"href") 352 348 353 if hrefNode: 349 354 # is link with href … … 356 361 # add target 357 362 l.setAttributeNS(None, 'target', '_blank') 358 l.setAttributeNS(None, 'on Click',"popupWin = window.open(this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=no, scrollbars=1'); return false;")359 l.setAttributeNS(None, "on Dblclick", "popupWin.focus();")363 l.setAttributeNS(None, 'onclick',"popupWin = window.open(this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=no, scrollbars=1'); return false;") 364 l.setAttributeNS(None, "ondblclick", "popupWin.focus();") 360 365 #window.open("this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=yes, scrollbars=1'"); return false;") 361 366 … … 364 369 hrefNode.nodeValue = href.replace('http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/lt/lemma.xql','%s/head_main_lemma'%selfurl) 365 370 l.setAttributeNS(None, 'target', '_blank') 366 l.setAttributeNS(None, 'on Click',"popupWin = window.open(this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=no, scrollbars=1'); return false;")367 l.setAttributeNS(None, 'on Dblclick', 'popupWin.focus();')368 371 l.setAttributeNS(None, 'onclick',"popupWin = window.open(this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=no, scrollbars=1'); return false;") 372 l.setAttributeNS(None, 'ondblclick', 'popupWin.focus();') 373 369 374 if href.startswith('#note-'): 370 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=text_dict&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,tocMode,tocPN,pn)) 375 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=text_dict&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,tocMode,tocPN,pn)) 376 371 377 return serializeNode(pagenode) 372 378 return "no text here"
Note: See TracChangeset
for help on using the changeset viewer.