changeset 1364:c207fae4f14a

fix annotations disappearing after changing user.
author robcast
date Fri, 20 Feb 2015 20:17:07 +0100
parents ddc086449463
children 82a0b95c4e22
files webapp/src/main/webapp/jquery/jquery.digilib.annotator.js
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js	Mon Feb 16 19:44:54 2015 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js	Fri Feb 20 20:17:07 2015 +0100
@@ -103,14 +103,13 @@
         	// get new token
         	auth.token = null;
         	auth._unsafeToken = null;
-        	auth.requestToken();
         	// save new token in cookie
         	auth.withToken(function (tkn) {
         		data.dlOpts.annotationToken = auth.token;
 		        fn.storeOptions(data);
 		        // clear annotations
         		data.annotations = [];
-        		renderAnnotations(data);
+        		annotator.plugins.Store.annotations = [];
 	        	// reload annotations
         		annotator.plugins.Store.pluginInit();
         	});