Mercurial > hg > documentViewer
changeset 106:9f11913bc132
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 20 May 2010 11:28:36 +0200 |
parents | 6bffb612cd6a |
children | 53c395d3175f |
files | documentViewer.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/documentViewer.py Thu May 20 10:46:00 2010 +0200 +++ b/documentViewer.py Thu May 20 11:28:36 2010 +0200 @@ -667,7 +667,7 @@ pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext') pageinfo['textPN'] = self.REQUEST.get('textPN','1') - + pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','') pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10') pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1') @@ -699,6 +699,7 @@ pagesize = pageinfo['queryPageSize'] pn = pageinfo['searchPN'] sn = pageinfo['sn'] + highlightQuery = pageinfo['highlightQuery'] query =pageinfo['query'] queryType =pageinfo['queryType'] viewMode= pageinfo['viewMode'] @@ -724,6 +725,7 @@ 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)) hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl) l.setAttributeNS(None, "onClick", "id='highlighting'") + logging.debug("documentViewer (gettoc) highlightQuery: %s"%(highlightQuery)) l.setAttributeNS(None, "highlightQuery", "id='highlighting'") return serializeNode(pagenode) @@ -762,13 +764,13 @@ if href.startswith('../lt/lex.xql'): # selfurl = self.absolute_url() - 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, '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();') if href.startswith('../lt/lemma.xql'): #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, '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();')