changeset 555:841c2094af63

setting resource for annotations.
author casties
date Wed, 26 Sep 2012 12:24:11 +0200
parents c56bc63436de
children c7fed4285d25
files zpt/layer_text_annotator.zpt
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/layer_text_annotator.zpt	Tue Sep 25 13:05:48 2012 +0200
+++ b/zpt/layer_text_annotator.zpt	Wed Sep 26 12:24:11 2012 +0200
@@ -31,11 +31,12 @@
   <!-- <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/filter.js"></script> -->
 
   <script type="text/javascript" 
-    tal:define="annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['documentPath'],pageinfo['pn']); 
-      global annUser python:here.getAuthenticatedUser(anon='anonymous');
-      global annGroup python:request.get('annotator_group', None);
-      permUser python:test(annGroup, 'group:%s'%annGroup, annUser);"
-    tal:content="structure string:var annotatorPageUrl='$annUrl'; var annotatorUser='$annUser'; var permissionUser='$permUser';"></script>
+    tal:define="annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['documentPath'],pageinfo['pn']);
+    resUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s'%(docinfo['DRI']); 
+    global annUser python:here.getAuthenticatedUser(anon='anonymous');
+    global annGroup python:request.get('annotator_group', None);
+    permUser python:test(annGroup, 'group:%s'%annGroup, annUser);"
+    tal:content="structure string:var annotatorPageUrl='$annUrl'; var annotatorResourceUrl='$resUrl'; var annotatorUser='$annUser'; var permissionUser='$permUser';"></script>
 
   <script type="text/javascript">
             // <!--
@@ -66,10 +67,11 @@
                         return user;
                     }
                 }).addPlugin('Store', {
-                    //prefix: 'http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager/annotator',
-                    prefix: 'http://r583-1.mpiwg-berlin.mpg.de:18080/AnnotationManager/annotator',
+                    prefix: 'http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager/annotator',
+                    //prefix: 'http://localhost:18080/AnnotationManager/annotator',
                     annotationData : {
-                        'uri' : uri
+                        'uri' : uri,
+                        'resource' : annotatorResourceUrl
                     },
                     loadFromSearch : {
                         'limit' : 20,