openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ae8bd06cc35371ca5e51a35e45514abfbcc1b9c7
parent 22c7b58ebd405e264f73da5dec7b26109cb04c33
Author: dankert <devnull@localhost>
Date:   Wed,  3 Feb 2010 23:55:32 +0100

Spalten- und Zeilenindex korrekt merken.

Diffstat:
themes/default/include/html/cell.inc.php | 35++++++++++++-----------------------
themes/default/include/html/page.inc.php | 2+-
themes/default/include/html/row.inc.php | 26++++++--------------------
themes/default/include/html/table-end.inc.php | 6++++++
themes/default/include/html/table.inc.php | 15++++++++-------
themes/default/include/html/window.inc.php | 3++-
6 files changed, 35 insertions(+), 52 deletions(-)

diff --git a/themes/default/include/html/cell.inc.php b/themes/default/include/html/cell.inc.php @@ -1,32 +1,21 @@ -<?php - if( isset($column_class_idx) ) - { - $column_class_idx++; - if ($column_class_idx > count($column_classes)) - $column_class_idx=1; - $column_class=$column_classes[$column_class_idx-1]; - if (empty($attr_class)) - $attr_class=$column_class; - } - - global $cell_column_nr; - $cell_column_nr++; - if ( isset($column_widths[$cell_column_nr-1]) && !isset($attr_rowspan) ) - $attr_width=$column_widths[$cell_column_nr-1]; -?><td<?php +<?php $column_idx++; ?><td #IF-ATTR width# -?> width="<?php echo $attr_width ?>"<?php + width="%width%" +#ELSE# + width="<?php if (!empty($column_widths)) echo $column_widths[($column_idx-1)%count($column_widths)] ?>" #END-IF# #IF-ATTR style# -?> style="<?php echo $attr_style ?>" <?php + style="%style%" #END-IF# #IF-ATTR class# -?> class="<?php echo $attr_class ?>" <?php + class="%class%" +#ELSE# + class="<?php if (!empty($column_classes)) echo $column_classes[($column_idx-1)%count($column_classes)] ?>" #END-IF# #IF-ATTR colspan# -?> colspan="<?php echo $attr_colspan ?>" <?php + colspan="%colspan%" #END-IF# #IF-ATTR rowspan# -?> rowspan="<?php echo $attr_rowspan ?>" <?php + rowspan="%rowspan%" #END-IF# -?>>- \ No newline at end of file +>+ \ No newline at end of file diff --git a/themes/default/include/html/page.inc.php b/themes/default/include/html/page.inc.php @@ -30,6 +30,6 @@ <?php } ?> </head> -<body class="<?php echo $attr_class ?>" <?php if (@$conf['interface']['application_mode']) { ?> style="padding:0px;margin:0px;"<?php } ?> > +<body class="%class%" <?php if (@$conf['interface']['application_mode']) { ?> style="padding:0px;margin:0px;"<?php } ?> > <?php /* Debug-Information */ if ($showDuration) { echo "<!-- Output Variables are:\n";echo str_replace('-->','-- >',print_r($this->templateVars,true));echo "\n-->";} ?> \ No newline at end of file diff --git a/themes/default/include/html/row.inc.php b/themes/default/include/html/row.inc.php @@ -1,20 +1,6 @@ <?php - $attr_tmp_class=''; - - /* #IF-ATTR classes# */ - $attr_tmp_class_list = explode(',',$attr_classes); - $last_pos = array_search($attr_last_class,$attr_tmp_class_list); - if ( $last_pos === FALSE || $last_pos == count($attr_tmp_class_list)-1) - $attr_tmp_class = $attr_tmp_class_list[0]; - else - $attr_tmp_class = $attr_tmp_class_list[++$last_pos]; - /* #END-IF# */ - - /* #IF-ATTR class# */ - $attr_tmp_class=$attr_class; - /* #END-IF# */ - - $attr_last_class = $attr_tmp_class; - - echo Html::open_tag('tr',array('class'=>$attr_tmp_class)); -?>- \ No newline at end of file + $row_idx++; + $column_idx = 0; +?> +<tr class="%class%"> +/* Ignore: */ </tr>+ \ No newline at end of file diff --git a/themes/default/include/html/table-end.inc.php b/themes/default/include/html/table-end.inc.php @@ -1 +1,7 @@ +<?php + // Restore state + $row_idx = $last_row_idx; + $column_idx = $last_column_idx; +?> +/* ignore: */ <table> </table> \ No newline at end of file diff --git a/themes/default/include/html/table.inc.php b/themes/default/include/html/table.inc.php @@ -1,13 +1,13 @@ <?php + // Status speichern + $last_row_idx = @$row_idx; + $last_column_idx = @$column_idx; + $row_idx = 0; + $column_idx = 0; $coloumn_widths = array(); $row_classes = array(); $column_classes = array(); - #IF-ATTR class# - #ELSE - $attr_class=''; - #END-IF - #IF-ATTR widths# $column_widths = explode(',',$attr_widths); #END-IF @@ -26,4 +26,5 @@ $column_classes = explode(',',$attr_columnclasses); #END-IF -?><table class="<?php echo $attr_class ?>" cellspacing="<?php echo $attr_space ?>" width="<?php echo $attr_width ?>" cellpadding="<?php echo $attr_padding ?>">- \ No newline at end of file +?><table class="%class%" cellspacing="%space%" width="%width%" cellpadding="%padding%"> +/* ignore */ </table>+ \ No newline at end of file diff --git a/themes/default/include/html/window.inc.php b/themes/default/include/html/window.inc.php @@ -10,7 +10,8 @@ #IF-ATTR columnclasses# $column_classes = explode(',',$attr_columnclasses); #END-IF# - + $row_idx = 0; + $column_idx = 0; global $image_dir; if (@$conf['interface']['application_mode'] )