Fix favorites with only current user (owner=0) showed first user in selection list

This commit is contained in:
Nathan Gray 2015-11-20 18:05:27 +00:00
parent 2dee92b877
commit 9b56ed39c3

View File

@ -1711,6 +1711,10 @@ app.classes.calendar = AppJS.extend(
// Add in any new owners
state.state.owner = owner.concat(state.state.owner);
}
if (state.state.owner.indexOf(0) >= 0)
{
state.state.owner[state.state.owner.indexOf(0)] = this.egw.user('account_id');
}
// Show the correct number of grids
@ -1834,7 +1838,7 @@ app.classes.calendar = AppJS.extend(
// Toggle todos
if(state.state.view == 'day' || this.state.view == 'day')
{
if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] > 0)
if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] >= 0)
{
if(this.state.view !== 'day')
{