Make sure ID is a string, prevents duplication if it gets updated to an int

This commit is contained in:
Nathan Gray 2015-12-01 22:14:47 +00:00
parent e172ff448b
commit 23f9a9a75b
2 changed files with 9 additions and 0 deletions

View File

@ -267,6 +267,10 @@ app.classes.calendar = AppJS.extend(
var multiple_owner = typeof this.state.owner != 'string' &&
this.state.owner.length > 1 &&
this.state.owner.length < parseInt(this.egw.config('calview_no_consolidate','phpgwapi') || 5);
// Make sure it's a string
if(_id) _id = ''+_id;
for(var i = 0; i < this.state.owner.length; i++)
{
var owner = multiple_owner ? this.state.owner[i] : this.state.owner

View File

@ -140,6 +140,11 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
var app_id = this.options.value.id + (this.options.value.recur_type ? ':'+
(this.options.value.recur_date ? this.options.value.recur_date : this.options.value.start) : '');
egw.dataRegisterUID('calendar::'+app_id, function(event) {
// Make sure id is a string
if(event.id)
{
event.id = ''+event.id;
}
// Check for changing days in the grid view
if(!this._sameday_check(event))
{