Changeset 577:9251719154a3 in documentViewer


Ignore:
Timestamp:
Oct 18, 2012, 3:53:09 PM (12 years ago)
Author:
casties
Branch:
default
Message:

toc with list of handwritten notes.

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • MpiwgXmlTextServer.py

    r576 r577  
    160160                           
    161161                        docinfo['pageNumbers'] = pages
    162                         logging.debug("got pageNumbers=%s"%repr(pages))
    163162                                   
    164163                    # toc
     
    296295                if punditMode:
    297296                    self._addPunditAttributes(pagediv, pageinfo, docinfo)
     297                   
     298                # TODO: move empty page text
     299                ep = dom.find(".//div[@class='emptyPage']")
     300                if ep is not None:
     301                    pagediv.append(ep)
    298302                 
    299303                s = serialize(pagediv)
     
    545549            start = (pn - 1) * size
    546550
    547         #fullresult = ET.fromstring(resultxml)
    548         #fullresult = resultxml
    549         #logging.debug("resultxml=%s"%repr(resultxml))
    550        
    551551        if resultxml is not None:
    552552            # paginate
     
    554554            last = first+size
    555555            tocdivs = resultxml[first:last]
    556             #del fullresult[:first]
    557             #del fullresult[len:]
    558             #tocdivs = fullresult
    559556           
    560557            toc = ET.Element('div', attrib={'class':'queryResultPage'})
     
    621618        tocs = fulltoc[first:last]
    622619        tp = '<div>'
     620        label = {'figures': 'Figure', 'handwritten': 'Handwritten note'}.get(mode, 'Item')
    623621        for toc in tocs:
    624622            pageurl = self.getLink('pn', toc['pn'])
     
    628626                tp += '<div class="toc name">[%s] %s</div>'%(toc['level-string'], toc['content'])
    629627            else:
    630                 tp += '<div class="toc name">[Figure %s]</div>'%(toc['level-string'])
     628                tp += '<div class="toc name">[%s %s]</div>'%(label, toc['level-string'])
    631629           
    632630            if toc.get('no', None):
     
    659657
    660658def manage_addMpiwgXmlTextServer(self,id,title="",serverUrl="http://mpdl-text.mpiwg-berlin.mpg.de/mpdl/interface/",timeout=40,RESPONSE=None):
    661 #def manage_addMpiwgXmlTextServer(self,id,title="",serverUrl="http://mpdl-text.mpiwg-berlin.mpg.de:30030/mpdl/interface/",timeout=40,RESPONSE=None):   
    662     """add zogiimage"""
     659    """add MpiwgXmlTextServer"""
    663660    newObj = MpiwgXmlTextServer(id=id,title=title,serverUrl=serverUrl,timeout=timeout)
    664661    self.Destination()._setObject(id, newObj)
  • css/docuviewer.css

    r576 r577  
    9999    -o-transform-origin: top left;
    100100        left: 7px;
    101     top: 32em;
     101    top: 34em;
    102102    width: 40em;
    103103    padding: 0px;
     
    269269    margin-bottom: 0.25em;
    270270}
    271 /* normalization forms *
    272 div.col.main div.content.text div.text.orig span.w span.reg,
    273 div.col.main div.content.text div.text.orig span.w span.norm {
    274     display: none;
    275 }
    276 div.col.main div.content.text div.text.reg span.w span.orig,
    277 div.col.main div.content.text div.text.reg span.w span.norm {
    278     display: none;
    279 }
    280 div.col.main div.content.text div.text.norm span.w span.orig,
    281 div.col.main div.content.text div.text.norm span.w span.reg {
    282     display: none;
    283 }
    284 /* dictionary forms *
    285 div.col.main div.content.text div.text.plain span.w a.dictionary {
    286     display: none;
    287 }
    288 div.col.main div.content.text div.text.dict span.w span.nodictionary {
    289     display: none;
    290 }
    291 */
    292271/* page break */
    293272div.col.main div.content.text span.pb span.n,
     
    311290}
    312291div.col.main div.content.text span.note span.noteSign {
     292    display: none;
     293    /* font-size: 70%;
     294        vertical-align: super; */
     295}
     296/* handwritten */
     297div.col.main div.content.text span.handwritten {
     298        display: block;
     299        /* float: left; */
     300    margin-top: 0.5em;
     301    margin-bottom: 0.5em;
     302    padding: 5px;
     303    border: 1px dashed silver; 
     304}
     305div.col.main div.content.text span.handwritten span.figureNum {
    313306    display: none;
    314307    /* font-size: 70%;
  • documentViewer.py

    r571 r577  
    150150    toc_figures = PageTemplateFile('zpt/toc_figures', globals())
    151151    toc_concordance = PageTemplateFile('zpt/toc_concordance', globals())
     152    toc_handwritten = PageTemplateFile('zpt/toc_handwritten', globals())
    152153    toc_none = PageTemplateFile('zpt/toc_none', globals())
    153154    # other templates
  • zpt/common_template.zpt

    r571 r577  
    113113            tal:condition="python:docpath and docinfo.get('pageNumbers', None)"><span><a
    114114              tal:omit-tag="python:tocMode=='concordance'" tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a></span></li>
     115          <li tal:attributes="class python:here.getStyle(tocMode, 'handwritten')"
     116            tal:condition="python:docpath and docinfo.get('numHandwritten', None)"><span><a
     117              tal:omit-tag="python:tocMode=='handwritten'" tal:attributes="href python:here.getLink('tocMode','handwritten')">Notes</a></span></li>
    115118          <li tal:attributes="class python:here.getStyle(tocMode, 'figures')"
    116119            tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"><span><a
Note: See TracChangeset for help on using the changeset viewer.