changeset 1105:ccdac39eb3da

use preliminary username for annotations (we should use the annotation returned by the server).
author robcast
date Fri, 26 Oct 2012 17:55:13 +0200
parents 415da4e4b76b
children 68756216e018
files webapp/src/main/webapp/jquery/jquery.digilib.annotations.js
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.annotations.js	Fri Oct 26 14:54:11 2012 +0200
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.annotations.js	Fri Oct 26 17:55:13 2012 +0200
@@ -94,9 +94,10 @@
                 // interactive
                 setAnnotationMark(data);
             } else {
-                // use position and text
-                var annotation = newAnnotation(data, mpos, text);
+                // use position and text (and user-id)
+                var annotation = newAnnotation(data, mpos, text, null, null, data.settings.annotationUser);
                 storeAnnotation(data, annotation);
+                // TODO: replace with annotation returned by server
                 data.annotations.push(annotation);
                 digilib.fn.redisplay(data);
             }
@@ -146,7 +147,7 @@
             // Annotation text entered in JS-prompt
             var text = window.prompt("Annotation text:");
             if (text == null) return false;
-            var annotation = newAnnotation(data, pos, text);
+            var annotation = newAnnotation(data, pos, text, null, null, data.settings.annotationUser);
             storeAnnotation(data, annotation);
             data.annotations.push(annotation);
             digilib.fn.redisplay(data);