--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Thu Jul 05 19:11:12 2012 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Fri Jul 06 15:48:37 2012 +0200
@@ -4,7 +4,7 @@
<div>
<div id="{{ player_id }}_embed" class="iri_player_embed">
</div>
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.js"></script>
+<script type="text/javascript" src="{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.js"></script>
<script type="text/javascript">
IriSP.libFiles.defaultDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}js/";
@@ -21,7 +21,7 @@
gui: {
width: '{{ player_width }}',
container: '{{ player_id }}_embed',
- css: '{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/LdtPlayer-core.css',
+ css: '{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.css',
default_options: {
metadata: _metadata
},
@@ -35,24 +35,35 @@
},{
type: "AnnotationsList",
container: "AnnotationsList_ext",
- ajax_url: "{% url segment_api_empty %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}"
+ ajax_url: "{% url segment_api_empty %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}",
+ ajax_granularity : 300000,
+ default_thumbnail : "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/imgs/video_sequence.png"
},{
type: "Controller"
},{
type: "Segments",
annotation_type: ["chap","découpage"]
},{
- type: "Slice"
+ type: "Slice",
+ start_visible : false,
+ live_update : true
},{
type: "Arrow",
- base_height: 4
+ base_height: 3
},{
- type: "Annotation"
+ type: "Annotation",
+ start_minimized: true,
+ site_name : "Lignes de Temps",
+ annotation_type: ["chap","découpage"]
},{
- type: "Tweet"
+ type: "Tweet",
+ hide_timeout: 5000
},{
type: "CreateAnnotation",
api_endpoint_template: "{% url annotation_api_empty %}{% templatetag openvariable %}id{% templatetag closevariable %}.json",
+ api_method: "PUT",
+ after_send_timeout: 8000,
+ close_after_send: false,
tag_titles: ["#amateur", "#digital-humanities"],
creator_name: '{{request.user.username}}',
creator_avatar: '{% thumbnail request.user.get_profile.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"
@@ -61,7 +72,7 @@
container: "Slideshare_ext",
embed_width: 400,
embed_height: 334,
- annotation_type: "Son"
+ annotation_type: "slide"
},{
type: "Mediafragment"
},{
--- a/src/ldt/ldt/static/ldt/metadataplayer/Annotation.js Thu Jul 05 19:11:12 2012 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Annotation.js Fri Jul 06 15:48:37 2012 +0200
@@ -30,7 +30,7 @@
'<div class="Ldt-Annotation-Widget {{#show_top_border}}Ldt-Annotation-ShowTop{{/show_top_border}}">'
+ '<div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}">'
+ '<div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>'
- + '<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized"></div>'
+ + '<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>'
+ '<h3 class="Ldt-Annotation-HiddenWhenEmpty"><span class="Ldt-Annotation-Title"></span> <span class="Ldt-Annotation-Time">'
+ '( <span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span> )</span></h3>'
+ '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time">'
--- a/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.js Thu Jul 05 19:11:12 2012 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.js Fri Jul 06 15:48:37 2012 +0200
@@ -19,7 +19,7 @@
/* number of milliseconds before/after the current timecode when calling the segment API
*/
ajax_granularity : 300000,
- default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
+ default_thumbnail : "",
/* URL when the annotation is not in the current project,
* e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}
*/
--- a/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Thu Jul 05 19:11:12 2012 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Fri Jul 06 15:48:37 2012 +0200
@@ -41,7 +41,8 @@
api_serializer: "ldt_annotate",
api_endpoint_template: "",
api_method: "PUT",
- close_widget_timeout: 0
+ after_send_timeout: 0,
+ close_after_send: false,
}
IriSP.Widgets.CreateAnnotation.prototype.messages = {
@@ -138,7 +139,9 @@
}
this.renderTemplate();
this.$.find(".Ldt-CreateAnnotation-Close").click(function() {
- _this.hide();
+ _this.close_after_send
+ ? _this.hide()
+ : _this.showScreen("Main");
return false;
});
this.$.find(".Ldt-CreateAnnotation-TagLi, .Ldt-CreateAnnotation-PolemicLi").click(function() {
@@ -314,8 +317,15 @@
data: _export.serialize(),
success: function(_data) {
_this.showScreen('Saved');
- if (_this.close_widget_timeout) {
- window.setTimeout(_this.functionWrapper("hide"),_this.close_widget_timeout);
+ if (_this.after_send_timeout) {
+ window.setTimeout(
+ function() {
+ _this.close_after_send
+ ? _this.hide()
+ : _this.showScreen("Main");
+ },
+ _this.after_send_timeout
+ );
}
_export.getAnnotations().removeElement(_annotation, true);
_export.deSerialize(_data);
@@ -332,7 +342,7 @@
window.setTimeout(function(){
_this.showScreen("Main")
},
- (_this.close_widget_timeout || 5000));
+ (_this.after_send_timeout || 5000));
}
});
this.showScreen('Wait');