# HG changeset patch # User robcast # Date 1351266913 -7200 # Node ID ccdac39eb3da9e23c08f90320e5679ab552a82c7 # Parent 415da4e4b76ba5a3073d7a2eb1e05fe4a55b002e use preliminary username for annotations (we should use the annotation returned by the server). diff -r 415da4e4b76b -r ccdac39eb3da 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);