mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Zones Selector sorted by zone names
This change makes the Zones Selector sorted by zone names. To address issue: renderWithZones: zone list incorrectly sorted. #354 (But this doesn't fix the problem with the scrolling)
This commit is contained in:
parent
9c96136312
commit
3a0c4e1477
1 changed files with 12 additions and 0 deletions
|
@ -2905,7 +2905,19 @@ function getExistingZoneList() {
|
|||
};
|
||||
listExistingZones.push(thisZone);
|
||||
}
|
||||
listExistingZones.sort(GetSortOrder("name"));
|
||||
return listExistingZones;
|
||||
}
|
||||
|
||||
function GetSortOrder(sortProperty) {
|
||||
return function(a, b) {
|
||||
if (a[sortProperty] > b[sortProperty]) {
|
||||
return 1;
|
||||
} else if (a[sortProperty] < b[sortProperty]) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}()); // END LOCAL_SCOPE
|
||||
|
|
Loading…
Reference in a new issue