diff --git a/src/calendar/widget/calendar.js b/src/calendar/widget/calendar.js index c547760..0f2eb58 100644 --- a/src/calendar/widget/calendar.js +++ b/src/calendar/widget/calendar.js @@ -216,11 +216,6 @@ define([ this._getResources(this.resourceEntity, lang.hitch(this, this._prepareResources)); } - if (this.resourceEntity) { - logger.debug(this.id + "._fetchObjects resources"); - this._getResources(this.resourceEntity, lang.hitch(this, this._prepareResources)); - } - if (this.dataSourceType === "xpath") { logger.debug(this.id + "._fetchObjects xpath"); constraint = this.eventConstraint; @@ -442,6 +437,9 @@ define([ logger.debug(this.id + "._onEventChange", event); var obj = event.mxobject; this._setVariables(obj, event, this.startAttr, this.endAttr, event.allDay); + if (this.resourceEntity && this.resourceEventPath) { + this._setResourceReference(obj, this.neweventref, event.resourceId, this._mxObj); + } this._execMF(obj, this.onchangemf); }, diff --git a/test/[Test] Calendar Widget.mpr b/test/[Test] Calendar Widget.mpr index b30367c..50f4120 100644 Binary files a/test/[Test] Calendar Widget.mpr and b/test/[Test] Calendar Widget.mpr differ diff --git a/test/widgets/calendar.mpk b/test/widgets/calendar.mpk index c906638..b61e82a 100644 Binary files a/test/widgets/calendar.mpk and b/test/widgets/calendar.mpk differ