v1.51.14 debug V01.51.14
authorcavaliet
Thu, 28 Nov 2013 10:43:18 +0100
changeset 1260 b3914d0f8c22
parent 1259 b1775e142c44
child 1261 e8e0c33275eb
v1.51.14 debug
src/ldt/ldt/__init__.py
src/ldt/ldt/ldt_utils/projectserializer.py
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html
--- a/src/ldt/ldt/__init__.py	Wed Nov 27 16:17:54 2013 +0100
+++ b/src/ldt/ldt/__init__.py	Thu Nov 28 10:43:18 2013 +0100
@@ -1,6 +1,6 @@
 __all__ = ["VERSION", "get_version", "__version__"]
 
-VERSION = (1, 51, 13, "final", 0)
+VERSION = (1, 51, 14, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/ldt_utils/projectserializer.py	Wed Nov 27 16:17:54 2013 +0100
+++ b/src/ldt/ldt/ldt_utils/projectserializer.py	Thu Nov 28 10:43:18 2013 +0100
@@ -700,9 +700,11 @@
         ctt_disp_node = display_node.xpath('content[@id="' + self.content.iri_id + '"]')[0]
         # remove shot by shot from display
         if not shot_by_shot:
-            dec_node = ctt_disp_node.xpath('decoupage[@id="de_PPP"]')[0]
-            if dec_node is not None:
-                ctt_disp_node.remove(dec_node)
+            dec_node = ctt_disp_node.xpath('decoupage[@id="de_PPP"]')
+            if len(dec_node)>0:
+                dec_node = dec_node[0]
+                if dec_node is not None:
+                    ctt_disp_node.remove(dec_node)
         
         # Parse all projects
         for p in self.projects:
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html	Wed Nov 27 16:17:54 2013 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html	Thu Nov 28 10:43:18 2013 +0100
@@ -83,7 +83,7 @@
         },{
             type: "Tweet",
             hide_timeout: 5000
-        },{
+        }{% if not toggle_multisegments %},{
             type: "CreateAnnotation",
             api_endpoint_template: "{% absurl 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}",
             after_send_timeout: 8000,
@@ -92,7 +92,7 @@
             slice_annotation_type: ["chap","découpage"],
             creator_name: '{{request.user.username}}',
             creator_avatar: '{% thumbnail request.user.image "48x48" format="PNG" crop="center" as im %}{{WEB_URL}}{{ im.url }}{% endthumbnail %}' || "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png"
-        },{
+        }{% endif %},{
             type: "Slideshare",
             container: "Slideshare_ext",
             embed_width: 400,