accurator/commit

Made node annotation list more robust.

authorChris Dijkshoorn
Thu Apr 21 10:50:40 2016 +0200
committerChris Dijkshoorn
Thu Apr 21 10:50:40 2016 +0200
commit5d9cd5b2972a0842e88a54695c2038f3852eb450
treef602a564e6666e3193507e822c5fe7360338a564
parentfd9993930c3c30fab121d44d33ecedf2e619b4d2
Diff style: patch stat
diff --git a/web/css/accurator.css b/web/css/accurator.css
index 9d7b05b..948e714 100644
--- a/web/css/accurator.css
+++ b/web/css/accurator.css
@@ -127,8 +127,8 @@ Domain page
 }
 
 .noGutter {
-  margin-left: 0;
-  margin-right: 0;
+	margin-left: 0;
+	margin-right: 0;
 }
 
 .noPadding {
@@ -161,10 +161,6 @@ Profile page
 	padding-left: 0px;
 }
 
-.thumbnail {
-	cursor: pointer;
-}
-
 /*******************************************************************************
 Expertise page
 *******************************************************************************/
diff --git a/web/js/components/annotations.js b/web/js/components/annotations.js
index 1e09be9..84b9f11 100644
--- a/web/js/components/annotations.js
+++ b/web/js/components/annotations.js
@@ -26,8 +26,10 @@ AnnotationList.prototype.remove = function(annotation) {
 }
 
 AnnotationList.prototype.render = function() {
-	// Empty the field before showing all annotations
-	$("#" + this.divId).empty();
+	var node = $(this.node).find("#" + this.divId);
+
+	// empty the field before showing all annotations
+	node.empty();
 
 	// Render the annotations related to this field
 	for (var key in this.annotations) {
@@ -37,7 +39,7 @@ AnnotationList.prototype.render = function() {
 		var target = this.findTarget(annotation);
 
 		// Add annotation in div below field
-		$('#' + this.divId).append(
+		node.append(
 			$.el.span({
 				'id':'lbl' + id,
 				'class':'label label-primary lblAnnotation',