Mercurial > hg > documentViewer
comparison zpt/layer_text_annotator.zpt @ 525:70c3ae5eac7c
layers can have their own templates.
first version of annotations layer.
author | casties |
---|---|
date | Thu, 05 Apr 2012 19:29:50 +0200 |
parents | |
children | 3f375a048402 |
comparison
equal
deleted
inserted
replaced
524:1a20621f2555 | 525:70c3ae5eac7c |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 <head> | |
5 <metal:block metal:define-macro="html_head"> | |
6 <!-- annotator --> | |
7 <link rel="stylesheet" type="text/css" | |
8 tal:attributes="href string:$rootUrl/template/annotator_files/css/annotator.css" /> | |
9 | |
10 <script | |
11 tal:attributes="src string:$rootUrl/template/annotator_files/lib/vendor/json2.js"></script> | |
12 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/extensions.js"></script> | |
13 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/console.js"></script> | |
14 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/class.js"></script> | |
15 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/range.js"></script> | |
16 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/annotator.js"></script> | |
17 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/widget.js"></script> | |
18 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/editor.js"></script> | |
19 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/viewer.js"></script> | |
20 <script | |
21 tal:attributes="src string:$rootUrl/template/annotator_files/lib/notification.js"></script> | |
22 <script | |
23 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/store.js"></script> | |
24 <script | |
25 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/permissions.js"></script> | |
26 <script | |
27 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/annotateitpermissions.js"></script> | |
28 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/auth.js"></script> | |
29 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/tags.js"></script> | |
30 <script | |
31 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/unsupported.js"></script> | |
32 <script | |
33 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/filter.js"></script> | |
34 | |
35 <script type="text/javascript"> | |
36 // <!-- | |
37 $(document).ready(function() { | |
38 // annotator | |
39 var elem = $('div.pageContent').get(0); | |
40 var uri = window.location.href.split(/#|\?/).shift(); | |
41 var devAnnotator = new Annotator(elem).addPlugin('Auth', { | |
42 //tokenUrl: 'http://annotateit.org/api/token' | |
43 tokenUrl : 'http://localhost:8080/test/annotator/token?user=casties' | |
44 //autoFetch: false | |
45 }).addPlugin('Permissions', { | |
46 user : 'casties', | |
47 userString : function(user) { | |
48 if (user && user.name) { | |
49 return user.name; | |
50 } | |
51 return user; | |
52 }, | |
53 userId : function(user) { | |
54 if (user && user.id) { | |
55 return user.id; | |
56 } | |
57 return user; | |
58 } | |
59 }).addPlugin('Store', { | |
60 prefix : 'http://localhost:18080/AnnotationManager/annotator', | |
61 //prefix: 'http://virtuoso.mpiwg-berlin.mpg.de:8080/AnnotationManager/annotator', | |
62 //prefix: 'http://annotateit.org/api', | |
63 annotationData : { | |
64 'uri' : uri | |
65 }, | |
66 loadFromSearch : { | |
67 'limit' : 20, | |
68 'uri' : uri | |
69 //'uri': 'http://127.0.0.1:18080/ECHOdocuViewfullTest?pn=21&url=/mpiwg/online/permanent/library/163127KK' | |
70 } | |
71 }); | |
72 }); | |
73 // --> | |
74 </script> | |
75 | |
76 </metal:block> | |
77 </head> | |
78 <body> | |
79 <!-- right-side options --> | |
80 <div class="col buttons"> | |
81 <!-- LAYER DISPLAY OPTION --> | |
82 <ul> | |
83 <li metal:define-macro="layer_select_li"> | |
84 <input type="checkbox" class="autosubmit" name="viewLayer" value="annotator" | |
85 tal:attributes="checked python:'annotator' in viewLayers" /> Annotations | |
86 </li> | |
87 </ul> | |
88 </div> | |
89 | |
90 <metal:block metal:define-macro="options_box"> | |
91 <!-- BEGIN ANNOTATIONS --> | |
92 <div class="options"> | |
93 <h4>Annotations</h4> | |
94 <div>nothing to be seen here...</div> | |
95 </div> | |
96 <!-- END ANNOTATIONS --> | |
97 </metal:block> | |
98 | |
99 </body> | |
100 | |
101 </html> |