update portal plus tpl

This commit is contained in:
ceb 2002-10-06 16:18:03 +00:00
parent bfd5f43148
commit afa2d68758
3 changed files with 31 additions and 17 deletions

View File

@ -137,6 +137,12 @@
$reg = "/<!--\s+BEGIN $handle\s+-->(.*)\n\s*<!--\s+END $handle\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)

View File

@ -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);
}
}
}
/*

View File

@ -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;
}