switch (trigger.id) {
case 'kronolithEventLocation':
if (kc == Event.KEY_RETURN) {
- this.ensureMap();
+ this.ensureMap(true);
this.geocode($F('kronolithEventLocation'));
e.stop();
return;
break;
case 'kronolithEventGeo':
- this.ensureMap();
+ this.ensureMap(true);
this.geocode($F('kronolithEventLocation'));
e.stop();
break;
contextOnClick: Prototype.emptyFunction,
// Map
- initializeMap: function()
+ initializeMap: function(ignoreLL)
{
var layers = [];
if (Kronolith.conf.maps.providers) {
mapClick: this.afterClickMap.bind(this)
});
- if ($('kronolithEventLocationLat').value) {
+ if ($('kronolithEventLocationLat').value && !ignoreLL) {
var ll = { lat:$('kronolithEventLocationLat').value, lon: $('kronolithEventLocationLon').value };
// Note that we need to cast the value of zoom to an integer here,
// otherwise the map display breaks.
/**
* Ensures the map tab is visible and sets UI elements accordingly.
*/
- ensureMap: function()
+ ensureMap: function(ignoreLL)
{
if (!this.mapInitialized) {
- this.initializeMap();
+ this.initializeMap(ignoreLL);
}
var dialog = $('kronolithEventForm');
dialog.select('.kronolithTabsOption').invoke('hide');