bug 12509: Add Network Offering dialog - service provider dropdown - make "VirtualRouter" to be the 1st option regardless of the sequence returned in listsupportednetworkservicesresponse.service.provider

This commit is contained in:
Jessica Wang 2012-01-31 14:43:50 -08:00
parent c2f99796bb
commit b1073d6b68
1 changed files with 11 additions and 7 deletions

View File

@ -1302,14 +1302,18 @@
label: displayName + ' Provider',
isHidden: true,
dependsOn: id.isEnabled,
select: function(args) {
select: function(args) {
//Virtual Router needs to be the first choice in provider dropdown (Bug 12509)
var items = [];
$(providers).each(function(){
if(this.name == "VirtualRouter")
items.unshift({id: this.name, description: this.name});
else
items.push({id: this.name, description: this.name});
});
args.response.success({
data: $.map(providers, function(provider) {
return {
id: provider.name,
description: provider.name
};
})
data: items
});
}
};