- 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;