* Calendar/all views: Fix recurrent whole day events do not pop up edit series dialog.

This commit is contained in:
Hadi Nategh 2014-08-25 10:30:52 +00:00
parent b6d88157bf
commit 16cb288efc
2 changed files with 17 additions and 5 deletions

View File

@ -1887,12 +1887,23 @@ class calendar_uiviews extends calendar_ui
if (!$event['whole_day_on_top'] &&
!$event['whole_day'])
{
$resizableHelper = $this->bo->date2string($event['start']). '|' .$this->bo->format_date($event['start'],false) . '|' . $this->cal_prefs['interval'].'|'.($event['recur_type']?'S':'');
// S represents Series
// '' represents Single
$eventTypeTag = $event['recur_type']?'S':'';
}
else if (!$event['recur_type'])
{
// WD represents Whole Day
$eventTypeTag = 'WD';
}
else
{
$resizableHelper = $this->bo->date2string($event['start']). '|' .$this->bo->format_date($event['start'],false) . '|' . $this->cal_prefs['interval'].'|'.'WD';
// WDS represents Whole Day Series (recurrent whole day event)
$eventTypeTag = 'WDS';
}
// Helps client-side to bind handler to events with specific types tag
$resizableHelper = $this->bo->date2string($event['start']). '|' .$this->bo->format_date($event['start'],false) . '|' . $this->cal_prefs['interval'].'|'.$eventTypeTag;
$html = $indent.'<div id="'.$draggableID.'" data-tooltip ="'.$tooltip .'" data-resize="'.$resizableHelper.'" class="calendar_calEvent'.($is_private ? 'Private' : '').' '.$status_class.
'" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.'; z-index: '.$z_index.';"'.
'>'.$prefix_icon."\n".$html."\n".

View File

@ -276,7 +276,7 @@ app.classes.calendar = AppJS.extend(
create:function(event, ui)
{
var resizeHelper = event.target.getAttribute('data-resize').split("|")[3];
if (resizeHelper == 'WD' )
if (resizeHelper == 'WD' || resizeHelper == 'WDS')
{
$j(this).resizable('destroy');
}
@ -443,7 +443,7 @@ app.classes.calendar = AppJS.extend(
var appName = Id.replace(/-?\d+\.?\d*/g,'');
var startDate = ev.currentTarget.getAttribute('data-resize').split("|")[0];
var eventFlag = ev.currentTarget.getAttribute('data-resize').split("|")[3];
if (eventFlag != 'S')
if (eventFlag != 'S' && eventFlag != 'WDS')
{
that.egw.open(eventId,appName !=""?appName:'calendar','edit');
}
@ -577,7 +577,8 @@ app.classes.calendar = AppJS.extend(
* @param {string} _duration description
* @param {string} _eventFlag Flag to distinguish whether the event is Whole Day, Series, or Single
* - S represents Series
* - WD represents Whole Day
* - WD represents Whole Day
* - WDS represents Whole Day Series (recurrent whole day event)
* - '' represents Single
*/
dropEvent : function(_id, _date, _duration, _eventFlag)