Changeset 74:5c9837484085 in documentViewer


Ignore:
Timestamp:
Nov 4, 2008, 8:36:51 PM (16 years ago)
Author:
dwinter
Branch:
default
Message:

marks

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r73 r74  
    140140 
    141141    security.declareProtected('View','index_html')
    142     def index_html(self,mode,url,viewMode="auto",start=None,pn=1):
     142    def index_html(self,mode,url,viewMode="auto",start=None,pn=1,mk=None):
    143143        '''
    144144        view it
     
    168168                viewMode="images"
    169169               
    170         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
     170        return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,marks=self.generateMarks(mk))
    171171 
    172  
     172    def generateMarks(self,mk):
     173        ret=""
     174        for m in mk:
     175            ret+="mk=%s"%mk
     176        return ret
     177   
    173178    def getLink(self,param=None,val=None):
    174179        """link to documentviewer with parameter param set to val"""
  • zpt/image_main.zpt

    r52 r74  
    11<tal:block tal:define="docinfo options/docinfo; pageinfo options/pageinfo; mode python:options.get('viewMode','images')">
    2  <iframe tal:condition="python:mode=='images'" height="100%" width="100%" tal:attributes="src string:${here/imageViewerUrl}fn=${docinfo/imagePath}&pn=${pageinfo/current}"/>
     2 <iframe tal:condition="python:mode=='images'" height="100%" width="100%" tal:attributes="src string:${here/imageViewerUrl}fn=${docinfo/imagePath}&pn=${pageinfo/current}${options/marks}"/>
    33 <iframe tal:condition="python:mode=='text'" height="100%" width="100%" tal:attributes="src string:${here/textViewerUrl}fn=${docinfo/textURL}&pn=${pageinfo/current}&lang=${docinfo/lang}"/>
    44</tal:block>
  • zpt/viewer_main.zpt

    r49 r74  
    1313    </td>
    1414    <td width="100%" valign="top">
    15       <tal:block tal:content="structure python:here.template.image_main(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)" />
     15      <tal:block tal:content="structure python:here.template.image_main(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=mk)" />
    1616    </td>
    1717  </tr>
Note: See TracChangeset for help on using the changeset viewer.