Mercurial > hg > documentViewer
changeset 126:c6dcf12e3807
added method to get url of viewer instance
fixed bug with gettoc with mode=none
author | casties |
---|---|
date | Tue, 08 Jun 2010 18:57:36 +0200 |
parents | 2d6c0ffcb934 |
children | 49f381f896d0 |
files | documentViewer.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/documentViewer.py Tue Jun 01 16:31:56 2010 +0200 +++ b/documentViewer.py Tue Jun 08 18:57:36 2010 +0200 @@ -221,6 +221,10 @@ """try to get the digilib URL from zogilib""" url = self.template.zogilib.getDLBaseUrl() return url + + def getDocumentViewerURL(self): + """returns the URL of this instance""" + return self.absolute_url() def getStyle(self, idx, selected, style=""): """returns a string with the given style and append 'sel' if path == selected.""" @@ -900,9 +904,13 @@ def getToc(self, mode="text", docinfo=None): """loads table of contents and stores in docinfo""" logging.debug("documentViewer (gettoc) mode: %s"%(mode)) + if mode == "none": + return docinfo + if 'tocSize_%s'%mode in docinfo: # cached toc - return docinfo + return docinfo + docpath = docinfo['textURLPath'] # we need to set a result set size pagesize = 1000