mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
Fix broken check if calendar was for just a group, or owner was set as a string
This commit is contained in:
parent
a253a7b568
commit
df0592f7c8
@ -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));
|
||||
});
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user