Index: main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/css/annotation.css
===================================================================
--- main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/css/annotation.css	(revision 28054)
+++ main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/css/annotation.css	(revision 28055)
@@ -68,5 +68,5 @@
     background: #FFFEE3 none repeat scroll 0 0;
     border: 1px solid #000000;
-    height: 78px;
+    height: 85px;
     padding: 7px;
     position: absolute;
Index: main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/js/jquery.annotate2.js
===================================================================
--- main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/js/jquery.annotate2.js	(revision 28054)
+++ main/trunk/model-cols-dev/pei-jones/collect/photos/script/image-annotator/js/jquery.annotate2.js	(revision 28055)
@@ -207,6 +207,6 @@
 				var left_pos = editable.area.position().left;
 				var top_pos = editable.area.position().top;
-				var width = editable.note.width;
-				var height = editable.note.height;
+				var width = editable.area.width();
+				var height = editable.area.height();
 				var id = editable.note.id;
 				//var page = editable.note.page;
@@ -216,24 +216,25 @@
 				
 				var json = '{ "top": ' + top_pos + ', "left": ' + left_pos + ', "width": ' + width + ', "height": ' + height + ', "text": "' + text + '", "id": ' + id + ', "editable": true, "page": ' + _page + ' }';
-				
 				var metaname = "gsimg.Annotation";
-				
 				var metadata_server_url = "cgi-bin/metadata-server.pl?";
-				
+
 				var saveIndexUrl = metadata_server_url + "a=set-metadata&site=" + gs.xsltParams.site_name + "&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=" + metaname + "&metavalue=" + json;
-				
 				var saveArchivesUrl = metadata_server_url + "a=set-archives-metadata&site=" + gs.xsltParams.site_name + "&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=" + metaname + "&metavalue=" + json;
-
-				if(prev !== undefined && prev !== null){
-					
-					var prevJson = '{ "top": ' + prev.top + ', "left": ' + prev.left + ', "width": ' + prev.width + ', "height": ' + height + ', "text": "' + prev.text + '", "id": ' + prev.id + ', "editable": true , "page": ' + _page + ' }';
-
-					saveArchivesUrl += "&prevmetavalue=" + prevJson + "&metamode=override" + "&metapos=" + (prev.id-1);
+				var saveImportUrl = metadata_server_url + "a=set-import-metadata&site=" + gs.xsltParams.site_name + "&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=" + metaname + "&metavalue=" + json;
+				
+				if(prev !== undefined && prev !== null)
+				{	
+					var prevJson = '{ "top": ' + prev.top + ', "left": ' + prev.left + ', "width": ' + prev.width + ', "height": ' + height + ', "text": "' + prev.text + '", "id": ' + prev.id + ', "editable": true, "page": ' + _page + ' }';
+					saveIndexUrl += "&prevmetavalue=" + prevJson + "&metamode=override";
+					saveArchivesUrl += "&prevmetavalue=" + prevJson + "&metamode=override";
+					saveImportUrl += "&prevmetavalue=" + prevJson + "&metamode=override";
 				}
-				
-				var saveImportUrl = metadata_server_url + "a=set-import-metadata&site=" + gs.xsltParams.site_name + "&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=" + metaname + "&metavalue=" + json;
-				
+
 				var saveIndexCallBack = {
-						success: function(response){ console.log("Save index metata successful! Note id: " + id);},
+						success: function(response)
+						{ 
+							YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=s&sa=c&c=" + gs.cgiParams.c, null); 
+							console.log("Save index metata successful! Note id: " + id);
+						},
 						failed: function(response){ console.log("Failed to save index metadata of note with id: " + id);}
 				};
@@ -257,5 +258,5 @@
 				YAHOO.util.Connect.asyncRequest("GET",saveIndexUrl,saveIndexCallBack);
 				YAHOO.util.Connect.asyncRequest("GET",saveArchivesUrl,saveArchivesUrl);
-				YAHOO.util.Connect.asyncRequest("GET",saveImportUrl,saveImportCallBack);	
+				YAHOO.util.Connect.asyncRequest("GET",saveImportUrl,saveImportCallBack);
             }
 
@@ -353,4 +354,8 @@
             handles: 'all',
 
+			resize: function(e, ui) {
+				form.css('left', area.offset().left + 'px');
+                form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px');
+			},
             stop: function(e, ui) {
                 form.css('left', area.offset().left + 'px');
