# HG changeset patch # User robcast # Date 1351266913 -7200 # Node ID c995f5702b7682a45e9abb8dbe9c556b3d4624ea # Parent 912d22acd4466360108c2417179e5638b7397628 use preliminary username for annotations (we should use the annotation returned by the server). diff -r 912d22acd446 -r c995f5702b76 webapp/src/main/webapp/jquery/jquery.digilib.annotations.js --- 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);