Fix missing / unset planner by user label

This commit is contained in:
Nathan Gray 2016-03-14 21:43:34 +00:00
parent d1da1f8bb7
commit 09e3000cb6

View File

@ -346,12 +346,13 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
break; break;
} }
} }
var row = planner.getWidgetById(this); var row = planner.getWidgetById('planner_row_'+this);
if(row && row.set_label) if(row && row.set_label)
{ {
row.set_label(name); row.set_label(name);
} }
},user); },user);
if(!label) label = user;
if(already_added.indexOf(user) < 0) if(already_added.indexOf(user) < 0)
{ {
labels.push({id: user, label: label, data: {participants:user,owner:''}}); labels.push({id: user, label: label, data: {participants:user,owner:''}});
@ -385,7 +386,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
} }
} }
} }
return labels.sort(function(a,b) { return labels.sort(function(a,b) {
return a.label.localeCompare(b.label); return a.label.localeCompare(b.label);
}); });