Author: nathangray
New Revision: 55949
URL: http://svn.stylite.de/viewvc/egroupware?rev=55949&view=rev
Log:
Update for resource selection to re-enable conflict detection
- Remove account & contact options from default resource selection preference
- Edit dialog participant now passes selected start & duration, so conflict detection works again
Modified:
trunk/calendar/inc/class.calendar_hooks.inc.php
trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php
trunk/calendar/inc/class.calendar_uiforms.inc.php
trunk/calendar/js/app.js
trunk/calendar/templates/default/edit.xet
trunk/resources/inc/class.resources_bo.inc.php
— trunk/calendar/inc/class.calendar_hooks.inc.php (original)
+++ trunk/calendar/inc/class.calendar_hooks.inc.php Fri Apr 29 20:01:17 2016
@@ -192,9 +192,7 @@
$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'),
@@ -418,7 +416,8 @@
‘help’ => ‘Default type of resources application selected in the calendar particpants research form.’,
‘xmlrpc’ => True,
‘admin’ => False,
— trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php (original)
+++ trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php Fri Apr 29 20:01:17 2016
@@ -128,7 +128,8 @@
$query = $_REQUEST['query'];
// Arbitrarily limited to 50 / resource
-
$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);
— trunk/calendar/inc/class.calendar_uiforms.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uiforms.inc.php Fri Apr 29 20:01:17 2016
@@ -1621,20 +1621,6 @@
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);
— trunk/calendar/js/app.js (original)
+++ trunk/calendar/js/app.js Fri Apr 29 20:01:17 2016
@@ -1003,6 +1003,30 @@
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
-
}});
},
/**
— trunk/calendar/templates/default/edit.xet (original)
+++ trunk/calendar/templates/default/edit.xet Fri Apr 29 20:01:17 2016
@@ -205,12 +205,12 @@
-
<date-time id="start" needed="1" class="required" onchange="app.calendar.edit_update_participant"/>
<description for="duration" value="Duration" id="calendar_edit_duration" />
<menulist >
<menupopup statustext="Duration of the meeting" class="et2_fullWidth" id="duration" no_lang="1" onchange="app.calendar.set_enddate_visibility" options="Use end date,,,,,,,false"/>
</menulist>
— trunk/resources/inc/class.resources_bo.inc.php (original)
+++ trunk/resources/inc/class.resources_bo.inc.php Fri Apr 29 20:01:17 2016
@@ -598,7 +598,7 @@
$data = $this->so->search($criteria,$only_keys,$order_by=‘name’,$extra_cols=’’,$wildcard=’%’,$empty,$op=‘OR’,$limit,$filter);
// maybe we need to check disponibility of the searched resources in the calendar if $pattern [‘exec’] contains some extra args
$show_conflict=False;
@@ -608,12 +608,11 @@
//get a calendar objet for reservations
if ( (!isset($this->bocal)) || !(is_object($this->bocal)))
{
@@ -675,7 +674,7 @@
}
}
if (isset($res_info_cache)) {
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs