From: <ral...@us...> - 2006-12-29 08:01:27
|
Author: ralfbecker Date: Fri Dec 29 08:57:47 2006 New Revision: 23150 URL: http://www.egroupware.org/viewvc?rev=3D3D23150&view=3D3Drev Log: - improved the drag&drop code: calling check_perms() in the eventWidget now= =3D with the complete event and not just the id, as calling it with the id onl= =3D y triggers again a read of each displayed event, which is a performance nig= =3D htmare - some more todo for jaytraxx ;-) - some docu updates Modified: trunk/calendar/inc/class.uiviews.inc.php Modified: trunk/calendar/inc/class.uiviews.inc.php URL: http://www.egroupware.org/viewvc/trunk/calendar/inc/class.uiviews.inc.= =3D php?rev=3D3D23150&r1=3D3D23149&r2=3D3D23150&view=3D3Ddiff =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D --- trunk/calendar/inc/class.uiviews.inc.php (original) +++ trunk/calendar/inc/class.uiviews.inc.php Fri Dec 29 08:57:47 2006 @@ -13,7 +13,7 @@ /* $Id$ */ =3D include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php'); -include_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php'); +require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php'); =3D /** * Class to generate the calendar views and the necesary widgets @@ -36,28 +36,28 @@ /** * integer level or string function- or widget-name * =3D - * @var mixed $debug =3D + * @var mixed */ var $debug=3D3Dfalse; =3D /** * minimum width for an event * =3D - * @var int $eventCol_min_width + * @var int */ var $eventCol_min_width =3D3D 80; =3D /** * extra rows above and below the workday * =3D - * @var int $extraRows =3D + * @var int */ var $extraRows =3D3D 2; =3D /** * extra rows original (save original value even if it gets changed in th= =3D e class) * =3D - * @var int $extraRowsOriginal + * @var int */ var $extraRowsOriginal; =3D @@ -66,49 +66,49 @@ /** * how many rows per day get displayed, gets set be the timeGridWidget * =3D - * @var int $rowsToDisplay =3D + * @var int */ var $rowsToDisplay; =3D /** * height in percent of one row, gets set be the timeGridWidget * =3D - * @var int $rowHeight + * @var int */ var $rowHeight; =3D /** * standard params for calling bocal::search for all views, set by the co= =3D nstructor * =3D - * @var array $search_params + * @var array */ var $search_params; =3D /** * should we use a time grid, can be set for week- and month-view to fals= =3D e by the cal_pref no_time_grid * =3D - * @var boolean $use_time_grid=3D3Dtrue =3D + * @var boolean */ var $use_time_grid=3D3Dtrue; =3D /** * Dragdrop Object * - * @var object $dragdrop; + * @var dragdrop; */ var $dragdrop; =3D /** * Can we display the whole day in a timeGrid of the size of the workday = =3D and just scroll to workday start * - * @var boolean $scroll_to_wdstart; + * @var boolean */ var $scroll_to_wdstart=3D3Dfalse; =3D /** * counter for the current whole day event of a single day * - * @var int $wholeDayPosCounter; + * @var int */ var $wholeDayPosCounter=3D3D1; =3D @@ -146,6 +146,10 @@ $this->holidays =3D3D $this->bo->read_holidays($this->year); =3D $this->check_owners_access(); + + // ToDo jaytraxx: =3D + // we should check if dragdrop is enabled and instanciate the dragdrop c= =3D lass only then + // as long as drag&drop is only used in calendar, we should move the pre= =3D ference to the calendar (at the end!) $this->dragdrop =3D3D new dragdrop(); } =3D @@ -1221,8 +1225,8 @@ $indent."</div>"."\n"; =3D // ATM we do not support whole day events or recurring events for dragdr= =3D op - if ( $this->use_time_grid && =3D - $this->bo->check_perms(EGW_ACL_EDIT,$event['id']) && + if ($this->use_time_grid && =3D + $this->bo->check_perms(EGW_ACL_EDIT,$event) && !$event['whole_day_on_top'] && !$event['whole_day'] && !$event['recur_type'] |