(bug 39230) Autocompletion does not get cleared on region change

* Introduced deactivate (clear without showing all languages)
* Renamed noresult in region filter to noresults to match the
  callback in languagefilter
* Some comments to help understand the code

Change-Id: I544a29b860a6d3f4a5aa770f84cc8a72ae4a4b9d
This commit is contained in:
Niklas Laxström
2012-08-16 09:31:48 +00:00
parent 7ab6960645
commit ee7f16526c
2 changed files with 24 additions and 7 deletions

View File

@@ -159,11 +159,12 @@
$target: lcd,
languages: that.languages,
success: function() {
// clear the search field.
that.$languageFilter.val( '' );
// Deactivate search filtering
that.$languageFilter.languagefilter( 'deactivate' );
// Show 'results view' if we are in no results mode
that.success();
},
noresult: function() {
noresults: function() {
that.$languageFilter.languagefilter( 'clear' );
}
} );