11 |
11 |
12 IriSP.Widgets.Annotation.prototype.messages = { |
12 IriSP.Widgets.Annotation.prototype.messages = { |
13 fr: { |
13 fr: { |
14 watching: "Je regarde ", |
14 watching: "Je regarde ", |
15 on_site: " sur ", |
15 on_site: " sur ", |
16 tags_: "Mots-clés :", |
16 tags_: "Mots-clés\u00a0:", |
17 description_: "Description :", |
17 description_: "Description\u00a0:", |
18 excerpt_from: "Extrait de :", |
18 excerpt_from: "Extrait de\u00a0:", |
19 untitled: "Segment sans titre" |
19 untitled: "Segment sans titre" |
20 }, |
20 }, |
21 en: { |
21 en: { |
22 watching: "I'm watching ", |
22 watching: "I'm watching ", |
23 on_site: " on ", |
23 on_site: " on ", |
32 '{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}' |
32 '{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}' |
33 + '<div class="Ldt-Annotation-Widget {{^show_arrow}}Ldt-Annotation-ShowTop{{/show_arrow}}">' |
33 + '<div class="Ldt-Annotation-Widget {{^show_arrow}}Ldt-Annotation-ShowTop{{/show_arrow}}">' |
34 + '<div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}">' |
34 + '<div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}">' |
35 + '<div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>' |
35 + '<div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>' |
36 + '{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}' |
36 + '{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}' |
37 + '<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<span class="Ldt-Annotation-Title"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">' |
37 + '<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<a class="Ldt-Annotation-Title" href="#"></a> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">' |
38 + '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>' |
38 + '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>' |
39 + '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">' |
39 + '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">' |
40 + '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>' |
40 + '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>' |
41 + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>' |
41 + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>' |
42 + '<p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>' |
42 + '<p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>' |
46 |
46 |
47 IriSP.Widgets.Annotation.prototype.defaults = { |
47 IriSP.Widgets.Annotation.prototype.defaults = { |
48 annotation_type : "chap", |
48 annotation_type : "chap", |
49 start_minimized: false, |
49 start_minimized: false, |
50 show_arrow : true, |
50 show_arrow : true, |
|
51 arrow_position: .5, |
51 site_name : "Lignes de Temps", |
52 site_name : "Lignes de Temps", |
52 search_on_tag_click: true, |
53 search_on_tag_click: true, |
53 show_social: true, |
54 show_social: true, |
54 show_annotation_type: false |
55 show_annotation_type: false |
55 } |
56 } |
138 },800); |
139 },800); |
139 } |
140 } |
140 _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty"); |
141 _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty"); |
141 _this.bounds = [ _annotation.begin, _annotation.end ]; |
142 _this.bounds = [ _annotation.begin, _annotation.end ]; |
142 if (_this.arrow) { |
143 if (_this.arrow) { |
143 _this.arrow.moveToTime((_annotation.begin + _annotation.end)/2); |
144 _this.arrow.moveToTime((1 - _this.arrow_position) * _annotation.begin + _this.arrow_position * _annotation.end); |
144 } |
145 } |
145 _this.sendBounds(); |
146 _this.sendBounds(); |
146 } |
147 } |
147 |
148 |
148 this.renderTemplate(); |
149 this.renderTemplate(); |
|
150 |
|
151 this.$.find(".Ldt-Annotation-Title").click(function() { |
|
152 if (currentAnnotation) { |
|
153 _this.media.setCurrentTime(currentAnnotation.begin); |
|
154 } |
|
155 return false; |
|
156 }); |
149 |
157 |
150 if (this.show_social) { |
158 if (this.show_social) { |
151 this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget"); |
159 this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget"); |
152 } |
160 } |
153 |
161 |
154 this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow"); |
162 if (this.show_arrow) { |
|
163 this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow"); |
|
164 } |
155 this.onMediaEvent("timeupdate",timeupdate); |
165 this.onMediaEvent("timeupdate",timeupdate); |
156 this.onMdpEvent("Annotation.hide","hide"); |
166 this.onMdpEvent("Annotation.hide","hide"); |
157 this.onMdpEvent("Annotation.show","show"); |
167 this.onMdpEvent("Annotation.show","show"); |
158 this.onMdpEvent("Annotation.minimize","minimize"); |
168 this.onMdpEvent("Annotation.minimize","minimize"); |
159 this.onMdpEvent("Annotation.maximize","maximize"); |
169 this.onMdpEvent("Annotation.maximize","maximize"); |