Changeset 557:abcb67f5cab4 in documentViewer for zpt


Ignore:
Timestamp:
Sep 26, 2012, 9:20:06 PM (12 years ago)
Author:
casties
Branch:
default
Message:

better configurable annotation server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zpt/layer_text_annotator.zpt

    r556 r557  
    3232
    3333  <script type="text/javascript"
    34     tal:define="annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['documentPath'],pageinfo['pn']);
    35     resUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s'%(docinfo['documentPath']));
     34    tal:define="global annServerUrl string:http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager;
     35    annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['documentPath'],pageinfo['pn']);
     36    resUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s'%(docinfo['documentPath']);
    3637    global annUser python:here.getAuthenticatedUser(anon='anonymous');
    3738    global annGroup python:request.get('annotator_group', None);
    3839    permUser python:test(annGroup, 'group:%s'%annGroup, annUser);"
    39     tal:content="structure string:var annotatorPageUrl='$annUrl'; var annotatorResourceUrl='$resUrl'; var annotatorUser='$annUser'; var permissionUser='$permUser';"></script>
     40    tal:content="structure string:
     41    var annotatorServerUrl='$annServerUrl';
     42    var annotatorPageUrl='$annUrl';
     43    var annotatorResourceUrl='$resUrl';
     44    var annotatorUser='$annUser';
     45    var permissionUser='$permUser';"></script>
    4046
    4147  <script type="text/javascript">
     
    6874                    }
    6975                }).addPlugin('Store', {
    70                     prefix: 'http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager/annotator',
    71                     //prefix: 'http://localhost:18080/AnnotationManager/annotator',
     76                    prefix: annotatorServerUrl+'/annotator',
    7277                    annotationData : {
    7378                        'uri' : uri,
     
    114119            <option value="" tal:attributes="selected not:annGroup;"> </option>
    115120            <option
    116               tal:repeat="group python:here.getAnnotatorGroupsForUser(user=annUser,annotationServerUrl='http://localhost:18080/AnnotationManager')"
     121              tal:repeat="group python:here.getAnnotatorGroupsForUser(user=annUser,annotationServerUrl=annServerUrl)"
    117122              tal:attributes="value group/id; selected python:group['id']==annGroup;" tal:content="group/name" />
    118123          </select> <br />
Note: See TracChangeset for help on using the changeset viewer.