equal
deleted
inserted
replaced
7 IriSP.SlideShareWidget.prototype = new IriSP.Widget(); |
7 IriSP.SlideShareWidget.prototype = new IriSP.Widget(); |
8 |
8 |
9 IriSP.SlideShareWidget.prototype.draw = function() { |
9 IriSP.SlideShareWidget.prototype.draw = function() { |
10 var self = this; |
10 var self = this; |
11 |
11 |
|
12 // If the div supposed to host the slides does not exist, we cancel |
|
13 if(this.selector.length==0){ |
|
14 if(console){ if(console.log){ console.log("No div for slideshare widget, this widget is canceled. id = " + this._id); } } |
|
15 return; |
|
16 } |
12 var templ = Mustache.to_html(IriSP.slideShareWidget_template); |
17 var templ = Mustache.to_html(IriSP.slideShareWidget_template); |
13 this.selector.append(templ); |
18 this.selector.html(templ); |
14 |
19 |
15 // Synchro management |
20 // Synchro management |
16 this._disableUpdate = false; |
21 this._disableUpdate = false; |
17 this.selector.find('.sync_on').click(function(event) { self.syncHandler.call(self, event); }); |
22 this.selector.find('.sync_on').click(function(event) { self.syncHandler.call(self, event); }); |
18 this.selector.find('.sync_off').click(function(event) { self.unSyncHandler.call(self, event); }); |
23 this.selector.find('.sync_off').click(function(event) { self.unSyncHandler.call(self, event); }); |
34 |
39 |
35 // Get data from "slideshare" cutting/annotation-type |
40 // Get data from "slideshare" cutting/annotation-type |
36 var annotations = this._serializer._data.annotations; |
41 var annotations = this._serializer._data.annotations; |
37 var view_type = this._serializer.getSlideShareType(); |
42 var view_type = this._serializer.getSlideShareType(); |
38 if(typeof(view_type) === "undefined") { |
43 if(typeof(view_type) === "undefined") { |
39 return; |
44 if(console){ if(console.log){ console.log("No annotation-type for slideshare widget, this widget is canceled."); } } |
|
45 return; |
40 } |
46 } |
41 var i = 0; |
47 var i = 0; |
42 this.segments_slides = []; |
48 this.segments_slides = []; |
43 var nb_annot = annotations.length; |
49 var nb_annot = annotations.length; |
44 for (i = 0; i < nb_annot; i++) { |
50 for (i = 0; i < nb_annot; i++) { |