src/js/serializers/JSONSerializer.js
branchpopcorn-port
changeset 591 e0df88905af8
parent 590 495ea8d73bed
child 595 29d86e6c61a6
equal deleted inserted replaced
590:495ea8d73bed 591:e0df88905af8
   232 
   232 
   233 IriSP.JSONSerializer.prototype.currentAnnotations = function(currentTime) {
   233 IriSP.JSONSerializer.prototype.currentAnnotations = function(currentTime) {
   234   var view;
   234   var view;
   235   var currentTimeMs = 1000 * currentTime;
   235   var currentTimeMs = 1000 * currentTime;
   236 
   236 
   237   var legal_ids = this.getNonTweetIds();
   237   var id = this.getChapitrage();
       
   238   /* FIXME: ugly */
       
   239   if (typeof(id) === "undefined")    
       
   240     var legal_ids = this.getNonTweetIds();
       
   241   else 
       
   242     legal_ids = [id];
   238   
   243   
   239   var ret_array = [];
   244   var ret_array = [];
   240   
   245   
   241   var i;
   246   var i;
   242   
   247   
   298 IriSP.JSONSerializer.prototype.getId = function(name) {
   303 IriSP.JSONSerializer.prototype.getId = function(name) {
   299   if (typeof(this._data.lists) === "undefined" || this._data.lists === null)
   304   if (typeof(this._data.lists) === "undefined" || this._data.lists === null)
   300     return;
   305     return;
   301 
   306 
   302   var e;
   307   var e;
   303   debugger;
       
   304   /* first get the list containing the tweets */
   308   /* first get the list containing the tweets */
   305   e = IriSP.underscore.find(this._data["annotation-types"], 
   309   e = IriSP.underscore.find(this._data["annotation-types"], 
   306                                   function(entry) { return (entry["dc:title"].indexOf(name) !== -1) });
   310                                   function(entry) { return (entry["dc:title"].indexOf(name) !== -1) });
   307   
   311   
   308   if (typeof(e) === "undefined")
   312   if (typeof(e) === "undefined")