diff -r a5607fa1ef0b -r a6602ce57aca test/integration/allocine_dossier_independant/js/LdtPlayer-release.js --- a/test/integration/allocine_dossier_independant/js/LdtPlayer-release.js Thu Apr 19 15:47:34 2012 +0200 +++ b/test/integration/allocine_dossier_independant/js/LdtPlayer-release.js Fri Apr 20 14:04:52 2012 +0200 @@ -1115,7 +1115,7 @@ IriSP.search_template = "{{! template for the search container }}
"; IriSP.share_template = "{{! social network sharing template }}       "; IriSP.sliceWidget_template = "{{! template for the slice widget }}
{{! the whole bar }}
{{! the zone which represents our slice }}
"; -IriSP.slideShareWidget_template = "{{! template for the slideShare widget of the other }}
"; +IriSP.slideShareWidget_template = "{{! template for the slideShare widget 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 }}
"; @@ -1675,7 +1675,7 @@ jQueryUI : "jquery-ui.min.js", jQueryToolTip : "jquery.tools.min.js", swfObject : "swfobject.js", - cssjQueryUI : "jquery-ui.css", + //cssjQueryUI : "jquery-ui.css", popcorn : "popcorn.js", jwplayer : "jwplayer.js", raphael : "raphael.js", @@ -1736,6 +1736,7 @@ random_tags : false, show_from_field : false, disable_share : false, + return_delay : 10000, polemic_mode : true, /* enable polemics ? */ polemics : [{ "className" : "positive", @@ -3619,7 +3620,7 @@ if (_this._state == "waitScreen") { _this.showEndScreen(annotation); if (_this.cinecast_version) { - window.setTimeout(function() { _this.showStartScreen(); }, typeof this.disable_share !== "undefined" && this.disable_share ? 5000 : 10000); + window.setTimeout(function() { _this.showStartScreen(); }, _this.return_delay); } } // hide the slicer widget @@ -4898,8 +4899,13 @@ IriSP.SlideShareWidget.prototype.draw = function() { var self = this; + // If the div supposed to host the slides does not exist, we cancel + if(this.selector.length==0){ + if(console){ if(console.log){ console.log("No div for slideshare widget, this widget is canceled. id = " + this._id); } } + return; + } var templ = Mustache.to_html(IriSP.slideShareWidget_template); - this.selector.append(templ); + this.selector.html(templ); // Synchro management this._disableUpdate = false; @@ -4910,7 +4916,9 @@ this.zoneLeft = 0; this.zoneWidth = 0; // global variable to save the last slide url - this.lastSlide = ""; + this.lastSSFullUrl = ""; + this.lastSSUrl = ""; + this.lastSSId = ""; this.containerDiv = this.selector.find('.SlideShareContainer'); // Update the slide from timeupdate event @@ -4923,7 +4931,8 @@ var annotations = this._serializer._data.annotations; var view_type = this._serializer.getSlideShareType(); if(typeof(view_type) === "undefined") { - return; + if(console){ if(console.log){ console.log("No annotation-type for slideshare widget, this widget is canceled."); } } + return; } var i = 0; this.segments_slides = []; @@ -4955,38 +4964,54 @@ var segment_slide = this.segments_slides[i]; if(segment_slide.begin