fix the problem where it always closes on you
This commit is contained in:
parent
a05fe70eda
commit
3405bf5942
2 changed files with 10 additions and 3 deletions
|
@ -450,7 +450,7 @@ Metamaps.GlobalUI.Search = {
|
||||||
var self = Metamaps.GlobalUI.Search;
|
var self = Metamaps.GlobalUI.Search;
|
||||||
|
|
||||||
self.timeOut = setTimeout(function () {
|
self.timeOut = setTimeout(function () {
|
||||||
if (!self.locked && !self.changing && self.isOpen && (bypass || $('.sidebarSearchField').val() == '')) {
|
if (!self.locked && !self.changing && self.isOpen && (bypass || $('.sidebarSearchField').typeahead('val') == '')) {
|
||||||
self.changing = true;
|
self.changing = true;
|
||||||
$('.sidebarSearchField, .sidebarSearch .tt-hint').css({
|
$('.sidebarSearchField, .sidebarSearch .tt-hint').css({
|
||||||
padding: '7px 0 3px 0',
|
padding: '7px 0 3px 0',
|
||||||
|
@ -600,7 +600,7 @@ Metamaps.GlobalUI.Search = {
|
||||||
|
|
||||||
// make sure that when you click on 'limit to me' or 'toggle section' it works
|
// make sure that when you click on 'limit to me' or 'toggle section' it works
|
||||||
$('.sidebarSearchField').bind('typeahead:change', function(){
|
$('.sidebarSearchField').bind('typeahead:change', function(){
|
||||||
if ($(this).val() === "") {
|
if ($(this).typeahead('val') === '') {
|
||||||
self.hideLoader();
|
self.hideLoader();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -649,7 +649,7 @@ Metamaps.GlobalUI.Search = {
|
||||||
$('.limitToMe').unbind().bind("change", function (e) {
|
$('.limitToMe').unbind().bind("change", function (e) {
|
||||||
// set the value of the search equal to itself to retrigger the autocomplete event
|
// set the value of the search equal to itself to retrigger the autocomplete event
|
||||||
self.isOpen = false;
|
self.isOpen = false;
|
||||||
$('.sidebarSearchField').typeahead('val', $('.sidebarSearchField').val());
|
$('.sidebarSearchField').typeahead('val', $('.sidebarSearchField').typeahead('val'));
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
self.isOpen = true;
|
self.isOpen = true;
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
|
@ -67,6 +67,13 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.resultnoresult {
|
||||||
|
padding: 8px 0;
|
||||||
|
> div {
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.canEditMap button.addToMap {
|
.canEditMap button.addToMap {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue