yaz/commit

emtpy reconciled tags before new reconcile

authorMichiel Hildebrand
Sun Jul 10 18:07:24 2011 +0200
committerMichiel Hildebrand
Sun Jul 10 18:07:24 2011 +0200
commiteeeef2aa92f857f1a782e3745963579c26021e78
treef75ce706ed50b0b77b2c1d1c022661c28afe4adb
parent3dd83db3d5dc8e7fc56334544cfc97798019a336
Diff style: patch stat
diff --git a/applications/yaz_garden.pl b/applications/yaz_garden.pl
index dc669a3..e10d123 100644
--- a/applications/yaz_garden.pl
+++ b/applications/yaz_garden.pl
@@ -224,6 +224,7 @@ html_video_page_yui(Video, Annotations, Groups, ReconcileSources, Options) -->
 		  \js_yui3_on(tagPlayer, itemSelect, \js_tag_select),
 		  \js_yui3_on(videoFrames, frameHover, \js_frame_hover),
 		  \js_yui3_on(videoFrames, frameSelect, \js_frame_select),
+		  \js_yui3_on(tagReconcile, reconcileStart, \js_reconcile_start),
 		  \js_yui3_on(tagReconcile, reconcileReturn, \js_reconcile_return),
 		  \js_yui3_on(tagLinker, applySelect, \js_apply_select(Video))
 		]).
@@ -257,6 +258,12 @@ js_frame_hover -->
 '   timeline.highlightIndex(e.index);\n'
 		     ]).
 
+js_reconcile_start -->
+	js_function([],
+		    \[
+'    tagPlayer.listNode.all("li .score").setContent("").addClass("hidden");'
+		     ]).
+
 js_reconcile_return -->
 	js_function([o],
 		    \[
@@ -265,7 +272,7 @@ js_reconcile_return -->
 '    tagPlayer.listNode.all("li").each(function(node, index) {
 	 var tag = tags[index].tag,
 	     r = Y.reconciled[tag.value];
-	 if(r&&r.result.length>0) {node.one(".score").setContent("?").removeClass("hidden")} else {node.addClass("hidden")};
+	 if(r&&r.result.length>0) {node.one(".score").setContent("?").removeClass("hidden")}
 	    })'
 		     ]).
 
diff --git a/web/js/tagplayer/tagReconcile.js b/web/js/tagplayer/tagReconcile.js
index 236dd74..535dd81 100644
--- a/web/js/tagplayer/tagReconcile.js
+++ b/web/js/tagplayer/tagReconcile.js
@@ -72,6 +72,7 @@ YUI.add('tag-reconcile', function(Y) {
 						+ "?callback={callback}"
 						+ source.parameters;
 				Y.log('reconcile against '+source.label);
+				this.fire("reconcileStart", {"source":source});
 				this.reconcile(url, 0);
 			}, this);
 		},
@@ -79,6 +80,7 @@ YUI.add('tag-reconcile', function(Y) {
 		syncUI : function() {
 		},
 
+		/* @TBD add handler to cancel the request */
 		reconcile : function(url, index) {
 			var oSelf = this,
 				tags = this.get("tags"),