Pokus o vyreseni tabulky co ujizdi pri nacitani obrazku
[mirrors/SokoMan.git] / index.php
index cc4d22a55bd142c4c8221502cd31ad01a727b21a..d6eb6606dcfea5dbeb0da7a966a0aa109eac4783 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -41,9 +41,10 @@ class HTML {
                if($type) $html.="<$type>";
                $html.="<tr$class$parameters>";
                $td = $type == 'thead' ? 'th' : 'td';
-               foreach($row as $var) {
+               foreach($row as $id => $var) {
+                       $tdclass = " class='cell_$id'";
                        if(trim($var) == '') $var = '&nbsp;';
-                       $html.="<$td>$var</$td>";
+                       $html.="<$td$tdclass>$var</$td>";
                }
                $html.='</tr>';
                if($type) $html.="</$type>";
@@ -55,14 +56,13 @@ class HTML {
                $header=true;
                $even=false;
                foreach($table as $row) {
+                       $params = isset($row[$row_params_field]) ? $row[$row_params_field] : '';
+                       unset($row[$row_params_field]);
                        if($header) {
-                               unset($row[$row_params_field]);
-                               $html.=$this->row(array_keys($row),'thead');
+                               $html.=$this->row(T(array_keys($row)),'thead');
                                $header=false;
                        }
                        $class = $parity_class ? $parity_class[$even] : false;
-                       $params = isset($row[$row_params_field]) ? $row[$row_params_field] : '';
-                       unset($row[$row_params_field]);
                        $html.=$this->row($row,false,$class.$params);
                        $even = !$even;
                }
@@ -76,12 +76,12 @@ class HTML {
                return "<a href='$link'>".$title."</a>";
        }
 
-       function img($src='#void', $title='img', $options='width=64') {
+       function img($src='#void', $title='img', $options='height=64') {
                $options = $options ? " $options" : '';
                return "<img src='$src' alt='$title' title='$title'$options; />";
        }
 
-       function img_link($src, $link='#void', $title='img_link', $internal=true, $translate=true, $options='width=64') {
+       function img_link($src, $link='#void', $title='img_link', $internal=true, $translate=true, $options='height=64') {
                return $this->link($this->img($src,$title,$options),$link,$internal,$translate);
        }
 
@@ -208,7 +208,12 @@ a, a img { text-decoration:none; color: darkblue; border:none; }
 li a, a:hover { text-decoration:underline; }
 .tr_even td { background-color: lemonchiffon; }
 .item_status_stored td { font-weight:bold; }
-.item_status_deleted td { font-style:italic; }
+.item_status_deleted td { text-decoration:line-through; }
+.item_status_destroyed td { font-style:italic; }
+/* table, table * { table-layout:fixed; width:100%; overflow:hidden; word-wrap:break-word; } */
+/* td { position:absolute; } */
+.cell_model_name { }
+
 
 .menu li {
        float: left;
@@ -419,11 +424,11 @@ EOF;
                foreach($table as $id => $row) {
                        $table_sorted[$id] = array();
                        foreach($precedence as $column) if(isset($table[$id][$column])) {
-                               $table_sorted[$id][T($column)]=$table[$id][$column];
+                               $table_sorted[$id][$column]=$table[$id][$column];
                                unset($table[$id][$column]);
                        }
-                       //$table_sorted[$id]=array_merge($table_sorted[$id],$table[$id]);
-                       foreach($table[$id] as $key => $val) $table_sorted[$id][T($key)] = $val; //array_merge with T() translating
+                       $table_sorted[$id]=array_merge($table_sorted[$id],$table[$id]);
+                       //foreach($table[$id] as $key => $val) $table_sorted[$id][T($key)] = $val; //array_merge with T() translating
                }
                $table = $table_sorted;
        }
This page took 0.157983 seconds and 4 git commands to generate.