Skip to content

Commit

Permalink
All refreshResources to take the full event hash.
Browse files Browse the repository at this point in the history
Needed for when we are refreshing due to a *new* event being saved,
since it won't yet be in the ecache.
  • Loading branch information
mrubinsk committed Aug 31, 2014
1 parent 3fcec36 commit fa69e16
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kronolith/js/kronolith.js
Expand Up @@ -5513,15 +5513,21 @@ KronolithCore = {
* @param string cal The calendar the event exists in.
* @param string eventid The eventid that is changing.
* @param string last_dt The previous date for the event, if known. (yyyyMMdd).
* @param object event The event object (if a new event) dt is ignored.
*
*/
refreshResources: function(dt, cal, eventid, last_dt)
refreshResources: function(dt, cal, eventid, last_dt, event)
{
var events = this.getCacheForDate(dt, cal),
event = events.find(function(e) { return e.key == eventid; }),
dates = this.viewDates(this.parseDate(dt), this.view),
update_cals = [], r_dates;

if (!event) {
event = events.find(function(e) { return e.key == eventid; });
}
if (!dt) {
dt = event.value.start.toString('yyyyMMdd');
}
dates = this.viewDates(this.parseDate(dt), this.view);
if (event) {
$H(event.value.rs).each(function(r) {
var r_cal = ['resource', r.value.calendar],
Expand Down

0 comments on commit fa69e16

Please sign in to comment.