Mercurial > hg > documentViewer
changeset 626:7dafe8283312
make sslify accessible for templates.
author | casties |
---|---|
date | Mon, 15 Dec 2014 17:31:08 +0100 |
parents | 80a3b1fa5705 |
children | 98fe8e168c01 |
files | documentViewer.py zpt/viewer/layer_image_annotator.zpt |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/documentViewer.py Mon Dec 15 17:18:20 2014 +0100 +++ b/documentViewer.py Mon Dec 15 17:31:08 2014 +0100 @@ -1159,6 +1159,9 @@ return groups + def sslifyUrl(self, url, **args): + """returns URL with http or https""" + return sslifyUrl(url, **args) security.declareProtected('View management screens','changeDocumentViewerForm') changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals())
--- a/zpt/viewer/layer_image_annotator.zpt Mon Dec 15 17:18:20 2014 +0100 +++ b/zpt/viewer/layer_image_annotator.zpt Mon Dec 15 17:31:08 2014 +0100 @@ -10,7 +10,7 @@ <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/annotator.min.css"/> <script type="text/javascript" - tal:define="global annServerUrl string:http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager; + tal:define="global annServerUrl python:here.sslifyUrl('//tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager', here); global annTokenUrl string:$viewerUrl/template/token/getLoginToken; annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['imagePath'],pageinfo['pn']); resUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s'%(docinfo['documentPath']);