From 71bd17628dde416030b8825224e09f23f7a8cfc3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 16 Nov 2015 17:15:43 +0000 Subject: [PATCH] Fix users in groups were doubled in planner view, if you selected additional users already in a selected group --- calendar/js/et2_widget_planner.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index adaf579418..96cfe439af 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -374,7 +374,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize if(already_added.indexOf(user) < 0) { labels.push({id: user, label: label, data: {participants:user,owner:''}}); - already_added.push(user); + already_added.push(''+user); } } else if (user < 0) // groups @@ -385,7 +385,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize if(already_added.indexOf(''+id) < 0) { this.push({id: id, label: result[id], data: {participants:id,owner:id}}); - already_added.push(id); + already_added.push(''+id); } } },labels); @@ -398,7 +398,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize if(accounts[j].value === user) { labels.push({id: user, label: accounts[j].label, data: {participants:user,owner:user}}); - already_added.push(user); + already_added.push(''+user); break; } } @@ -764,7 +764,6 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize // Group the events var events = {}; - debugger; for(var i = 0; i < this.value.length; i++) { grouper.group.call(this, labels, events, this.value[i]);