Functions - th_order_by: Order column asc on first click.
This commit is contained in:
+10
-4
@@ -438,12 +438,18 @@
|
|||||||
if (strlen($order_by) == 0) {
|
if (strlen($order_by) == 0) {
|
||||||
$order = 'asc';
|
$order = 'asc';
|
||||||
}
|
}
|
||||||
if ($order == "asc") {
|
if ($order_by == $field_name) {
|
||||||
$description .= $text['label-order'].': '.$text['label-ascending'];
|
if ($order == "asc") {
|
||||||
$html .= "<a href='?order_by=".urlencode($field_name)."&order=desc".$app_uuid.$sanitized_parameters."' title=\"".escape($description)."\">".escape($column_title)."</a>";
|
$description .= $text['label-order'].' '.$text['label-descending'];
|
||||||
|
$html .= "<a href='?order_by=".urlencode($field_name)."&order=desc".$app_uuid.$sanitized_parameters."' title=\"".escape($description)."\">".escape($column_title)."</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$description .= $text['label-order'].' '.$text['label-ascending'];
|
||||||
|
$html .= "<a href='?order_by=".urlencode($field_name)."&order=asc".$app_uuid.$sanitized_parameters."' title=\"".escape($description)."\">".escape($column_title)."</a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$description .= $text['label-order'].': '.$text['label-descending'];
|
$description .= $text['label-order'].' '.$text['label-ascending'];
|
||||||
$html .= "<a href='?order_by=".urlencode($field_name)."&order=asc".$app_uuid.$sanitized_parameters."' title=\"".escape($description)."\">".escape($column_title)."</a>";
|
$html .= "<a href='?order_by=".urlencode($field_name)."&order=asc".$app_uuid.$sanitized_parameters."' title=\"".escape($description)."\">".escape($column_title)."</a>";
|
||||||
}
|
}
|
||||||
$html .= "</th>";
|
$html .= "</th>";
|
||||||
|
|||||||
Reference in New Issue
Block a user