fixed getCurrentAnnotation popcorn-port
authorhamidouk
Fri, 06 Jan 2012 17:19:14 +0100
branchpopcorn-port
changeset 591 e0df88905af8
parent 590 495ea8d73bed
child 592 35459f92bb66
fixed getCurrentAnnotation
src/js/serializers/JSONSerializer.js
--- a/src/js/serializers/JSONSerializer.js	Fri Jan 06 16:50:52 2012 +0100
+++ b/src/js/serializers/JSONSerializer.js	Fri Jan 06 17:19:14 2012 +0100
@@ -234,7 +234,12 @@
   var view;
   var currentTimeMs = 1000 * currentTime;
 
-  var legal_ids = this.getNonTweetIds();
+  var id = this.getChapitrage();
+  /* FIXME: ugly */
+  if (typeof(id) === "undefined")    
+    var legal_ids = this.getNonTweetIds();
+  else 
+    legal_ids = [id];
   
   var ret_array = [];
   
@@ -300,7 +305,6 @@
     return;
 
   var e;
-  debugger;
   /* first get the list containing the tweets */
   e = IriSP.underscore.find(this._data["annotation-types"], 
                                   function(entry) { return (entry["dc:title"].indexOf(name) !== -1) });