# HG changeset patch # User casties # Date 1349184131 -7200 # Node ID 60f5a636bc573ba6bf3fbf85bd6ff459caa6e502 # Parent 9255acc4518d440ced27aff1933e10c33e1dffa2 bugfixes for stability. diff -r 9255acc4518d -r 60f5a636bc57 documentViewer.py --- a/documentViewer.py Mon Oct 01 18:09:01 2012 +0200 +++ b/documentViewer.py Tue Oct 02 15:22:11 2012 +0200 @@ -558,10 +558,10 @@ # asssume index.meta in parent dir docUrl = getParentPath(url) metaDom = self.metadataService.getDomFromPathOrUrl(docUrl) + docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1) elif mode=="filepath": # url points to image file, index.meta optional - docinfo['imagePath'] = url docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + url docinfo['numPages'] = 1 # asssume index.meta is two path segments up @@ -635,8 +635,9 @@ if docinfo.get('numPages', 0) == 0: # number of images from digilib if docinfo.get('imagePath', None): - docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath'] - docinfo = self.getDocinfoFromDigilib(docinfo, docinfo['imagePath']) + imgpath = docinfo['imagePath'].replace('/mpiwg/online/', '', 1) + docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + imgpath + docinfo = self.getDocinfoFromDigilib(docinfo, imgpath) else: # imagePath still missing? try "./pageimg" imgPath = os.path.join(docUrl, 'pageimg') @@ -695,7 +696,6 @@ imageDir = getMDText(texttool.get('image', None)) docPath = getMDText(docinfo.get('documentPath', None)) if imageDir and docPath: - #print "image: ", imageDir, " archivepath: ", archivePath imageDir = os.path.join(docPath, imageDir) imageDir = imageDir.replace('/mpiwg/online', '', 1) docinfo['imagePath'] = imageDir diff -r 9255acc4518d -r 60f5a636bc57 zpt/toc_thumbs.zpt --- a/zpt/toc_thumbs.zpt Mon Oct 01 18:09:01 2012 +0200 +++ b/zpt/toc_thumbs.zpt Tue Oct 02 15:22:11 2012 +0200 @@ -26,7 +26,7 @@
+ tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" />
@@ -118,11 +118,12 @@ Max Planck Institute for the History of Science (unless stated otherwise) - + License: - CC-BY-SA + CC-BY-SA (unless stated otherwise) - Internal use only, please contact library@mpiwg-berlin.mpg.de + Internal use only, + please contact library@mpiwg-berlin.mpg.de (unless stated otherwise)