diff --git a/calendar/inc/class.uical.inc.php b/calendar/inc/class.uical.inc.php index 3f50a1e04d..cb9733bfaf 100644 --- a/calendar/inc/class.uical.inc.php +++ b/calendar/inc/class.uical.inc.php @@ -490,15 +490,33 @@ class uical * @param int $height=400 height of the window * @return string javascript (using single quotes) */ - function popup($link,$target='_blank',$width=750,$height=410) - { - return 'egw_openWindowCentered2('.($link == 'this.href' ? $link : "'".$link."'").','. - ($target == 'this.target' ? $target : "'".$target."'").",$width,$height,'yes')"; - - return 'window.open('.($link == 'this.href' ? $link : "'".$link."'").','. - ($target == 'this.target' ? $target : "'".$target."'").','. - "'dependent=yes,width=$width,height=$height,scrollbars=yes,status=yes')"; - } + function popup($link,$target='_blank',$width=750,$height=410,$Link_confirm_abort='',$Link_confirm_text='') + { + //Handle Exception for Calandar + if (($Link_confirm_abort) && ($Link_confirm_text)) + { + $returnvalue = 'javascript:var check=confirm(\''.$Link_confirm_text.'\');'; + $returnvalue .=' if (check==true) {'; + // open confirm =0kay + $returnvalue .= 'egw_openWindowCentered2('.($link == 'this.href' ? $link : "'".$link."'").','. + ($target == 'this.target' ? $target : "'".$target."'").",$width,$height,'yes')"; + $returnvalue .= '}'; + //open confirm =Abort + $returnvalue .=' else {'; + $returnvalue .= 'egw_openWindowCentered2('.($Link_confirm_abort == 'this.href' ? $Link_confirm_abort : "'".$Link_confirm_abort."'").','. + ($target == 'this.target' ? $target : "'".$target."'").",$width,$height,'yes')"; + $returnvalue .= '}'; + + return $returnvalue; + } + + else { + + return 'egw_openWindowCentered2('.($link == 'this.href' ? $link : "'".$link."'").','. + ($target == 'this.target' ? $target : "'".$target."'").",$width,$height,'yes')"; + + } + } /** * creates the content for the sidebox-menu, called as hook diff --git a/calendar/inc/class.uiviews.inc.php b/calendar/inc/class.uiviews.inc.php index 96b26478b9..5f992bda89 100644 --- a/calendar/inc/class.uiviews.inc.php +++ b/calendar/inc/class.uiviews.inc.php @@ -964,8 +964,8 @@ class uiviews extends uical $droppableID='drop_'.$droppableDateTime.'_O'.$owner; $html .= $indent."\t".'
'."\n"; - + '%;" class="calAddEvent" onclick="??'.$this->popup($GLOBALS['egw']->link('/index.php',$linkData)).';return false;">'."\n"; + if(is_object($this->dragdrop) && $dropPermission) { $this->dragdrop->addDroppable( @@ -1208,7 +1208,21 @@ class uiviews extends uical $html = $tpl->fp('out',$block); $view_link = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']))); - $popup = $is_private ? '' : ' onclick="'.$this->popup($view_link).'; return false;"'; + + if ($event['recur_type']!= MCAL_RECUR_NONE) + { + $view_link_confirm_abort = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']),'exception'=>1)); + $view_link_confirm_text=lang('Du you want to edit serialevent als exception? - Ok = Edit Exception, Abort = Edit Serial'); + $popup = $is_private ? '' : ' onclick="'.$this->popup($view_link_confirm_abort,null,750,410,$view_link,$view_link_confirm_text).'; return false;"'; + + } + else + { + $popup = $is_private ? '' : ' onclick="'.$this->popup($view_link).'; return false;"'; + } + //_debug_array($event); + //echo $event['id']."?