X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plekit%2Fphp%2Ftable.php;h=a475bee32acd34557e9400a3d61f4476ae8b1d36;hb=d7cc4e048eea83c6bb75bef519723a918a9c44d0;hp=7adcb5f3c5a0d5cce6fbf109f0c9b931dfa63c13;hpb=2b5e7f3031d25805d07a0d194bdeb71913545f97;p=plewww.git diff --git a/plekit/php/table.php b/plekit/php/table.php index 7adcb5f..a475bee 100644 --- a/plekit/php/table.php +++ b/plekit/php/table.php @@ -103,14 +103,15 @@ EOF; print ""; foreach ($this->headers as $label => $type) { - if ($type == "none" ) { - $class=""; - } else { - if ($type == "string") $type=""; - if ($type == "int") $type=""; - if ($type == "float") $type=""; - $class="sortable"; - if ( ! empty($type)) $class .= "-sort" . $type; + switch ($type) { + case "none" : + $class=""; break; + case "string": case "int": case "float": + $class="sortable"; break; + case ( strpos($type,"date-") == 0): + $class="sortable-" . $type; break; + default: + $class="sortable-sort" . $type; break; } printf ('%s',$class,$label); } @@ -144,7 +145,7 @@ EOF; onkeyup='plekit_pagesize_set("$this->table_id","$pagesize_text_id", $this->pagesize);' size='3' maxlength='3' /> - reset visible size EOF; @@ -159,16 +160,16 @@ EOF; $search_and_id = $this->table_id . "_search_and"; $result = <<< EOF -