From: Michael J. Rubinsky Date: Wed, 10 Mar 2010 18:05:59 +0000 (-0500) Subject: simplify tag ac initialization/resetting X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a54a4981eec3a1708ff4a2e852677962441c1678;p=horde.git simplify tag ac initialization/resetting --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index b92e64a06..4df9b6b76 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2204,12 +2204,11 @@ KronolithCore = { return; } } - if (!kronolithCTagAc.initialized) { - kronolithCTagAc.init() - } if (newCalendar) { switch (type) { case 'internal': + kronolithCTagAc.reset(); + // Fall through case 'tasklists': $('kronolithCalendar' + type + 'LinkImportExport').up('span').hide(); break; @@ -2223,7 +2222,6 @@ KronolithCore = { $('kronolithCalendar' + type + 'Id').clear(); $('kronolithCalendar' + type + 'Color').setValue('#dddddd').setStyle({ backgroundColor: '#dddddd', color: '#000' }); form.down('.kronolithCalendarDelete').hide(); - kronolithCTagAc.reset(); } else { info = Kronolith.conf.calendars[type][calendar]; @@ -2273,14 +2271,11 @@ KronolithCore = { form.down('.kronolithFormActions .kronolithSeparator').show(); } else { form.disable(); - kronolithCTagAc.disable(); form.down('.kronolithColorPicker').hide(); form.down('.kronolithCalendarDelete').hide(); form.down('.kronolithCalendarSave').hide(); if (type == 'internal' || type == 'tasklists') { - if (type == 'internal') { - $('kronolithCalendar' + type + 'Tags').autocompleter.disable(); - } + kronolithCTagAc.disable(); if (Kronolith.conf.calendars[type][calendar].show) { form.down('.kronolithCalendarSubscribe').hide(); form.down('.kronolithCalendarUnsubscribe').show().enable(); @@ -3832,9 +3827,6 @@ KronolithCore = { this.editEvent.bind(this, calendar, id, date).defer(); return; } - if (!kronolithETagAc.initialized) { - kronolithETagAc.init(); - } RedBox.onDisplay = function() { try {