From: Jan Schneider Date: Mon, 22 Feb 2010 21:25:37 +0000 (+0100) Subject: Fix error if the form doesn't have tabs. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d18b440c3c6c6bb68ea65099a1827b1b9cf33b74;p=horde.git Fix error if the form doesn't have tabs. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index aceb81805..f8c87e4d3 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2070,7 +2070,10 @@ KronolithCore = { var type = calendar[0]; calendar = calendar.length == 1 ? null : calendar[1]; - this.openTab($('kronolithCalendarForm' + type).down('.tabset a.kronolithTabLink')); + var firstTab = $('kronolithCalendarForm' + type).down('.tabset a.kronolithTabLink'); + if (firstTab) { + this.openTab(firstTab); + } $('kronolithCalendarDialog').select('.kronolithCalendarDiv').invoke('hide'); $('kronolithCalendar' + type + '1').show(); $('kronolithCalendarForm' + type).select('.kronolithCalendarContinue').invoke('enable');