fix a bug with emptying the find field of a map and pressing return
This commit is contained in:
parent
8d940f5222
commit
50e6321e00
2 changed files with 9 additions and 4 deletions
|
@ -1167,10 +1167,16 @@ Ox.Map = function(options, self) {
|
||||||
|
|
||||||
function submitFind(data) {
|
function submitFind(data) {
|
||||||
self.options.find = data.value;
|
self.options.find = data.value;
|
||||||
|
if (data.value === '') {
|
||||||
|
if (self.options.selected[0] == '_') {
|
||||||
|
selectPlace(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
that.findPlace(data.value, function(place) {
|
that.findPlace(data.value, function(place) {
|
||||||
setStatus(place);
|
setStatus(place);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleControls() {
|
function toggleControls() {
|
||||||
// fixme: that.find() doesn't work here
|
// fixme: that.find() doesn't work here
|
||||||
|
|
|
@ -466,7 +466,6 @@ Ox.formatDuration = function(/*sec, dec, format*/) {
|
||||||
2,
|
2,
|
||||||
dec ? dec + 3 : 2
|
dec ? dec + 3 : 2
|
||||||
];
|
];
|
||||||
Ox.print('val', val)
|
|
||||||
while (!val[0] && val.length > (!format ? 3 : 1)) {
|
while (!val[0] && val.length > (!format ? 3 : 1)) {
|
||||||
val.shift();
|
val.shift();
|
||||||
str.shift();
|
str.shift();
|
||||||
|
|
Loading…
Reference in a new issue