handle clear button

This commit is contained in:
rolux 2011-05-18 08:08:26 +02:00
parent 3dd022977d
commit 5f8f1904fd

View file

@ -481,10 +481,13 @@ Ox.VideoPlayer = function(options, self) {
.css({float: 'left'}) .css({float: 'left'})
.bindEvent({ .bindEvent({
click: function() { click: function() {
self.options.find = '';
self.results = [];
self.$results.html('0'); self.$results.html('0');
self.$findInput.clearInput(); self.$findInput.clearInput();
self.results = []; self.subtitle && setSubtitleText();
self.$timeline && self.$timeline.options({ self.$timeline && self.$timeline.options({
find: self.options.find,
results: self.results results: self.results
}); });
//setTimeout(self.$findInput.focusInput, 10); //setTimeout(self.$findInput.focusInput, 10);
@ -1647,7 +1650,8 @@ Ox.VideoPlayer = function(options, self) {
self.$subtitle.html( self.$subtitle.html(
self.subtitle ? self.subtitle ?
Ox.highlight(self.subtitle, self.options.find, 'OxHighlight') Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
.replace(/\n/g, '<br/>') : '&nbsp;<br/>&nbsp;' // fixme: weird fullscreen bug .replace(/\n/g, '<br/>') : '&nbsp;<br/>&nbsp;'
// FIXME: weird bug, only in fullscreen, only in chrome
); );
Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height()) Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
} }