- empty cells in a box can now be kept (not optimized away)

- fixed not used ro-image for buttons, if set via the content-array
This commit is contained in:
Ralf Becker 2006-09-27 13:09:28 +00:00
parent f378683cab
commit 79b302aae5
2 changed files with 11 additions and 5 deletions

View File

@ -692,11 +692,12 @@ implement only a subset of XUL. Here are the main differences:</p>
<td>
vertical or horizontal <b>container</b> for child widgets. This is useful if one needs more
widgets or widgets outside the column- / row-order of a grid. HBox or VBox is rendered as Grid/html:table
with only one row or colum. Box is rendered as a html:div containing all child-widgets.<br />
with only one row or colum. Box is rendered as a html:div containing all child-widgets.
Disabled child-cells are completly left out (no empty cells or rows get generated).<p>
<b>Options</b> <i>in the editor</i>: the number of cells in the box (does NOT need to be set in xml).<br />
<b>orient</b>: horizontal, vertical or none (means h/vbox as expected and no table for boxes)
<b>options</b>: cellpadding,cellspacing of the table
<b>cellpadding,cellspacing</b>: known table-options
<b>keepEmpty</b>: if true, empty cells (lines or rows) are kept, otherwise they are completly removed
</td>
</tr>
<tr>

View File

@ -412,6 +412,7 @@
}
else
{
//echo "<p>process_exec($this->name): calling $session_data[method]</p>\n";
return ExecMethod($session_data['method'],$this->complete_array_merge($session_data['preserv'],$content));
}
}
@ -792,6 +793,10 @@
if ((int) $cell['tabindex']) $options .= ' tabindex="'.(int)$cell['tabindex'].'"';
if ($cell['accesskey']) $options .= ' accesskey="'.$this->html->htmlspecialchars($cell['accesskey']).'"';
if (strchr($cell['size'],'$') || $cell['size']{0} == '@') // expand cell['size'] for the button-disabled-check now
{
$cell['size'] = $this->expand_name($cell['size'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
}
if ($cell['disabled'] && $readonlys[$name] !== false || $readonly && $cell['type'] == 'button' && !strstr($cell['size'],','))
{
if ($this->rows == 1) {
@ -1360,12 +1365,12 @@
$box_row = 1;
$box_col = 'A';
$box_anz = 0;
list($num,$orient) = explode(',',$cell_options);
list($num,$orient,,,$keep_empty) = explode(',',$cell_options);
if (!$orient) $orient = $type == 'hbox' ? 'horizontal' : ($type == 'box' ? false : 'vertical');
for ($n = 1; $n <= (int) $num; ++$n)
{
$h = $this->show_cell($cell[$n],$content,$readonlys,$cname,$show_c,$show_row,$nul,$cl,$path.'/'.$n);
if ($h != '' && $h != '&nbsp;')
if ($h != '' && $h != '&nbsp;' || $keep_empty)
{
if ($orient != 'horizontal')
{
@ -1640,7 +1645,7 @@
{
$value = ''; // blur-values is equal to emtpy
}
// echo "<p>process_show($this->name) $type: $form_name = '$value'</p>\n";
//echo "<p>process_show($this->name) loop was {$GLOBALS['egw_info']['etemplate']['loop']}, $type: $form_name = '$value'</p>\n";
list($type,$sub) = explode('-',$type);
switch ($type)
{