[Minor] sort reports
This commit is contained in:
parent
2f0716e6ce
commit
6902da6796
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "strolch-wc-reports",
|
||||
"description": "Strolch WebComponent Reports",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"authors": [
|
||||
"Robert von Burg"
|
||||
],
|
||||
|
|
|
@ -365,10 +365,20 @@
|
|||
},
|
||||
onGetReportResponse: function (event) {
|
||||
// get the response
|
||||
var response = event.detail.response;
|
||||
var data = event.detail.response.data;
|
||||
var that = this;
|
||||
data.sort(function (a, b) {
|
||||
a = that.localize(a.name);
|
||||
b = that.localize(b.name);
|
||||
if (a < b)
|
||||
return -1;
|
||||
if (a > b)
|
||||
return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
// directly set this as the available types
|
||||
this.set("reports", response.data);
|
||||
this.set("reports", data);
|
||||
},
|
||||
onGetFacetResponse: function (event) {
|
||||
// get the response
|
||||
|
|
Loading…
Reference in New Issue