diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 6e9d5c34ab..c73f656048 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -137,6 +137,12 @@ $reg = "/(.*)\n\s*/sm"; preg_match_all($reg, $str, $m); $this->set_var($name, $m[1][0]); + // ralfbecker: readded for compatibility with old way to set blocks + $this->set_var($parent,preg_replace($reg,'{'.$name.'}',$str)); + if ($name != $handle) + { + $this->set_var($handle, $m[1][0]); + } } /* public: set_var(array $values) diff --git a/phpgwapi/inc/class.listbox.inc.php b/phpgwapi/inc/class.listbox.inc.php index bfa4e55ef7..f40cbda5cc 100755 --- a/phpgwapi/inc/class.listbox.inc.php +++ b/phpgwapi/inc/class.listbox.inc.php @@ -43,10 +43,6 @@ */ function listbox($param) { - $this->setvar('outerwidth',300); - $this->setvar('innerwidth',300); - $this->setvar('width',300); - @reset($param); while(list($key,$value) = each($param)) { @@ -57,7 +53,25 @@ } } $this->portalbox($param['title']); - //$this->start_template(); + + if($param['app_id']) + { + $app_id = $this->getvar('app_id'); + + $var = Array + ( + 'up' => Array('url' => '/set_box.php', 'app' => $app_id), + 'down' => Array('url' => '/set_box.php', 'app' => $app_id), + 'close' => Array('url' => '/set_box.php', 'app' => $app_id), + 'question' => Array('url' => '/set_box.php', 'app' => $app_id), + 'edit' => Array('url' => '/set_box.php', 'app' => $app_id) + ); + + while(list($key,$value) = each($var)) + { + $this->set_controls($key,$value); + } + } } /* diff --git a/phpgwapi/inc/class.portalbox.inc.php b/phpgwapi/inc/class.portalbox.inc.php index 212de89f0a..655dd394b7 100755 --- a/phpgwapi/inc/class.portalbox.inc.php +++ b/phpgwapi/inc/class.portalbox.inc.php @@ -27,11 +27,8 @@ //Set up the Object, reserving memory space for variables var $app_name; - var $outerwidth; - var $width; - var $innerwidth; + var $app_id; var $controls; - var $header_background_image; var $up; var $down; var $close; @@ -39,7 +36,7 @@ var $edit; var $output; - var $data = Array(); + var $data = array(); // Textual variables var $title; @@ -85,7 +82,7 @@ function start_template($extra = '') { - if ($extra) + if ($extra && $this->getvar('app_name')) { $GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->getvar('app_name'),'default') . SEP . 'extrabox')); } @@ -96,10 +93,8 @@ $this->output = array ( - 'outer_width' => $this->getvar('width'), 'title' => $this->getvar('title'), - 'inner_width' => $this->getvar('width'), - 'header_background_image' => $this->getvar('header_background_image') + 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler.png') ); } @@ -117,9 +112,8 @@ { if($data=='' && !count($this->data)) { - $data = ' '; + $data = ''; } - $this->output['extrabox'] = $data; } @@ -127,7 +121,7 @@ { if($data=='' && !count($this->data)) { - $data = ' '; + $data = ''; } $this->output['xextrabox'] = $data; }