Skip to content

Commit

Permalink
Work around some race condition due to .defering some insertFreeBusy …
Browse files Browse the repository at this point in the history
…calls.
  • Loading branch information
mrubinsk committed Jan 9, 2014
1 parent c8d1178 commit d22fadd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions kronolith/js/kronolith.js
Expand Up @@ -1249,6 +1249,14 @@ KronolithCore = {
field.focus();
} catch (e) {}
}
switch (tab.identify()) {
case 'kronolithEventTabAttendees':
this.attendeeStartDateHandler($('kronolithFBDate').innerHTML);
break;
case 'kronolithEventTabResources':
this.resourceStartDateHandler($('kronolithFBDate').innerHTML);
break;
}
},

/**
Expand Down Expand Up @@ -5982,8 +5990,14 @@ KronolithCore = {
fbStartDateHandler: function(start)
{
this.updateFBDate(Date.parse(start, Kronolith.conf.date_format));
this.attendeeStartDateHandler(start);
this.resourceStartDateHandler(start);
// Need to check visisbility - multiple changes will break the display
// due to the use of .defer() in insertFreeBusy().
if ($('kronolithEventTabAttendees').visible()) {
this.attendeeStartDateHandler(start);
}
if ($('kronolithEventTabResources').visible()) {
this.resourceStartDateHandler(start);
}
},

attendeeStartDateHandler: function(start)
Expand Down

0 comments on commit d22fadd

Please sign in to comment.