From: Jan Schneider Date: Fri, 12 Feb 2010 14:33:00 +0000 (+0100) Subject: Only show map link if the is a location. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d36f7f9dfe0a16b8b3d5be640ee902918607fe4b;p=horde.git Only show map link if the is a location. Tweak edit form. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 6d3c0a5ed..12cfb4ff7 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2483,10 +2483,16 @@ KronolithCore = { keyupHandler: function(e) { - /* - if (e.element().readAttribute('id') == 'foo') { + switch (e.element().readAttribute('id')) { + case 'kronolithEventLocation': + if ($F('kronolithEventLocation')) { + $('kronolithEventMapLink').show(); + } else { + $('kronolithEventMapLink').hide(); + } + return; } - */ + }, clickHandler: function(e, dblclick) @@ -3238,6 +3244,7 @@ KronolithCore = { this.toggleAllDay(false); $('kronolithEventForm').enable(); $('kronolithEventForm').reset(); + $('kronolithEventMapLink').hide(); $('kronolithEventSave').show(); $('kronolithEventDelete').show(); $('kronolithEventForm').down('.kronolithFormActions').down('.kronolithSep').show(); @@ -3370,6 +3377,9 @@ KronolithCore = { $('kronolithEventTarget').setValue(ev.ty + '|' + ev.c); $('kronolithEventTitle').setValue(ev.t); $('kronolithEventLocation').setValue(ev.l); + if (ev.l) { + $('kronolithEventMapLink').show(); + } $('kronolithEventUrl').setValue(ev.u); $('kronolithEventAllday').setValue(ev.al); this.toggleAllDay(ev.al); diff --git a/kronolith/templates/index/edit.inc b/kronolith/templates/index/edit.inc index 69f0a2894..785aa31a3 100644 --- a/kronolith/templates/index/edit.inc +++ b/kronolith/templates/index/edit.inc @@ -11,17 +11,20 @@
- +
- - + - - - - · + + +
@@ -31,7 +34,7 @@
- -