When search text field is blurred, redisplay "search" in it.
This commit is contained in:
parent
d232826d0b
commit
a072cbc5ae
|
@ -63,6 +63,7 @@ function Wiki( invoker ) {
|
|||
connect( this.invoker, "message", this, "display_message" );
|
||||
connect( "search_form", "onsubmit", this, "search" );
|
||||
connect( "search_text", "onfocus", this, "search_focused" );
|
||||
connect( "search_text", "onblur", this, "search_blurred" );
|
||||
connect( "html", "onclick", this, "background_clicked" );
|
||||
connect( "html", "onkeydown", this, "key_pressed" );
|
||||
connect( window, "onresize", this, "resize_editors" );
|
||||
|
@ -1321,6 +1322,13 @@ Wiki.prototype.search_focused = function ( event ) {
|
|||
search_text.value = '';
|
||||
}
|
||||
|
||||
Wiki.prototype.search_blurred = function ( event ) {
|
||||
var search_text = getElement( "search_text" );
|
||||
|
||||
if ( search_text.value == '' )
|
||||
search_text.value = 'search';
|
||||
}
|
||||
|
||||
Wiki.prototype.display_search_results = function ( result ) {
|
||||
// if there are no search results, indicate that and bail
|
||||
if ( !result || result.notes.length == 0 ) {
|
||||
|
|
Reference in New Issue