1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

Admin-ui: Made column sorting more obvious. Added carets when in use.

This commit is contained in:
Cameron
2019-02-05 15:46:58 -08:00
parent bed2e6d0fe
commit 3e264b23c7
2 changed files with 12 additions and 2 deletions

View File

@@ -4156,13 +4156,17 @@ class e_form
if(!varset($fromval)){ $fromval = 0; }
$ascdesc = (varset($ascdesc) == 'desc') ? 'asc' : 'desc';
$sorted = varset($ascdesc);
$ascdesc = ($sorted == 'desc') ? 'asc' : 'desc';
foreach($fieldarray as $key=>$val)
{
if ((in_array($key, $columnPref) || ($key === 'options' && isset($val['title'])) || (vartrue($val['forced']))) && !vartrue($val['nolist']))
{
$cl = (vartrue($val['thclass'])) ? " class='".$val['thclass']."'" : "";
$aClass = ($key === $field) ? "class='sorted-".$sorted."'" : "";
$text .= "
<th id='e-column-".str_replace('_', '-', $key)."'{$cl}>
";
@@ -4175,7 +4179,9 @@ class e_form
$val['url'] = e_SELF."?".str_replace($srch,$repl,$querypattern);
}
$text .= (vartrue($val['url'])) ? "<a href='".str_replace(array('&amp;', '&'), array('&', '&amp;'),$val['url'])."'>" : ""; // Really this column-sorting link should be auto-generated, or be autocreated via unobtrusive js.
$text .= (vartrue($val['url'])) ? "<a ".$aClass." title=\"".LAN_SORT."\" href='".str_replace(array('&amp;', '&'), array('&', '&amp;'),$val['url'])."'>" : ""; // Really this column-sorting link should be auto-generated, or be autocreated via unobtrusive js.
$text .= defset($val['title'], $val['title']);
$text .= ($val['url']) ? "</a>" : "";
$text .= ($key === "options" && !vartrue($val['noselector'])) ? $this->columnSelector($fieldarray, $columnPref) : "";

View File

@@ -551,6 +551,10 @@ img.S32:hover {}
.adminlist th.last,
.adminlist td.last { border-right: 0 solid;}
.adminlist tr.last td { border-bottom: 0 solid;}
.adminlist th a.sorted-asc,
.adminlist th a.sorted-desc { text-decoration: none }
.adminlist th a.sorted-asc:after { padding-left:5px; font-family: FontAwesome; content: '\f0d8' }
.adminlist th a.sorted-desc:after { padding-left:5px; font-family: FontAwesome; content: '\f0d7' }
.adminlist .col-selection-cont { position: relative; float:right; }
table.adminlist { margin-bottom: 0 }