8669 } |
8669 } |
8670 }; |
8670 }; |
8671 |
8671 |
8672 |
8672 |
8673 IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}<div title='{{divTitle}}' id='{{id}}' class='Ldt-iri-chapter' style='left: {{startPourcent}}%; width: {{endPourcent}}%; background:#{{hexa_color}};' ></div>"; |
8673 IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}<div title='{{divTitle}}' id='{{id}}' class='Ldt-iri-chapter' style='left: {{startPourcent}}%; width: {{endPourcent}}%; background:#{{hexa_color}};' ></div>"; |
8674 IriSP.annotationWidget_template = "{{! template for the annotation widget }}<div class='Ldt-AnnotationsWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-Annotation-DoubleBorder'> <div class='Ldt-AnnotationContent'> <div class='Ldt-AnnotationShareIcons'> <a href=''><img src='{{img_dir}}/facebook.png' alt='share on facebook'></img></a> <a href=''><img src='{{img_dir}}/twitter.png' alt='share on twitter'></img></a> <a href=''><img src='{{img_dir}}/google.png' alt='share on google+'></img></a> </div> <div class='Ldt-SaTitle'></div> <div class='Ldt-SaDescription'></div> </div> </div></div>"; |
8674 IriSP.annotationWidget_template = "{{! template for the annotation widget }}<div class='Ldt-AnnotationsWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-Annotation-DoubleBorder'> <div class='Ldt-AnnotationContent'> <div class='Ldt-AnnotationShareIcons'> <a class='Ldt-fbShare' href=''><img src='{{img_dir}}/facebook.png' alt='share on facebook'></img></a> <a class='Ldt-TwShare' href=''><img src='{{img_dir}}/twitter.png' alt='share on twitter'></img></a> <a class='Ldt-GplusShare' href=''><img src='{{img_dir}}/google.png' alt='share on google+'></img></a> </div> <div class='Ldt-SaTitle'></div> <div class='Ldt-SaDescription'></div> </div> </div></div>"; |
8675 IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}<div id='Ldt-load-container'><div id='Ldt-loader'> </div> Chargement... </div>"; |
8675 IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}<div id='Ldt-load-container'><div id='Ldt-loader'> </div> Chargement... </div>"; |
8676 IriSP.arrowWidget_template = "<div class='Ldt-arrowWidget'></div>"; |
8676 IriSP.arrowWidget_template = "<div class='Ldt-arrowWidget'></div>"; |
8677 IriSP.overlay_marker_template = "{{! the template for the small white bars which is z-indexed over our segment widget }}<div class='positionMarker'></div>"; |
8677 IriSP.overlay_marker_template = "{{! the template for the small white bars which is z-indexed over our segment widget }}<div class='positionMarker'></div>"; |
8678 IriSP.player_template = "{{! template for the radio player }}<div class='Ldt-controler demo'> <div class='Ldt-LeftPlayerControls'> <div class='Ldt-button Ldt-CtrlPlay'></div> <div class='Ldt-button Ldt-CtrlAnnotate'></div> <div class='Ldt-button Ldt-CtrlSearch'></div> </div> <div class='Ldt-RightPlayerControls'> <div class='Ldt-Time'> <div class='Ldt-ElapsedTime'></div> <div class='Ldt-TimeSeparator'>/</div> <div class='Ldt-TotalTime'></div> </div> <div class='Ldt-button Ldt-CtrlSound'></div> </div></div>"; |
8678 IriSP.player_template = "{{! template for the radio player }}<div class='Ldt-controler demo'> <div class='Ldt-LeftPlayerControls'> <div class='Ldt-button Ldt-CtrlPlay'></div> <div class='Ldt-button Ldt-CtrlAnnotate'></div> <div class='Ldt-button Ldt-CtrlSearch'></div> </div> <div class='Ldt-RightPlayerControls'> <div class='Ldt-Time'> <div class='Ldt-ElapsedTime'></div> <div class='Ldt-TimeSeparator'>/</div> <div class='Ldt-TotalTime'></div> </div> <div class='Ldt-button Ldt-CtrlSound'></div> </div></div>"; |
8679 IriSP.search_template = "{{! template for the search container }}<div class='LdtSearchContainer' style='margin-left: {{margin_left}}; position: absolute; margin-top: -60px;'> <div class='LdtSearch' style='display: none; background-color: #EEE; width: 165px; boder: 1px; border-color: #CFCFCF; position: absolute; text-align: center;'> <input class='LdtSearchInput' style='margin-top: 2px; margin-bottom: 2px;' /> </div></div><div class='cleaner'></div>"; |
8679 IriSP.search_template = "{{! template for the search container }}<div class='LdtSearchContainer' style='margin-left: {{margin_left}}; position: absolute; margin-top: -60px;'> <div class='LdtSearch' style='display: none; background-color: #EEE; width: 165px; boder: 1px; border-color: #CFCFCF; position: absolute; text-align: center;'> <input class='LdtSearchInput' style='margin-top: 2px; margin-bottom: 2px;' /> </div></div><div class='cleaner'></div>"; |
8680 IriSP.share_template = "{{! social network sharing template }}<a onclick='__IriSP.MyApiPlayer.share(\'delicious\');' title='partager avec delicious'><span class='share shareDelicious'> </span></a> <a onclick='__IriSP.MyApiPlayer.share(\'facebook\');' title='partager avec facebook'> <span class='share shareFacebook'> </span></a><a onclick='__IriSP.MyApiPlayer.share(\'twitter\');' title='partager avec twitter'> <span class='share shareTwitter'> </span></a><a onclick='__IriSP.MyApiPlayer.share(\'myspace\');' title='partager avec Myspace'> <span class='share shareMySpace'> </span></a>"; |
8680 IriSP.share_template = "{{! social network sharing template }}<a onclick='__IriSP.MyApiPlayer.share(\'delicious\');' title='partager avec delicious'><span class='share shareDelicious'> </span></a> <a onclick='__IriSP.MyApiPlayer.share(\'facebook\');' title='partager avec facebook'> <span class='share shareFacebook'> </span></a><a onclick='__IriSP.MyApiPlayer.share(\'twitter\');' title='partager avec twitter'> <span class='share shareTwitter'> </span></a><a onclick='__IriSP.MyApiPlayer.share(\'myspace\');' title='partager avec Myspace'> <span class='share shareMySpace'> </span></a>"; |
8681 IriSP.sliderWidget_template = "{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }} <div class='Ldt-sliderBackground'></div><div class='Ldt-sliderForeground'></div><div class='Ldt-sliderPositionMarker'></div>"; |
8681 IriSP.sliderWidget_template = "{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }}<div class='Ldt-sliderBackground'></div><div class='Ldt-sliderForeground'></div><div class='Ldt-sliderPositionMarker'></div>"; |
8682 IriSP.tooltip_template = "{{! template used by the jquery ui tooltip }}<div class='Ldt-tooltip'> <div class='title'>{{title}}</div> <div class='time'>{{begin}} : {{end}} </div> <div class='description'>{{description}}</div></div>"; |
8682 IriSP.tooltip_template = "{{! template used by the jquery ui tooltip }}<div class='Ldt-tooltip'> <div class='title'>{{title}}</div> <div class='time'>{{begin}} : {{end}} </div> <div class='description'>{{description}}</div></div>"; |
8683 IriSP.tooltipWidget_template = "{{! template for the tooltip widget }}<div class='tip'> <div class='tipcolor' style='height:10px;width:10px'></div> <div class='tiptext'></div>"; |
8683 IriSP.tooltipWidget_template = "{{! template for the tooltip widget }}<div class='tip'> <div class='tipcolor' style='height:10px;width:10px'></div> <div class='tiptext'></div>"; |
8684 IriSP.tweetWidget_template = "{{! template for the tweet widget }}<div class='Ldt-tweetWidget'> <div class='Ldt-tweet-DoubleBorder'> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetKeepOpen' alt='dont minimize automatically'></img> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetMinimize' alt='minimize window'></img> <div class='Ldt-tweetAvatar'></div> <img src='{{img_dir}}/profile_arrow.png' class='Ldt-tweetAvatar-profileArrow'></img> <div class='Ldt-tweetContents'></div> <a href='' target='_blank' class='Ldt-Retweet'><div class='Ldt-RetweetIcon'></div> - Retweet </a> <a href='' target='_blank' class='Ldt-TweetReply'><div class='Ldt-TweetReplyIcon'></div> - Reply</a> </div></div>";/* wrapper that simulates popcorn.js because |
8684 IriSP.tweetWidget_template = "{{! template for the tweet widget }}<div class='Ldt-tweetWidget'> <div class='Ldt-tweet-DoubleBorder'> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetKeepOpen' alt='dont minimize automatically'></img> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetMinimize' alt='minimize window'></img> <div class='Ldt-tweetAvatar'></div> <img src='{{img_dir}}/profile_arrow.png' class='Ldt-tweetAvatar-profileArrow'></img> <div class='Ldt-tweetContents'></div> <a href='' target='_blank' class='Ldt-Retweet'><div class='Ldt-RetweetIcon'></div> - Retweet </a> <a href='' target='_blank' class='Ldt-TweetReply'><div class='Ldt-TweetReplyIcon'></div> - Reply</a> </div></div>";/* wrapper that simulates popcorn.js because |
8685 popcorn is a bit unstable at the time */ |
8685 popcorn is a bit unstable at the time */ |
8686 |
8686 |
9136 IriSP.config = undefined; |
9136 IriSP.config = undefined; |
9137 |
9137 |
9138 IriSP.widgetsDefaults = { |
9138 IriSP.widgetsDefaults = { |
9139 "LayoutManager" : {spacer_div_height : "0px" }, |
9139 "LayoutManager" : {spacer_div_height : "0px" }, |
9140 "PlayerWidget" : {}, |
9140 "PlayerWidget" : {}, |
9141 "AnnotationsWidget": {}, |
9141 "AnnotationsWidget": { |
|
9142 "share_text" : "I'm watching ", |
|
9143 "fb_link" : "http://www.facebook.com/share.php?u=", |
|
9144 "tw_link" : "http://twitter.com/home?status=", |
|
9145 "gplus_link" : "" |
|
9146 }, |
9142 "TweetsWidget" : { |
9147 "TweetsWidget" : { |
9143 default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", |
9148 default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", |
9144 tweet_display_period: 10000 // how long do we show a tweet ? |
9149 tweet_display_period: 10000 // how long do we show a tweet ? |
9145 }, |
9150 }, |
9146 "SliderWidget" : { |
9151 "SliderWidget" : { |
9662 this.selector.find(".Ldt-SaTitle").text(""); |
9667 this.selector.find(".Ldt-SaTitle").text(""); |
9663 this.selector.find(".Ldt-SaDescription").text(""); |
9668 this.selector.find(".Ldt-SaDescription").text(""); |
9664 this.selector.find(".Ldt-SaKeywordText").text(""); |
9669 this.selector.find(".Ldt-SaKeywordText").text(""); |
9665 }; |
9670 }; |
9666 |
9671 |
9667 IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { |
9672 IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { |
9668 |
9673 |
9669 var title = annotation.content.title; |
9674 var title = annotation.content.title; |
9670 var description = annotation.content.description; |
9675 var description = annotation.content.description; |
9671 var keywords = "" // FIXME; |
9676 var keywords = "" // FIXME; |
9672 var begin = +annotation.begin / 1000; |
9677 var begin = +annotation.begin / 1000; |
9673 var end = +annotation.end / 1000; |
9678 var end = +annotation.end / 1000; |
9674 var duration = +this._serializer.currentMedia().meta["dc:duration"]; |
9679 var duration = +this._serializer.currentMedia().meta["dc:duration"]; |
9675 |
9680 |
9676 var title_templ = "{{title}} - ( {{begin}} - {{end}} )"; |
9681 var title_templ = "{{title}} - ( {{begin}} - {{end}} )"; |
9677 var endstr = Mustache.to_html(title_templ, {title: title, begin: IriSP.secondsToTime(begin), end: IriSP.secondsToTime(end)}); |
9682 var endstr = Mustache.to_html(title_templ, {title: title, begin: IriSP.secondsToTime(begin), end: IriSP.secondsToTime(end)}); |
9678 |
9683 |
9679 this.selector.find(".Ldt-SaTitle").text(endstr); |
9684 this.selector.find(".Ldt-SaTitle").text(endstr); |
9680 this.selector.find(".Ldt-SaDescription").text(description); |
9685 this.selector.find(".Ldt-SaDescription").text(description); |
|
9686 |
|
9687 // update sharing buttons |
|
9688 var defaults = IriSP.widgetsDefaults.AnnotationsWidget; |
|
9689 var text = defaults.share_text; |
|
9690 var fb_link = defaults.fb_link; |
|
9691 var tw_link = defaults.tw_link; |
|
9692 var gplus_link = defaults.gplus_link; |
|
9693 var url = document.location.href + "#a=" + annotation.id; |
|
9694 this.selector.find(".Ldt-fbShare").attr("href", fb_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); |
|
9695 this.selector.find(".Ldt-TwShare").attr("href", tw_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); |
|
9696 this.selector.find(".Ldt-GplusShare").attr("href", fb_link + IriSP.encodeURI(text) + IriSP.encodeURI(url)); |
9681 }; |
9697 }; |
9682 |
9698 |
9683 IriSP.AnnotationsWidget.prototype.clearWidget = function() { |
9699 IriSP.AnnotationsWidget.prototype.clearWidget = function() { |
9684 |
9700 |
9685 |
9701 |
10674 |
10690 |
10675 this.sliderMaximized = true; |
10691 this.sliderMaximized = true; |
10676 |
10692 |
10677 this.sliderBackground.animate({"height": "9px"}, 100); |
10693 this.sliderBackground.animate({"height": "9px"}, 100); |
10678 this.sliderForeground.animate({"height": "9px"}, 100); |
10694 this.sliderForeground.animate({"height": "9px"}, 100); |
|
10695 this.positionMarker.animate({"height": "9px", "width": "9px", "margin-top": "-4px"}, 100); |
10679 |
10696 |
10680 // this.selector.removeClass("Ldt-SliderMinimized"); |
10697 // this.selector.removeClass("Ldt-SliderMinimized"); |
10681 // this.selector.addClass("Ldt-SliderMaximized"); |
10698 // this.selector.addClass("Ldt-SliderMaximized"); |
10682 }; |
10699 }; |
10683 |
10700 |
10689 }; |
10706 }; |
10690 |
10707 |
10691 IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) { |
10708 IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) { |
10692 this.sliderBackground.animate({"height": "5px"}, 100); |
10709 this.sliderBackground.animate({"height": "5px"}, 100); |
10693 this.sliderForeground.animate({"height": "5px"}, 100); |
10710 this.sliderForeground.animate({"height": "5px"}, 100); |
|
10711 this.positionMarker.animate({"height": "5px", "width": "5px", "margin-top": "0px"}, 100); |
|
10712 |
10694 this.sliderMinimized = true; |
10713 this.sliderMinimized = true; |
10695 |
10714 |
10696 // this.selector.removeClass("Ldt-SliderMaximized"); |
10715 // this.selector.removeClass("Ldt-SliderMaximized"); |
10697 // this.selector.addClass("Ldt-SliderMinimized"); |
10716 // this.selector.addClass("Ldt-SliderMinimized"); |
10698 |
10717 |