forked from 0x2620/oxjs
use 'sort' property, not 'map' property, for custom sort in table lists (fixes #993)
This commit is contained in:
parent
03520f6b2e
commit
a392cad0bc
2 changed files with 17 additions and 17 deletions
|
|
@ -93,15 +93,15 @@ Ox.MapEditor = function(options, self) {
|
|||
: '';
|
||||
},
|
||||
id: 'countryCode',
|
||||
map: function(value) {
|
||||
operator: '+',
|
||||
resizable: false, // fixme: implement
|
||||
sort: function(value) {
|
||||
var names = value.split(', ');
|
||||
if (!Ox.getCountryByGeoname(names[names.length - 1])) {
|
||||
names.push('~');
|
||||
}
|
||||
return names.reverse().join(', ');
|
||||
},
|
||||
operator: '+',
|
||||
resizable: false, // fixme: implement
|
||||
title: 'Flag',
|
||||
titleImage: 'flag',
|
||||
tooltip: function(data) {
|
||||
|
|
@ -169,17 +169,17 @@ Ox.MapEditor = function(options, self) {
|
|||
},
|
||||
{
|
||||
id: 'geoname',
|
||||
map: function(value) {
|
||||
operator: '+',
|
||||
sort: function(value) {
|
||||
var names = value.split(', ');
|
||||
if (!Ox.getCountryByGeoname(names[names.length - 1])) {
|
||||
names.push('~');
|
||||
}
|
||||
return names.reverse().join(', ');
|
||||
},
|
||||
operator: '+',
|
||||
title: 'Geoname',
|
||||
visible: false,
|
||||
width: 192
|
||||
}
|
||||
return names.reverse().join(', ');
|
||||
},
|
||||
title: 'Geoname',
|
||||
visible: false,
|
||||
width: 192
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue