annotation_dashboard/commit

FIXED: broken update of the judgement attribute

authorJacco van Ossenbruggen
Fri Sep 19 15:55:53 2014 +0200
committerJacco van Ossenbruggen
Fri Sep 19 15:55:53 2014 +0200
commit0407421c06064be4c610cd8e3f5b5e3c2da34077
tree0d4a045f8d8016f9f8e68b2c51f3f183e0669daa
parent1662ce975e1d4e5b6fe226be376552b0bfd4c5c6
Diff style: patch stat
diff --git a/web/js/dashboard.js b/web/js/dashboard.js
index 9f6e80d..e9287db 100644
--- a/web/js/dashboard.js
+++ b/web/js/dashboard.js
@@ -11,7 +11,7 @@ YUI().use('event', 'json', 'io', function(Y) {
     function submitJudgement(ev, type, toggleto, mode) {
 	var button = ev.currentTarget;
 	button.detach('click');
-	
+
 	var annotationId = button.getAttribute('annotation');
 	var fieldId      = button.getAttribute('field');
 	var previous     = button.getAttribute('judgement');
@@ -42,7 +42,7 @@ YUI().use('event', 'json', 'io', function(Y) {
 		var peer = null;
 		if (buttons.item(0) == button) peer = buttons.item(1);
 		if (buttons.item(1) == button) peer = buttons.item(0);
-		buttons.setAttribute('judgement', r['@id']);
+		buttons.setAttribute('judgement', r.annotation['@id']);
 		button.removeClass('unchecked');
 		button.addClass('checked');
 		peer.addClass('unchecked');