| changeset 1013 | 392ddcd212d7 |
| parent 988 | eefd336335f9 |
| child 1072 | ac1eacb3aa33 |
| 1012:7e18d953a1f8 | 1013:392ddcd212d7 |
|---|---|
1 /* TODO: Add Slide synchronization */ |
1 /* TODO: Add Slide synchronization */ |
2 |
2 |
3 IriSP.Widgets.Slideshare = function(player, config) { |
3 IriSP.Widgets.Slideshare = function(player, config) { |
4 IriSP.Widgets.Widget.call(this, player, config); |
4 IriSP.Widgets.Widget.call(this, player, config); |
5 } |
5 }; |
6 |
6 |
7 IriSP.Widgets.Slideshare.prototype = new IriSP.Widgets.Widget(); |
7 IriSP.Widgets.Slideshare.prototype = new IriSP.Widgets.Widget(); |
8 |
8 |
9 IriSP.Widgets.Slideshare.prototype.defaults = { |
9 IriSP.Widgets.Slideshare.prototype.defaults = { |
10 annotation_type: "slide", |
10 annotation_type: "slide", |
11 sync: true, |
11 sync: true, |
12 } |
12 }; |
13 |
13 |
14 IriSP.Widgets.Slideshare.prototype.messages = { |
14 IriSP.Widgets.Slideshare.prototype.messages = { |
15 fr: { |
15 fr: { |
16 slides_ : "Diapositives" |
16 slides_ : "Diapositives" |
17 }, |
17 }, |
18 en: { |
18 en: { |
19 slides_ : "Slides" |
19 slides_ : "Slides" |
20 } |
20 } |
21 } |
21 }; |
22 |
22 |
23 IriSP.Widgets.Slideshare.prototype.template = |
23 IriSP.Widgets.Slideshare.prototype.template = |
24 '<div class="Ldt-SlideShare"><h2>{{l10n.slides_}}</h2><hr /><div class="Ldt-SlideShare-Container"></div></div>'; |
24 '<div class="Ldt-SlideShare"><h2>{{l10n.slides_}}</h2><hr /><div class="Ldt-SlideShare-Container"></div></div>'; |
25 |
25 |
26 IriSP.Widgets.Slideshare.prototype.draw = function() { |
26 IriSP.Widgets.Slideshare.prototype.draw = function() { |
33 } else { |
33 } else { |
34 _lastEmbedded = _presentation; |
34 _lastEmbedded = _presentation; |
35 var _id = IriSP.Model.getUID(), |
35 var _id = IriSP.Model.getUID(), |
36 _params = { |
36 _params = { |
37 allowScriptAccess: "always" |
37 allowScriptAccess: "always" |
38 } |
38 }, |
39 _atts = { |
39 _atts = { |
40 id: _id |
40 id: _id |
41 }, |
41 }, |
42 _flashvars = { |
42 _flashvars = { |
43 doc : _presentation, |
43 doc : _presentation, |
67 this.renderTemplate(); |
67 this.renderTemplate(); |
68 var _lastPres = "", |
68 var _lastPres = "", |
69 _embedObject = null, |
69 _embedObject = null, |
70 _oembedCache = {}, |
70 _oembedCache = {}, |
71 _lastEmbedded = "", |
71 _lastEmbedded = "", |
72 _this = this |
72 _this = this, |
73 $container = this.$.find(".Ldt-SlideShare-Container"); |
73 $container = this.$.find(".Ldt-SlideShare-Container"); |
74 |
74 |
75 this.embed_width = this.embed_width || $container.innerWidth(); |
75 this.embed_width = this.embed_width || $container.innerWidth(); |
76 this.embed_height = this.embed_height || Math.floor(this.embed_width * 3/4); |
76 this.embed_height = this.embed_height || Math.floor(this.embed_width * 3/4); |
77 |
77 |
109 if (_this.sync && _embedObject && typeof _embedObject.jumpTo === "function") { |
109 if (_this.sync && _embedObject && typeof _embedObject.jumpTo === "function") { |
110 _embedObject.jumpTo(parseInt(_slide)); |
110 _embedObject.jumpTo(parseInt(_slide)); |
111 } |
111 } |
112 _lastPres = _presentation; |
112 _lastPres = _presentation; |
113 |
113 |
114 }) |
114 }); |
115 }) |
115 }); |
116 } |
116 } |
117 } |
117 }; |