Calendar planner:

- Fix planner category filter
- Planner by user now lists group invitations in each user's row
This commit is contained in:
Nathan Gray 2015-11-10 00:56:31 +00:00
parent 80265b28ef
commit 697444965d
2 changed files with 18 additions and 4 deletions

View File

@ -3093,7 +3093,7 @@ jQuery.extend(app.classes.calendar,{
},
etemplates: ['calendar.planner'],
group_by: function(state) {
return state.cat_id? state.cat_id : (state.sortby ? state.sortby : 0);
return state.sortby ? state.sortby : 0;
},
start_date: function(state) {
var d = app.calendar.View.start_date.call(this, state);

View File

@ -416,9 +416,8 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
default:
status_to_show = ['U','A','T','D','G']; break;
}
for(var user in event.participants)
{
var participant = event.participants[user];
var participants = event.participants;
var add_row = function(user, participant) {
var label_index = false;
for(var i = 0; i < labels.length; i++)
{
@ -438,6 +437,21 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
rows[label_index].push(event);
}
}
for(var user in participants)
{
var participant = participants[user];
if (parseInt(user) < 0) // groups
{
egw.accountData(user,'account_fullname',true,function(result) {
for(var id in result)
{
if(!participants[id]) add_row(id,participant);
}
},labels);
continue;
}
add_row(user, participant);
}
},
// Draw a single row
draw_row: function(sort_key, label, events) {