yaz/commit

representation of confirm actions

authorMichiel Hildebrand
Wed Feb 9 18:05:57 2011 +0100
committerMichiel Hildebrand
Wed Feb 9 18:05:57 2011 +0100
commit3da4c1116b06c730af2501074d5f58ac21224cfa
treeb9f6dd4aa1c1a841635aafa8d9d150c2dabec4da
parent9d30a1c87e1d3ff5e1a7a26b15c5cad4fe754ee7
Diff style: patch stat
diff --git a/applications/yaz_mgarden.pl b/applications/yaz_mgarden.pl
index c016950..932fb00 100644
--- a/applications/yaz_mgarden.pl
+++ b/applications/yaz_mgarden.pl
@@ -249,7 +249,7 @@ js_confirm(Game, User) -->
 				       data:symbol(data),
 				       on:{success:symbol('function(id, o)
 				             {var r = Y.JSON.parse(o.responseText);
-					      tagCarousel.setConfirm(i,m,r.confirm,r.action)
+					      tagCarousel.setConfirm(i,m,r.id,e.action)
 					     }')},
 				       context:symbol(tagCarousel)
 				      }))
@@ -289,9 +289,8 @@ http_yaz_api_confirm_match(Request) :-
 			      rdfh_assert(Id, pprime:matchSource, Source),
 			      rdfh_assert(Id, pprime:matchTarget, Target)))
 	),
-  	reply_json(json([confirm=Id,
- 			 action=Action
- 			])).
+  	reply_json(json([id=Id
+  			])).
 
 
 confirmed(specific, Game, Action, Source, Target, Id) :-
@@ -335,7 +334,7 @@ http_yaz_api_mgarden_data(Request) :-
 			       [description('URL of the game')])
 			]),
 	current_user_process(Process),
-	Obj = json([confirm=Id, score=Score]),
+	Obj = json([id=Id, score=Score]),
 	findall(Obj, user_confirmed(User, Process, Game, Id, Score), Confirmed),
   	reply_json(Confirmed).
 
diff --git a/web/js/tagcarousel/tagcarousel.js b/web/js/tagcarousel/tagcarousel.js
index 7d447a7..574f765 100644
--- a/web/js/tagcarousel/tagcarousel.js
+++ b/web/js/tagcarousel/tagcarousel.js
@@ -414,7 +414,7 @@ YUI.add('tag-carousel', function(Y) {
 			for(var i=0; i < matches.length; i++) {
 				var match = matches[i];
 				if(match.score) {
-					var node = this.scores[match.confirm];
+					var node = this.scores[match.id];
 					if(node) {
 						node.one('.score')
 							.setContent(match.score)