From cc72785afe081d66a35fc19c8cab47cba7186c55 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 10 Dec 2010 20:05:51 +0000 Subject: [PATCH] If edit link / settings are available, use an edit popup --- calendar/inc/class.calendar_uiviews.inc.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index e11f74850e..253bdb3d33 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -967,11 +967,21 @@ function open_edit(series) $icons .= ($icons?' ':'').$GLOBALS['egw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"'); } $class = $class == 'row_on' ? 'row_off' : 'row_on'; - + if($todo['edit']) { + list($width, $height) = explode('x', $todo['edit']['size']); + unset($todo['edit']['size']); + $icon_href = html::a_href( $icons, $todo['edit'],'',' target="_blank" onclick="window.open(this.href,this.target,\'dependent=yes,width='.$width.',height='.$height.',scrollbars=yes,status=yes\'); return false;"'); + $href = html::a_href( $todo['title'], $todo['edit'],'',' target="_blank" onclick="window.open(this.href,this.target,\'dependent=yes,width=750,height=590,scrollbars=yes,status=yes\'); return false;"'); + } + else + { + $icon_href = $GLOBALS['egw']->html->a_href($icons,$todo['view']); + $href = $todo['view']; + } $content .= " \n ". - ($this->bo->printer_friendly?$icons:$GLOBALS['egw']->html->a_href($icons,$todo['view'])). + ($this->bo->printer_friendly?$icons:$icon_href). "\n ".($this->printer_friendly?$todo['title']: - $GLOBALS['egw']->html->a_href($todo['title'],$todo['view']))."\n \n"; + $href)."\n \n"; /** * ToDo: add delete and closing action */