If edit link / settings are available, use an edit popup

This commit is contained in:
Nathan Gray 2010-12-10 20:05:51 +00:00
parent 4b8e873d0f
commit cc72785afe

View File

@ -967,11 +967,21 @@ function open_edit(series)
$icons .= ($icons?' ':'').$GLOBALS['egw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"'); $icons .= ($icons?' ':'').$GLOBALS['egw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"');
} }
$class = $class == 'row_on' ? 'row_off' : 'row_on'; $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 .= " <tr class=\"$class\">\n <td valign=\"top\" width=\"15%\" nowrap>". $content .= " <tr class=\"$class\">\n <td valign=\"top\" width=\"15%\" nowrap>".
($this->bo->printer_friendly?$icons:$GLOBALS['egw']->html->a_href($icons,$todo['view'])). ($this->bo->printer_friendly?$icons:$icon_href).
"</td>\n <td>".($this->printer_friendly?$todo['title']: "</td>\n <td>".($this->printer_friendly?$todo['title']:
$GLOBALS['egw']->html->a_href($todo['title'],$todo['view']))."</td>\n </tr>\n"; $href)."</td>\n </tr>\n";
/** /**
* ToDo: add delete and closing action * ToDo: add delete and closing action
*/ */