# HG changeset patch # User casties # Date 1313003883 -7200 # Node ID 17f0290b2327cf90c66b4dfc9071f44f5b2b637e # Parent 1d93a8cb2d8fd0b3c5081e143537952b86975004 small fixes. diff -r 1d93a8cb2d8f -r 17f0290b2327 MpdlXmlTextServer.py --- a/MpdlXmlTextServer.py Tue Aug 09 20:27:41 2011 +0200 +++ b/MpdlXmlTextServer.py Wed Aug 10 21:18:03 2011 +0200 @@ -257,7 +257,7 @@ if docinfo.get('numPages', 0) == 0: # seems to be text-only - update page count docinfo['numPages'] = np - pageinfo['end'] = min(pageinfo['end'], np) + #pageinfo['end'] = min(pageinfo['end'], np) pageinfo['numgroups'] = int(np / pageinfo['groupsize']) if np % pageinfo['groupsize'] > 0: pageinfo['numgroups'] += 1 diff -r 1d93a8cb2d8f -r 17f0290b2327 documentViewer.py --- a/documentViewer.py Tue Aug 09 20:27:41 2011 +0200 +++ b/documentViewer.py Wed Aug 10 21:18:03 2011 +0200 @@ -176,6 +176,9 @@ except Exception, e: logging.error("Unable to find MetaDataFolder 'metadata': "+str(e)) + if digilibBaseUrl is not None: + self.digilibBaseUrl = digilibBaseUrl + # proxy text server methods to fulltextclient def getTextPage(self, **args): @@ -447,6 +450,7 @@ docinfo = {'mode': mode, 'url': url} # add self url docinfo['viewerUrl'] = self.getDocumentViewerURL() + docinfo['digilibBaseUrl'] = self.digilibBaseUrl # get index.meta DOM docUrl = None metaDom = None @@ -515,9 +519,11 @@ # image path if mode != 'texttool': - # override image path from texttool + # override image path from texttool with url docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1) + + # number of images from digilib if docinfo.get('imagePath', None): docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath'] diff -r 1d93a8cb2d8f -r 17f0290b2327 zpt/changeDocumentViewer.zpt --- a/zpt/changeDocumentViewer.zpt Tue Aug 09 20:27:41 2011 +0200 +++ b/zpt/changeDocumentViewer.zpt Wed Aug 10 21:18:03 2011 +0200 @@ -17,6 +17,9 @@

Access groups (separated by ',') that are considered local, i.e. when a ressource restricts access to one of these groups, local access to the ressource is granted.

+

Digilib base URL

+

+

Leave empty for autoconfiguration.