Mercurial > hg > documentViewer
comparison documentViewer.py @ 405:b8fb4c750d74
fix for characternormalization default
author | casties |
---|---|
date | Tue, 23 Nov 2010 17:36:50 +0100 |
parents | 29a87dc92750 |
children | f7d73ea4b38b beb7ccb92564 |
comparison
equal
deleted
inserted
replaced
404:29a87dc92750 | 405:b8fb4c750d74 |
---|---|
289 viewMode="images" | 289 viewMode="images" |
290 | 290 |
291 return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode) | 291 return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode) |
292 | 292 |
293 security.declareProtected('View','index_html') | 293 security.declareProtected('View','index_html') |
294 def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None, characterNormalization="", optionToggle=None): | 294 def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None): |
295 ''' | 295 ''' |
296 view it | 296 view it |
297 @param mode: defines how to access the document behind url | 297 @param mode: defines how to access the document behind url |
298 @param url: url which contains display information | 298 @param url: url which contains display information |
299 @param viewMode: if images display images, if text display text, default is auto (text,images or auto) | 299 @param viewMode: if images display images, if text display text, default is auto (text,images or auto) |
800 logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) | 800 logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) |
801 #logging.debug("documentViewer (getdocinfo) docinfo: %s"%) | 801 #logging.debug("documentViewer (getdocinfo) docinfo: %s"%) |
802 self.REQUEST.SESSION['docinfo'] = docinfo | 802 self.REQUEST.SESSION['docinfo'] = docinfo |
803 return docinfo | 803 return docinfo |
804 | 804 |
805 def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization=""): | 805 def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None): |
806 """returns pageinfo with the given parameters""" | 806 """returns pageinfo with the given parameters""" |
807 pageinfo = {} | 807 pageinfo = {} |
808 current = getInt(current) | 808 current = getInt(current) |
809 | 809 |
810 pageinfo['current'] = current | 810 pageinfo['current'] = current |
824 pageinfo['numgroups'] = int(np / grpsize) | 824 pageinfo['numgroups'] = int(np / grpsize) |
825 if np % grpsize > 0: | 825 if np % grpsize > 0: |
826 pageinfo['numgroups'] += 1 | 826 pageinfo['numgroups'] += 1 |
827 pageinfo['viewMode'] = viewMode | 827 pageinfo['viewMode'] = viewMode |
828 pageinfo['tocMode'] = tocMode | 828 pageinfo['tocMode'] = tocMode |
829 pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization','') | 829 pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization','regPlusNorm') |
830 pageinfo['optionToggle'] = self.REQUEST.get('optionToggle','') | 830 pageinfo['optionToggle'] = self.REQUEST.get('optionToggle','') |
831 pageinfo['query'] = self.REQUEST.get('query','') | 831 pageinfo['query'] = self.REQUEST.get('query','') |
832 pageinfo['queryType'] = self.REQUEST.get('queryType','') | 832 pageinfo['queryType'] = self.REQUEST.get('queryType','') |
833 pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext') | 833 pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext') |
834 pageinfo['textPN'] = self.REQUEST.get('textPN','1') | 834 pageinfo['textPN'] = self.REQUEST.get('textPN','1') |