annotate WebContent/annotation.jsp @ 5:0be9d53a6967

editor for annotations
author dwinter
date Tue, 13 Dec 2011 17:43:46 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
1 <html>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
2 <head>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
3 <script type="text/javascript" src="./jscripts/tiny_mce/tiny_mce.js"></script>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
4 <script type="text/javascript" src="./jscripts/jquery/jquery.js"></script>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
5 <script type="text/javascript">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
6 tinyMCE.init({
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
7 // General options
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
8 mode : "textareas",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
9 theme : "advanced",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
10 plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
11
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
12 // Theme options
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
13 theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
14 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
15 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
16 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
17 theme_advanced_toolbar_location : "top",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
18 theme_advanced_toolbar_align : "left",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
19 theme_advanced_statusbar_location : "bottom",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
20 theme_advanced_resizing : true,
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
21
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
22 // Example content CSS (should be your site CSS)
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
23 content_css : "css/content.css",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
24
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
25 // Drop lists for link/image/media/template dialogs
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
26 template_external_list_url : "lists/template_list.js",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
27 external_link_list_url : "lists/link_list.js",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
28 external_image_list_url : "lists/image_list.js",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
29 media_external_list_url : "lists/media_list.js",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
30
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
31 // Style formats
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
32 style_formats : [
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
33 {title : 'Bold text', inline : 'b'},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
34 {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
35 {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
36 {title : 'Example 1', inline : 'span', classes : 'example1'},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
37 {title : 'Example 2', inline : 'span', classes : 'example2'},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
38 {title : 'Table styles'},
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
39 {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
40 ],
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
41
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
42 // Replace values for the template plugin
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
43 template_replace_values : {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
44 username : "Some User",
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
45 staffid : "991234"
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
46 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
47 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
48 </script>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
49 <!-- /TinyMCE -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
50 <script type="text/javascript">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
51
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
52 var test="";
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
53 var url = "<%= request.getParameter("xpointer")%>";
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
54 $(document).ready(function()
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
55 {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
56 $("#existingAnnotations").load("./annotator/annotations?uri="+escape(url));
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
57 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
58 );
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
59
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
60 </script>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
61 </head>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
62 <h3>Annotator</h3>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
63 <form method="post" action="./annotator/annotations">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
64 <input type="hidden" value="complexAnnotation" name="mode"/>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
65 <div>Name <input type="text" name="username"></div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
66 <div>Password <input type="password" name="password"></div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
67 <hr/>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
68
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
69 <%
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
70 if (request.getParameter("xpointer") != null) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
71 out.print("<div>Annotated page: <input type=\"text\" size=\"100\" name=\"xpointer\" value=\" ");
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
72 out.print(request.getParameter("xpointer"));
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
73 out.println("\"/></div>");
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
74 } else {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
75 out.println("<div>Annotated page: <input type=\"text\" size=\"100\" name=\"xpointer\"></div>");
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
76 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
77 %>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
78
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
79
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
80 <div>Title of the Annotation<input type="text" size="100" name="title"></div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
81 <div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
82 <textarea cols="100" rows="50" name="text"></textarea>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
83 </div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
84 <div><input type="submit"/></div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
85 </form>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
86 <div id="existingAnnotations"></div>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
87 </html>