Changeset 532:0b8bed1223ad in documentViewer for documentViewer.py


Ignore:
Timestamp:
Jul 25, 2012, 7:28:31 PM (12 years ago)
Author:
casties
Branch:
default
Message:

new layout and styles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r530 r532  
    144144    info_xml = PageTemplateFile('zpt/info_xml', globals())
    145145    docuviewer_css = ImageFile('css/docuviewer.css',globals())
    146     # make ImageFile better for development
     146    # make docuviewer_css refreshable for development
    147147    docuviewer_css.index_html = refreshingImageFileIndexHtml
    148148    jquery_js = ImageFile('js/jquery.js',globals())
     
    577577        # image path
    578578        if mode != 'texttool':
    579             # override image path from texttool with url TODO: how about mode=auto?
     579            # override image path from texttool with url parameter TODO: how about mode=auto?
    580580            docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1)
    581581
     
    584584            docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath']
    585585            docinfo = self.getDocinfoFromDigilib(docinfo, docinfo['imagePath'])
     586        else:
     587            # imagePath still missing? try "./pageimg"
     588            imgPath = os.path.join(docUrl, 'pageimg')
     589            docinfo = self.getDocinfoFromDigilib(docinfo, imgPath)
     590            if docinfo.get('numPages', 0) > 0:
     591                # there are pages
     592                docinfo['imagePath'] = imgPath
     593                docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath']
    586594
    587595        # check numPages
     
    663671            else:
    664672                docinfo['presentationUrl'] = os.path.join(docPath, presentation)
    665            
    666673       
    667674        return docinfo
Note: See TracChangeset for help on using the changeset viewer.