make clear input button work

This commit is contained in:
rolux 2011-05-17 09:19:30 +02:00
parent 4ca5734a9d
commit bed3e1ea70
2 changed files with 11 additions and 5 deletions

View file

@ -738,6 +738,11 @@ Ox.Input = function(options, self) {
return that;
};
that.clearInput = function() {
clear();
return that;
}
that.focusInput = function(select) {
select = Ox.isUndefined(select) ? true : select;
self.$input.focus();

View file

@ -385,7 +385,7 @@ Ox.VideoPlayer = function(options, self) {
tooltip: 'Previous [Shift+G]',
type: 'image'
})
.css({float: 'left', opacity: 0.25})
.css({float: 'left'})
.bindEvent({
click: function() {
goToNextResult(-1);
@ -399,7 +399,7 @@ Ox.VideoPlayer = function(options, self) {
tooltip: 'Next [G]',
type: 'image'
})
.css({float: 'left', opacity: 0.25})
.css({float: 'left'})
.bindEvent({
click: function() {
goToNextResult(1);
@ -422,6 +422,9 @@ Ox.VideoPlayer = function(options, self) {
},
blur: function() {
self.inputHasFocus = false;
},
submit: function() {
self.inputHasFocus = false;
submitFindInput();
}
})
@ -454,9 +457,7 @@ Ox.VideoPlayer = function(options, self) {
.bindEvent({
click: function() {
self.$results.html('0');
self.$findInput
.options({value: ''})
.focusInput();
self.$findInput.clearInput();
self.results = [];
self.$timeline && self.$timeline.options({
results: self.results