Planner view

- Fix missing rows with planner by user, group selected
This commit is contained in:
Nathan Gray 2015-12-17 23:13:26 +00:00
parent c3900b27a4
commit db071039a4

View File

@ -629,7 +629,10 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
for(var i = labels.length -1; i >= 0; i--)
{
labels[i].id = labels[i].value;
labels[i].data = {cat_id: labels[i].id};
labels[i].data = {
cat_id: labels[i].id,
main: labels[i].value==labels[i].main
};
}
return labels;
},
@ -818,10 +821,13 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
// Draw the rows
for(var key in labels)
{
if((!app.calendar.state.cat_id || app.calendar.state.cat_id == '') && labels[key].id != labels[key].main)
{
// Skip sub-categories (events are merged into top level)
if(this.options.group_by == 'category' &&
(!app.calendar.state.cat_id || app.calendar.state.cat_id == '') &&
labels[key].id != labels[key].main
)
{
continue;
}
var row = grouper.draw_row.call(this,labels[key].id, labels[key].label, events[key] || []);