more matching for segments types. popcorn-port
authorhamidouk
Fri, 13 Jan 2012 17:27:54 +0100
branchpopcorn-port
changeset 633 00a59060d78d
parent 632 720ffcc65e36
child 634 9de33a5ef2b3
child 655 b1e2dfc7a740
more matching for segments types.
src/js/serializers/JSONSerializer.js
--- a/src/js/serializers/JSONSerializer.js	Fri Jan 13 16:20:21 2012 +0100
+++ b/src/js/serializers/JSONSerializer.js	Fri Jan 13 17:27:54 2012 +0100
@@ -329,7 +329,15 @@
 
 /** return the id of the ligne de temps named "Chapitrage" */
 IriSP.JSONSerializer.prototype.getChapitrage = function() {
-  return this.getId("Chapitrage");
+  var val = this.getId("Chapitrage");
+  if (typeof(val) === "undefined")
+    val = this.getId("Chapter");   
+  if (typeof(val) === "undefined")
+    val = this.getId("Chapit");
+  if (typeof(val) === "undefined")
+    val = this.getId("Chap");
+    
+  return val;
 };
 
 /** return the id of the ligne de temps named "Tweets" */
@@ -349,5 +357,13 @@
 
 /** return the id of the ligne de temps named "Contributions" */
 IriSP.JSONSerializer.prototype.getContributions = function() {
-  return this.getId("Contributions");
+  var val = this.getId("Contribution");
+  if (typeof(val) === "undefined")
+    val = this.getId("Particip");   
+  if (typeof(val) === "undefined")
+    val = this.getId("Contr");
+  if (typeof(val) === "undefined")
+    val = this.getId("Publ");
+    
+  return val;
 };
\ No newline at end of file