From: Michael J. Rubinsky Date: Wed, 10 Mar 2010 06:27:32 +0000 (-0500) Subject: Don't call the editCalendarCallback until the RedBox has finished displaying. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3db4416592425a8396fef909296856b428d9a109;p=horde.git Don't call the editCalendarCallback until the RedBox has finished displaying. This fixes issues during the first load of the calendar chunk: Proper enabling/disabling the form based on perms Properly initializing the pretty autocompleter --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index c0f6a7ab4..fce980fa0 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2130,8 +2130,8 @@ KronolithCore = { RedBox.loading(); this.doAction('chunkContent', { chunk: 'calendar' }, function(r) { if (r.response.chunk) { + RedBox.onDisplay = function() { this.editCalendarCallback(calendar); RedBox.onDisplay = null; }.bind(this); RedBox.showHtml(r.response.chunk); - this.editCalendarCallback(calendar); } else { this.closeRedBox(); }