diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 21b14da89..cbf3c071c 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -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 .= " "; @@ -4175,7 +4179,9 @@ class e_form $val['url'] = e_SELF."?".str_replace($srch,$repl,$querypattern); } - $text .= (vartrue($val['url'])) ? "" : ""; // Really this column-sorting link should be auto-generated, or be autocreated via unobtrusive js. + + + $text .= (vartrue($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']) ? "" : ""; $text .= ($key === "options" && !vartrue($val['noselector'])) ? $this->columnSelector($fieldarray, $columnPref) : ""; diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 1f27ee5fa..de1d1a93a 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -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 }