diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index cca133639b..832a4696d4 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -103,9 +103,15 @@ { foreach ($value as $link) { + $options = ''; + if (($popup = $this->link->is_popup($link['app'],'view'))) + { + list($w,$h) = explode('x',$popup); + $options = ' onclick="window.open(this,this.target,\'width='.(int)$w.',height='.(int)$h.',location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;"'; + } $str .= ($str !== '' ? ', ' : '') . $tmpl->html->a_href( $tmpl->html->htmlspecialchars($this->link->title($link['app'],$link['id'])), - $this->link->view($link['app'],$link['id'],$link)); + '/index.php',$this->link->view($link['app'],$link['id'],$link),$options); } } $cell['type'] = 'html'; @@ -201,6 +207,7 @@ if (!is_array($link['id'])) { $value[$row]['view'] = $this->link->view($link['app'],$link['id'],$link); + $value[$row]['popup'] = $this->link->is_popup($link['app'],'view'); } } break; diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 0a6be15872..1350701ef0 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -817,10 +817,10 @@ } switch ($type) { - case 'label': // size: [[b]old][[i]talic][,link][,activate_links][,label_for] + case 'label': // size: [[b]old][[i]talic][,link][,activate_links][,label_for][,link_popup_size] if (is_array($value)) break; - list($style,$extra_link,$activate_links,$label_for) = explode(',',$cell_options); + list($style,$extra_link,$activate_links,$label_for,$extra_link_popup) = explode(',',$cell_options); $value = strlen($value) > 1 && !$cell['no_lang'] ? lang($value) : $value; $value = nl2br($this->html->htmlspecialchars($value)); if ($activate_links) $value = $this->html->activate_links($value); @@ -1434,7 +1434,12 @@ ' onmouseout="self.status=\'\'; return true;"' : ''; if ($extra_link_target) $options .= ' target="'.$extra_link_target.'"'; - + + if ($extra_link_popup) + { + list($w,$h) = explode('x',$extra_link_popup); + $options .= ' onclick="window.open(this,this.target,\'width='.(int)$w.',height='.(int)$h.',location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;"'; + } return $this->html->a_href($html,$extra_link,'',$options); } }