equal
deleted
inserted
replaced
17 */ |
17 */ |
18 ajax_url : false, |
18 ajax_url : false, |
19 /* number of milliseconds before/after the current timecode when calling the segment API |
19 /* number of milliseconds before/after the current timecode when calling the segment API |
20 */ |
20 */ |
21 ajax_granularity : 300000, |
21 ajax_granularity : 300000, |
22 default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png", |
22 default_thumbnail : "", |
23 /* URL when the annotation is not in the current project, |
23 /* URL when the annotation is not in the current project, |
24 * e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}} |
24 * e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}} |
25 */ |
25 */ |
26 foreign_url : "", |
26 foreign_url : "", |
27 annotation_type : false, |
27 annotation_type : false, |
197 _description = _annotation.title; |
197 _description = _annotation.title; |
198 _title = _annotation.creator; |
198 _title = _annotation.creator; |
199 } |
199 } |
200 var _bgcolor; |
200 var _bgcolor; |
201 IriSP._(_this.polemics).each(function(_polemic) { |
201 IriSP._(_this.polemics).each(function(_polemic) { |
202 var _rgxp = IriSP.Model.regexpFromTextOrArray(_polemic.keyword); |
202 var _rgxp = IriSP.Model.regexpFromTextOrArray(_polemic.keyword, true); |
203 if (_rgxp.test(_title + " " + _description)) { |
203 if (_rgxp.test(_title + " " + _description)) { |
204 _bgcolor = _polemic.background_color; |
204 _bgcolor = _polemic.background_color; |
205 } |
205 } |
206 }); |
206 }); |
207 var _res = { |
207 var _res = { |
236 this.$.find('.Ldt-AnnotationsList-Tag-Li').click(function() { |
236 this.$.find('.Ldt-AnnotationsList-Tag-Li').click(function() { |
237 _this.player.popcorn.trigger("IriSP.search.triggeredSearch", IriSP.jQuery(this).text().replace(/(^\s+|\s+$)/g,'')); |
237 _this.player.popcorn.trigger("IriSP.search.triggeredSearch", IriSP.jQuery(this).text().replace(/(^\s+|\s+$)/g,'')); |
238 }) |
238 }) |
239 |
239 |
240 if(this.searchString) { |
240 if(this.searchString) { |
241 var _searchRe = new RegExp('(' + this.searchString.replace(/(\W)/gm,'\\$1') + ')','gim'); |
241 var _searchRe = IriSP.Model.regexpFromTextOrArray(this.searchString); |
242 this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function() { |
242 this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function() { |
243 var _$ = IriSP.jQuery(this); |
243 var _$ = IriSP.jQuery(this); |
244 _$.html(_$.text().replace(/(^\s+|\s+$)/g,'').replace(_searchRe, '<span class="Ldt-AnnotationsList-highlight">$1</span>')) |
244 _$.html(_$.text().replace(/(^\s+|\s+$)/g,'').replace(_searchRe, '<span class="Ldt-AnnotationsList-highlight">$1</span>')) |
245 }) |
245 }) |
246 } |
246 } |