diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index da8d747ca6..8a707d0dfa 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -636,14 +636,17 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM], var owner_match = true; if(event.participants && this._parent.options.owner) { - var parent_owner = this._parent.options.owner; + var parent_owner = typeof this._parent.options.owner !== 'object' ? + [this._parent.options.owner] : + this._parent.options.owner; owner_match = false; - for(var i = 0; i < this._parent.options.owner.length; i++ ) + var length = parent_owner.length; + for(var i = 0; i < length; i++ ) { - if (parseInt(this._parent.options.owner[i]) < 0) + if (parseInt(parent_owner[i]) < 0) { // Add in groups, if we can get them (this is syncronous) - egw.accountData(this._parent.options.owner[i],'account_id',true,function(members) { + egw.accountData(parent_owner[i],'account_id',true,function(members) { parent_owner = parent_owner.concat(Object.keys(members)); }); } diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index b4a9971e3c..d60520f428 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -1365,9 +1365,11 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes } if(this.isAttached() && ( - typeof old == "number" && typeof _owner == "number" && old !== this.options.owner || + typeof old === "number" && typeof _owner === "number" && old !== this.options.owner || // Array of ids will not compare as equal - ((typeof old === 'object' || typeof _owner === 'object') && old.toString() !== _owner.toString()) + ((typeof old === 'object' || typeof _owner === 'object') && old.toString() !== _owner.toString()) || + // Strings + typeof old === 'string' && ''+old !== ''+this.options.owner )) { this.invalidate(true);