[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.xul_io.inc.php,1.9,1.10
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.xul_io.inc.php,1.9,1.10 |
Date: |
Sun, 22 Sep 2002 13:56:50 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv25280
Modified Files:
class.xul_io.inc.php
Log Message:
etemplates xml/xul-files can have more than one template in a file now (the tpl
coresponding to the name has to be the last one)
Index: class.xul_io.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.xul_io.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.xul_io.inc.php 17 Sep 2002 22:52:24 -0000 1.9
--- class.xul_io.inc.php 22 Sep 2002 17:56:48 -0000 1.10
***************
*** 112,125 ****
}
! function export($etempl)
{
- if ($this->debug)
- {
- echo "<p>etempl->data = ";
_debug_array($etempl->data);
- }
- $doc = new xmldoc();
-
- $xul_overlay = new xmlnode('overlay');
-
$xul_grid = new xmlnode('grid');
$xul_grid->set_attribute('id',$etempl->name);
--- 112,117 ----
}
! function etempl2grid($etempl,&$root,$embeded_too=True)
{
$xul_grid = new xmlnode('grid');
$xul_grid->set_attribute('id',$etempl->name);
***************
*** 160,163 ****
--- 152,161 ----
list(,$type) = each($type);
}
+ if ($type == 'template' &&
$cell['name'][0] != '@' && $embeded_too)
+ {
+ $embeded = new
etemplate($cell['name']);
+
$this->etempl2grid($embeded,&$root,$embeded_too);
+ unset($embeded);
+ }
if (substr($type,0,6) == 'select')
{
***************
*** 258,262 ****
$xul_grid->add_node($styles);
}
! $xul_overlay->add_node($xul_grid);
$doc->add_root($xul_overlay);
--- 256,275 ----
$xul_grid->add_node($styles);
}
! $root->add_node($xul_grid);
!
! return '';
! }
!
! function export($etempl)
! {
! if ($this->debug)
! {
! echo "<p>etempl->data = ";
_debug_array($etempl->data);
! }
! $doc = new xmldoc();
!
! $xul_overlay = new xmlnode('overlay');
!
! $this->etempl2grid($etempl,&$xul_overlay);
$doc->add_root($xul_overlay);
***************
*** 280,288 ****
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE,
1);
$vals = $index = '';
! xml_parse_into_struct($parser, $data, $vals, $index);
! if (!is_array($vals))
{
! $err =
xml_error_string(xml_get_error_code($parser));
}
xml_parser_free($parser);
--- 293,302 ----
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE,
1);
$vals = $index = '';
! $ok = xml_parse_into_struct($parser, $data, $vals,
$index);
! if (!$ok || !is_array($vals))
{
! $err = 'Error Line
'.xml_get_current_line_number($parser).', Column
'.xml_get_current_column_number($parser).
! ':
'.xml_error_string(xml_get_error_code($parser));
}
xml_parser_free($parser);
***************
*** 315,322 ****
if ($this->debug)
{
! echo "<p>$node[level]: $tag/$type:
value='$node[value]' attr="; _debug_array($attr);
}
switch ($tag)
{
case 'grid':
if ($type != 'close' &&
is_array($tab_attr))
--- 329,338 ----
if ($this->debug)
{
! echo "<p>$node[level]: $tag/$type:
value='$node[value]' attr=\n"; _debug_array($attr);
}
switch ($tag)
{
+ case 'overlay':
+ break;
case 'grid':
if ($type != 'close' &&
is_array($tab_attr))
***************
*** 333,336 ****
--- 349,359 ----
break;
}
+ if ($grid_started) // more
than one grid in the file --> place it into the cache
+ {
+ $cname =
($etempl->template == '' ? 'default' : $etempl->template).'/'.$etempl->name.
+ ($etempl->lang
== '' ? '' : '.'.$etempl->lang);
+
$GLOBALS['phpgw_info']['etemplate']['cache'][$cname] = $etempl->as_array(1);
+ }
+ $grid_started = True;
$etempl->init($attr);
$size_opts =
array('padding','spacing','class','border','height','width');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.xul_io.inc.php,1.9,1.10,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.soetemplate.inc.php,1.11,1.12
- Next by Date:
[Phpgroupware-cvs] CVS: etemplate/templates/default nextmatch_widget.xul,1.5,1.6 nextmatch_widget.nm_row.xul,1.1,NONE nextmatch_widget.nm_row1.xul,1.1,NONE nextmatch_widget.nm_row2.xul,1.1,NONE
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.soetemplate.inc.php,1.11,1.12
- Next by thread:
[Phpgroupware-cvs] CVS: etemplate/templates/default nextmatch_widget.xul,1.5,1.6 nextmatch_widget.nm_row.xul,1.1,NONE nextmatch_widget.nm_row1.xul,1.1,NONE nextmatch_widget.nm_row2.xul,1.1,NONE
- Index(es):