mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
Fix filter text box bugs reported by BentMyWookie and a bit more cleanup
This commit is contained in:
@@ -166,21 +166,25 @@ Transmission.prototype =
|
||||
{
|
||||
var tr = this;
|
||||
var search_box = $('#torrent_search');
|
||||
search_box[0].value = 'filter';
|
||||
search_box.bind('keyup', {transmission: this}, function(event) {
|
||||
search_box.bind('keyup click', {transmission: this}, function(event) {
|
||||
tr.setSearch(this.value);
|
||||
}).bind('blur', {transmission: this}, function(event) {
|
||||
if (this.value == '') {
|
||||
$(this).addClass('blur');
|
||||
this.value = 'filter';
|
||||
tr.setSearch(null);
|
||||
}
|
||||
}).bind('focus', {}, function(event) {
|
||||
if ($(this).is('.blur')) {
|
||||
this.value = '';
|
||||
$(this).removeClass('blur');
|
||||
}
|
||||
});
|
||||
if (!$.browser.safari)
|
||||
{
|
||||
search_box[0].value = 'Filter';
|
||||
search_box.bind('blur', {transmission: this}, function(event) {
|
||||
if (this.value == '') {
|
||||
$(this).addClass('blur');
|
||||
this.value = 'Filter';
|
||||
tr.setSearch(null);
|
||||
}
|
||||
}).bind('focus', {}, function(event) {
|
||||
if ($(this).is('.blur')) {
|
||||
this.value = '';
|
||||
$(this).removeClass('blur');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
contextStopSelected: function( ) {
|
||||
|
||||
Reference in New Issue
Block a user