- Fix view list hook to be able to view the list from any other application

- Participant is not always an integer
This commit is contained in:
Nathan Gray 2015-12-12 00:07:40 +00:00
parent 1182ff70b5
commit 4503abf1bc
3 changed files with 10 additions and 2 deletions

View File

@ -33,7 +33,11 @@ class calendar_hooks
'view_id' => 'cal_id',
'view_popup' => '750x400',
'edit_popup' => '750x400',
'view_list' => 'calendar.calendar_uilist.listview',
'list' => array(
'menuaction' => 'calendar.calendar_uiviews.index',
'view' => 'listview',
'ajax'=>'true'
),
'add' => array(
'menuaction' => 'calendar.calendar_uiforms.edit',
),

View File

@ -368,7 +368,7 @@ class calendar_uilist extends calendar_ui
}
if ($params['col_filter']['participant'])
{
$search_params['users'] = is_array($params['col_filter']['participant']) ? $params['col_filter']['participant'] : array((int) $params['col_filter']['participant']);
$search_params['users'] = is_array($params['col_filter']['participant']) ? $params['col_filter']['participant'] : array( $params['col_filter']['participant']);
}
elseif (!$params['col_filter'] || !array_key_exists('participant',$params['col_filter']))
{

View File

@ -1317,6 +1317,10 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
{
switch(_owner[0])
{
case 'c':
this.owner.options.application = 'addressbook';
this.owner.set_value(_owner.substr(1));
break;
case 'r':
this.owner.options.application = 'resources';
this.owner.set_value(_owner.substr(1));