FSN#38637 Sortering tabellen icoontjes geven om sortering aan te duiden

svn path=/Website/trunk/; revision=31812
This commit is contained in:
Jos Groot Lipman
2016-12-05 08:51:43 +00:00
parent 7d9d02cbc2
commit 07831268da
2 changed files with 10 additions and 4 deletions

View File

@@ -101,6 +101,12 @@ var sorttable = {
},
doSort: function (e)
{
var icon = "fa-sort-alpha";
if (this.sorttable_sortfunction == sorttable.sort_numeric || this.sorttable_sortfunction == sorttable.sort_numericcomma)
var icon = "fa-sort-numeric";
if (this.sorttable_sortfunction == sorttable.sort_ddmm || this.sorttable_sortfunction == sorttable.sort_mmdd)
var icon = "fa-sort-amount";
//alert(this.sorttable_sortfunction);
/* JGL */ if (this.preSorttable) eval(this.preSorttable);
if (this.className.search(/\bsorttable_sorted\b/) != -1) {
// if we're already sorted by this column, just
@@ -111,7 +117,7 @@ var sorttable = {
this.removeChild(document.getElementById('sorttable_sortfwdind'));
sortrevind = document.createElement('span');
sortrevind.id = "sorttable_sortrevind";
sortrevind.innerHTML = ' ▴';
sortrevind.innerHTML = '&nbsp;<i class="fa '+icon+'-desc"></i>';
this.appendChild(sortrevind);
sorttable.corrFloat.apply(this);
return;
@@ -125,7 +131,7 @@ var sorttable = {
this.removeChild(document.getElementById('sorttable_sortrevind'));
sortfwdind = document.createElement('span');
sortfwdind.id = "sorttable_sortfwdind";
sortfwdind.innerHTML = '&nbsp;&#x25BE;';
sortfwdind.innerHTML = '&nbsp;<i class="fa '+icon+'-asc"></i>';
this.appendChild(sortfwdind);
sorttable.corrFloat.apply(this);
return;
@@ -148,7 +154,7 @@ var sorttable = {
this.className += ' sorttable_sorted';
sortfwdind = document.createElement('span');
sortfwdind.id = "sorttable_sortfwdind";
sortfwdind.innerHTML = '&nbsp;&#x25BE;';
sortfwdind.innerHTML = '&nbsp;<i class="fa '+icon+'-asc"></i>';
this.appendChild(sortfwdind);
sorttable.corrFloat.apply(this);

View File

@@ -809,7 +809,7 @@ function mld_list (pautfunction, params)
if (anygeo) {
rst.addColumn(new Column({caption: L("lcl_place"), content: "plaatsmelding"}));
}
rst.addColumn(new Column({caption: L("lcl_mld_subject"), content: "mld_melding_onderwerp"}));
rst.addColumn(new Column({caption: L("lcl_mld_subject"), content: "mld_melding_onderwerp", thClass: 'sorttable_alpha'}));
if (S("mld_print_loc_address") == 1)
rst.addColumn(new Column({caption: L("lcl_location_address"), content: "alg_locatie_adres", purpose: PRINTING_ONLY}));
if (minfo)