v0.5.13 player for opera first step V00.05.13
authorcavaliet
Fri, 16 May 2014 17:24:25 +0200
changeset 95 41f6eacb4f09
parent 94 0d1a177f9712
child 96 ca0436d50147
v0.5.13 player for opera first step
src/spel/__init__.py
src/spel/static/spel/metadataplayer/SpelSyncHtml.js
src/spel/static/spel/metadataplayer/spel-serializer.js
src/spel/templates/spel_player.html
--- a/src/spel/__init__.py	Fri May 16 11:58:12 2014 +0200
+++ b/src/spel/__init__.py	Fri May 16 17:24:25 2014 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 5, 12, "final", 0)
+VERSION = (0, 5, 13, "final", 0)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
 
--- a/src/spel/static/spel/metadataplayer/SpelSyncHtml.js	Fri May 16 11:58:12 2014 +0200
+++ b/src/spel/static/spel/metadataplayer/SpelSyncHtml.js	Fri May 16 17:24:25 2014 +0200
@@ -1,5 +1,4 @@
 IriSP.Widgets.SpelSyncHtml = function(player, config) {
-    console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget");
     IriSP.Widgets.Widget.call(this, player, config);
 };
 
--- a/src/spel/static/spel/metadataplayer/spel-serializer.js	Fri May 16 11:58:12 2014 +0200
+++ b/src/spel/static/spel/metadataplayer/spel-serializer.js	Fri May 16 17:24:25 2014 +0200
@@ -92,7 +92,7 @@
         
         if (typeof _data.meta !== "undefined") {
             _source.projectId = _data.meta.id;
-            _source.title = _data.meta["dc:title"] || _data.meta.title || "";
+            _source.title = _data.meta["dc:title"] || _data.meta.title || (_data.meta["ucm:oeuvre"] + " " + _data.meta["dc:created"].substr(0,10)) || "";
             _source.description = _data.meta["dc:description"] || _data.meta.description || "";
             _source.creator = _data.meta["dc:creator"] || _data.meta.creator || "";
             _source.contributor = _data.meta["dc:contributor"] || _data.meta.contributor || _source.creator;
--- a/src/spel/templates/spel_player.html	Fri May 16 11:58:12 2014 +0200
+++ b/src/spel/templates/spel_player.html	Fri May 16 17:24:25 2014 +0200
@@ -29,7 +29,7 @@
             IriSP.libFiles.defaultDir = "{% static 'spel/lib' %}";
             IriSP.widgetsDir = "{% static 'spel/metadataplayer' %}";
             var _metadata = {
-                url: "/data/" + d + "/" + g + "/cinelab_iri.json",
+                url: "/data/" + d + "/" + g + "/cinelab" + ( (d!="opera") ? "_iri" : "" ) + ".json",
                 format: 'spel'
             };
             var _config = {
@@ -158,13 +158,16 @@
                         container: "AnnotationsListContainer",
                         height: 600,
                         width: 500,
-                        src: "{% url 'spel_ctb' %}"
+                        src: ( (d!="opera") ? "{% url 'spel_ctb' %}" : "")
                     },
                     {
                         type: "Mediafragment"
                     }
                 ]
             };
+            if(d=="opera"){
+                _config["widgets"].splice(1,0,{ type: "PlaceholderPlayer" });
+            }
             _myPlayer = new IriSP.Metadataplayer(_config);
         }
     });