equal
deleted
inserted
replaced
38 }, |
38 }, |
39 { |
39 { |
40 "keywords" : [ "?" ], |
40 "keywords" : [ "?" ], |
41 "color" : "#036AAE" |
41 "color" : "#036AAE" |
42 } |
42 } |
43 ], |
|
44 requires : [ |
|
45 { |
|
46 type: "Tooltip" |
|
47 } |
|
48 ] |
43 ] |
49 }; |
44 }; |
50 |
45 |
51 IriSP.Widgets.Polemic.prototype.onSearch = function(searchString) { |
46 IriSP.Widgets.Polemic.prototype.onSearch = function(searchString) { |
52 this.searchString = typeof searchString !== "undefined" ? searchString : ''; |
47 this.searchString = typeof searchString !== "undefined" ? searchString : ''; |
53 var _found = 0, |
48 var _found = 0, |
54 _re = IriSP.Model.regexpFromTextOrArray(searchString), |
49 _re = IriSP.Model.regexpFromTextOrArray(searchString, true), |
55 _this = this; |
50 _this = this; |
56 this.$tweets.each(function() { |
51 this.$tweets.each(function() { |
57 var _el = IriSP.jQuery(this); |
52 var _el = IriSP.jQuery(this); |
58 if (_this.searchString) { |
53 if (_this.searchString) { |
59 if (_re.test(_el.attr("tweet-title"))) { |
54 if (_re.test(_el.attr("tweet-title"))) { |
285 |
280 |
286 this.$zone.click(function(_e) { |
281 this.$zone.click(function(_e) { |
287 var _x = _e.pageX - _this.$zone.offset().left; |
282 var _x = _e.pageX - _this.$zone.offset().left; |
288 _this.player.popcorn.currentTime(_this.source.getDuration().getSeconds() * _x / _this.width); |
283 _this.player.popcorn.currentTime(_this.source.getDuration().getSeconds() * _x / _this.width); |
289 }); |
284 }); |
|
285 |
|
286 this.$.append('<div class="Ldt-Polemic-Tooltip"></div>'); |
|
287 |
|
288 this.insertSubwidget(this.$.find(".Ldt-Polemic-Tooltip"), "tooltip", { type: "Tooltip" }); |
290 } |
289 } |
291 |
290 |
292 IriSP.Widgets.Polemic.prototype.onTimeupdate = function() { |
291 IriSP.Widgets.Polemic.prototype.onTimeupdate = function() { |
293 var _x = Math.floor( this.width * this.player.popcorn.currentTime() / this.source.getDuration().getSeconds()); |
292 var _x = Math.floor( this.width * this.player.popcorn.currentTime() / this.source.getDuration().getSeconds()); |
294 this.$elapsed.css({ |
293 this.$elapsed.css({ |