Merge pull request #369 from AleziaKurdis/feature/zonesSelectorSorted

Zones Selector sorted by zone names
This commit is contained in:
kasenvr 2020-05-29 20:44:45 -04:00 committed by GitHub
commit 41c961198c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2905,7 +2905,24 @@ function getExistingZoneList() {
};
listExistingZones.push(thisZone);
}
listExistingZones.sort(zoneSortOrder);
return listExistingZones;
}
function zoneSortOrder(a, b) {
var nameA = a.name.toUpperCase();
var nameB = b.name.toUpperCase();
if (nameA > nameB) {
return 1;
} else if (nameA < nameB) {
return -1;
}
if (a.name > b.name) {
return 1;
} else if (a.name < b.name) {
return -1;
}
return 0;
}
}()); // END LOCAL_SCOPE