diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index c551ac4cf8..c827d79713 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -192,9 +192,7 @@ class calendar_hooks $defaultresource_sel = array( 'resources_conflict' => lang('resources with conflict detection'), 'resources_without_conflict' => lang('resources except conflicting ones'), - 'resources' => lang('resources'), - 'addressbook' => lang('addressbook'), - 'home-accounts' => lang('Accounts'), + 'resources' => lang('resources') ); $reset_stati_on_shifts = array( 'no' => lang('Never'), @@ -418,7 +416,8 @@ class calendar_hooks 'help' => 'Default type of resources application selected in the calendar particpants research form.', 'xmlrpc' => True, 'admin' => False, - 'forced' => 'addressbook', + 'forced' => 'resources', + 'default' => 'resources' ), 'default_private' => array( 'type' => 'check', diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 10dce86474..910ace1949 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -128,7 +128,8 @@ class calendar_owner_etemplate_widget extends etemplate_widget_taglist $query = $_REQUEST['query']; // Arbitrarily limited to 50 / resource - $options = array('start' => 0, 'num_rows' => 50); + $options = array('start' => 0, 'num_rows' => 50) + + array_diff_key($_REQUEST, array_flip(array('menuaction','query'))); $results = array(); $resources = array_merge(array('' => $bo->resources['']),$bo->resources); diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 0aaa031158..86bd71f04e 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1621,20 +1621,6 @@ class calendar_uiforms extends calendar_ui if ($data['app'] == 'email') continue; // make no sense, as we cant search for email $content['participants']['cal_resources'] .= ','.$data['app']; } - // adding extra content for the resource link-entry widget to - // * select resources or addressbook as a default selection on the app selectbox based on prefs - $content['participants']['resource']['app'] = $this->cal_prefs['defaultresource_sel']; - // * get informations from the event on the ajax callback - if (in_array($content['participants']['resource']['app'],array('resources_conflict','resources_without_conflict'))) - { - // fix real app string - $content['participants']['resource']['app'] = 'resources'; - } - // check if current pref. is an allowed application for the user - if (!isset($GLOBALS['egw_info']['user']['apps'][$content['participants']['resource']['app']])) - { - $content['participants']['resource']['app'] = 'home-accounts'; - } } $content['participants']['status_date'] = $preserv['actual_date']; $preserved = array_merge($preserv,$content); diff --git a/calendar/js/app.js b/calendar/js/app.js index 6da8c3a0e7..908ba254c3 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1003,6 +1003,30 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( if (typeof content.duration != 'undefined') end.set_value("+"+content.duration); } } + this.edit_update_participant(start); + }, + + /** + * Update query parameters for participants + * + * This allows for resource conflict checking + * + * @param {DOMNode|et2_widget} input Either the input node, or the widget + * @param {et2_widget} [widget] If input is an input node, widget will have + * the widget, otherwise it will be undefined. + */ + edit_update_participant: function(input, widget) + { + if(typeof widget === 'undefined') widget = input; + var content = widget.getInstanceManager().getValues(widget.getRoot()); + var participant = widget.getRoot().getWidgetById('participant'); + + participant.set_autocomplete_params({exec:{ + start: content.start, + end: content.end, + duration: content.duration, + whole_day: content.whole_day + }}); }, /** diff --git a/calendar/templates/default/edit.xet b/calendar/templates/default/edit.xet index a05ba32d7e..c43181e260 100644 --- a/calendar/templates/default/edit.xet +++ b/calendar/templates/default/edit.xet @@ -205,12 +205,12 @@ - + - +