forked from extern/egroupware
Remove 'No filters' option, as it causes errors
This commit is contained in:
parent
e15f9803d2
commit
1d88af167c
@ -197,4 +197,23 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* No filters default favorite causes problems with calendar's special state handling,
|
||||
* so just remove it.
|
||||
* @return type
|
||||
*/
|
||||
public function get_properties()
|
||||
{
|
||||
$properties = parent::get_properties();
|
||||
foreach($properties as &$property)
|
||||
{
|
||||
if($property['name'] == 'favorite')
|
||||
{
|
||||
unset($property['select_options']['blank']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $properties;
|
||||
}
|
||||
}
|
@ -878,7 +878,9 @@ app.classes.home.home_favorite_portlet = app.classes.home.home_portlet.extend({
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
// Somehow favorite got lost, or is not set
|
||||
if(!portlet.options.settings.favorite)
|
||||
if(portlet.options && portlet.options.settings && typeof portlet.options.settings !== 'undefined' &&
|
||||
!portlet.options.settings.favorite
|
||||
)
|
||||
{
|
||||
portlet.edit_settings();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user