Fix Bug 38666 - When searching no specific region should be highlighted in the map

Clicking again on a region deselect it
When searching, remove selection from regions.

Change-Id: Ife70639a864f9d13d02406d1229316782a32ed3c
This commit is contained in:
Santhosh Thottingal
2012-08-10 11:43:49 +05:30
committed by Amir E. Aharoni
parent a9dfdd28b4
commit aa798d9ca1
2 changed files with 20 additions and 5 deletions

View File

@@ -325,9 +325,14 @@
},
click: function( e ) {
e.stopPropagation();
e.preventDefault();
this.show();
if( this.$element.hasClass( 'active' ) ) {
this.$element.removeClass( 'active' );
if ( this.options.noresult ) {
this.options.noresult.call();
}
} else {
this.show();
}
}
};
@@ -351,6 +356,7 @@
$.fn.regionselector.defaults = {
$target: null, // Where to render the results
success: null, // callback if any results found.
noresult: null, // callback when no results to show
languages: null
};