openrat-cms

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

commit c5056946db20c51906e3d094a67c7bbcbac57926
parent 6c571c7e8be04cf9180fbff4b1753065be0560b9
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  1 Dec 2017 00:04:46 +0100

Komponente "row" umgestellt auf eine Klasse.

Diffstat:
themes/default/include/html/row/Row.class.php | 27+++++++++++++++++++++++++++
themes/default/include/html/row/row-begin.inc.php | 13-------------
themes/default/include/html/row/row-end.inc.php | 2--
themes/default/include/html/table/Table.class.php | 6+++---
4 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/themes/default/include/html/row/Row.class.php b/themes/default/include/html/row/Row.class.php @@ -0,0 +1,27 @@ +<?php + +class RowComponent extends Component +{ + + public $class = ''; + + public $id = ''; + + public function begin() + { + echo '<tr'; + + if (! empty($this->class)) + echo ' class="' . $this->htmlvalue($this->class) . '"'; + + if (! empty($this->id)) + echo ' data-id="' . $this->htmlvalue($this->id) . '"'; + echo '>'; + } + + public function end() + { + echo '</tr>'; + } +} +?> diff --git a/themes/default/include/html/row/row-begin.inc.php b/themes/default/include/html/row/row-begin.inc.php @@ -1,12 +0,0 @@ -<?php - $column_idx = 0; -?> -<tr -#IF-ATTR class# - class="%class%" -#END-IF# -#IF-ATTR id# - data-id="%id%" -#END-IF# -> -/* Ignore: */ </tr>- \ No newline at end of file diff --git a/themes/default/include/html/row/row-end.inc.php b/themes/default/include/html/row/row-end.inc.php @@ -1 +0,0 @@ -</tr>- \ No newline at end of file diff --git a/themes/default/include/html/table/Table.class.php b/themes/default/include/html/table/Table.class.php @@ -8,13 +8,13 @@ class TableComponent extends Component public function begin() { - echo '<table '; + echo '<table'; if ( !empty($this->class)) - echo 'class="'.$this->htmlvalue($this->class)."'"; + echo ' class="'.$this->htmlvalue($this->class).'"'; if ( !empty($this->width)) - echo 'width="'.$this->htmlvalue($this->width)."'"; + echo ' width="'.$this->htmlvalue($this->width).'"'; echo '>'; }