Changeset 443:ad5c3dedfc18 in documentViewer for MpdlXmlTextServer.py


Ignore:
Timestamp:
May 10, 2011, 3:24:55 PM (13 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r442 r443  
    2121    manage_changeMpdlXmlTextServerForm = PageTemplateFile("zpt/manage_changeMpdlXmlTextServer", globals())
    2222       
    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):
    2424    #def __init__(self,id,title="",serverUrl="http://mpdl-text.mpiwg-berlin.mpg.de:30030/mpdl/interface/", serverName=None, timeout=40):   
    2525       
     
    204204        pagexml = self.getServerData("page-fragment.xql",textParam)
    205205        dom = Parse(pagexml)
     206       
     207       
    206208        #original Pages
    207209        pagedivs = dom.xpath("//div[@class='pageNumberOrig']")       
     210       
    208211        """if pagedivs == dom.xpath("//div[@class='pageNumberOrig']"):
    209212            if len(pagedivs)>0:
     
    344347                # check all a-tags
    345348                links = pagenode.xpath("//a")
     349               
    346350                for l in links:
    347351                    hrefNode = l.getAttributeNodeNS(None, u"href")
     352                   
    348353                    if hrefNode:
    349354                        # is link with href
     
    356361                            # add target
    357362                            l.setAttributeNS(None, 'target', '_blank')
    358                             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;")
    359                             l.setAttributeNS(None, "onDblclick", "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();")
    360365                            #window.open("this.href, 'InfoWindow', 'menubar=no, location,width=500,height=600,top=180, left=700, toolbar=yes, scrollbars=1'"); return false;")
    361366                                                         
     
    364369                            hrefNode.nodeValue = href.replace('http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/lt/lemma.xql','%s/head_main_lemma'%selfurl)
    365370                            l.setAttributeNS(None, 'target', '_blank')
    366                             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;")
    367                             l.setAttributeNS(None, 'onDblclick', '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                   
    369374                        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                             
    371377                return serializeNode(pagenode)
    372378        return "no text here"
Note: See TracChangeset for help on using the changeset viewer.