diff -r 3e62fc730d8c -r 61d507c98678 web/LdtPlayer-release.js --- a/web/LdtPlayer-release.js Fri Dec 16 12:23:13 2011 +0100 +++ b/web/LdtPlayer-release.js Fri Dec 16 12:26:56 2011 +0100 @@ -8671,14 +8671,14 @@ IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}
"; -IriSP.annotationWidget_template = "{{! template for the annotation widget }}
share on facebook share on twitter share on google+
"; +IriSP.annotationWidget_template = "{{! template for the annotation widget }}
share on facebook share on twitter share on google+
"; IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}
 
Chargement...
"; IriSP.arrowWidget_template = "
"; IriSP.overlay_marker_template = "{{! the template for the small white bars which is z-indexed over our segment widget }}
"; IriSP.player_template = "{{! template for the radio player }}
/
"; IriSP.search_template = "{{! template for the search container }}
"; IriSP.share_template = "{{! social network sharing template }}       "; -IriSP.sliderWidget_template = "{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }}
"; +IriSP.sliderWidget_template = "{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }}
"; IriSP.tooltip_template = "{{! template used by the jquery ui tooltip }}
{{title}}
{{begin}} : {{end}}
{{description}}
"; IriSP.tooltipWidget_template = "{{! template for the tooltip widget }}
"; IriSP.tweetWidget_template = "{{! template for the tweet widget }}
";/* wrapper that simulates popcorn.js because @@ -9138,7 +9138,12 @@ IriSP.widgetsDefaults = { "LayoutManager" : {spacer_div_height : "0px" }, "PlayerWidget" : {}, - "AnnotationsWidget": {}, + "AnnotationsWidget": { + "share_text" : "I'm watching ", + "fb_link" : "http://www.facebook.com/share.php?u=", + "tw_link" : "http://twitter.com/home?status=", + "gplus_link" : "" + }, "TweetsWidget" : { default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", tweet_display_period: 10000 // how long do we show a tweet ? @@ -9150,7 +9155,7 @@ IriSP.paths = { // "imgs": "/tweetlive/res/metadataplayer/src/css/imgs" - "imgs": "/mdp/src/css/imgs" + "imgs": "imgs" }; IriSP.default_templates_vars = { "img_dir" : IriSP.paths.imgs @@ -9664,7 +9669,7 @@ this.selector.find(".Ldt-SaKeywordText").text(""); }; -IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { +IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { var title = annotation.content.title; var description = annotation.content.description; @@ -9672,12 +9677,23 @@ var begin = +annotation.begin / 1000; var end = +annotation.end / 1000; var duration = +this._serializer.currentMedia().meta["dc:duration"]; - + var title_templ = "{{title}} - ( {{begin}} - {{end}} )"; var endstr = Mustache.to_html(title_templ, {title: title, begin: IriSP.secondsToTime(begin), end: IriSP.secondsToTime(end)}); this.selector.find(".Ldt-SaTitle").text(endstr); this.selector.find(".Ldt-SaDescription").text(description); + + // update sharing buttons + var defaults = IriSP.widgetsDefaults.AnnotationsWidget; + var text = defaults.share_text; + var fb_link = defaults.fb_link; + var tw_link = defaults.tw_link; + var gplus_link = defaults.gplus_link; + var url = document.location.href + "#a=" + annotation.id; + this.selector.find(".Ldt-fbShare").attr("href", fb_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); + this.selector.find(".Ldt-TwShare").attr("href", tw_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); + this.selector.find(".Ldt-GplusShare").attr("href", fb_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); }; IriSP.AnnotationsWidget.prototype.clearWidget = function() { @@ -10676,6 +10692,7 @@ this.sliderBackground.animate({"height": "9px"}, 100); this.sliderForeground.animate({"height": "9px"}, 100); + this.positionMarker.animate({"height": "9px", "width": "9px", "margin-top": "-4px"}, 100); // this.selector.removeClass("Ldt-SliderMinimized"); // this.selector.addClass("Ldt-SliderMaximized"); @@ -10691,6 +10708,8 @@ IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) { this.sliderBackground.animate({"height": "5px"}, 100); this.sliderForeground.animate({"height": "5px"}, 100); + this.positionMarker.animate({"height": "5px", "width": "5px", "margin-top": "0px"}, 100); + this.sliderMinimized = true; // this.selector.removeClass("Ldt-SliderMaximized");