cloudstack 3.0 UI - multiEdit widget - make headerFields hidden as default.

This commit is contained in:
Jessica Wang 2012-07-17 15:42:01 -07:00
parent 32fe57aa77
commit 140768c82b
2 changed files with 8 additions and 5 deletions

View File

@ -2543,14 +2543,15 @@
$.ajax({
url: createURL('listPublicIpAddresses'),
data: {
id: args.context.ipAddresses[0].id
id: args.context.ipAddresses[0].id,
listAll: true
},
success: function(json) {
var item = json.listpublicipaddressesresponse.publicipaddress[0];
args.context.ipAddresses.shift(); //remove the first element in args.context.ipAddresses
args.context.ipAddresses.push(item);
var $headerFields = $multi.find('.header-fields');
var $headerFields = $multi.find('.header-fields');
if ('vpc' in args.context) {
if(args.context.ipAddresses[0].associatednetworkid == null) {
$headerFields.show();
@ -2816,11 +2817,12 @@
});
// Check if tiers are present; hide/show header drop-down (begin) ***
//dataProvider() is called when a LB rule is added in multiEdit. However, adding a LB rule might change parent object (IP Address object). So, we have to force to refresh args.context.ipAddresses[0] here
//dataProvider() is called when a PF rule is added in multiEdit. However, adding a LB rule might change parent object (IP Address object). So, we have to force to refresh args.context.ipAddresses[0] here
$.ajax({
url: createURL('listPublicIpAddresses'),
data: {
id: args.context.ipAddresses[0].id
id: args.context.ipAddresses[0].id,
listAll: true
},
success: function(json) {
var item = json.listpublicipaddressesresponse.publicipaddress[0];

View File

@ -768,7 +768,8 @@
}
}) : null;
var $headerFields = $('<div>').addClass('header-fields');
$headerFields.hide();
if (headerForm) {
$headerFields.append(headerForm.$formContainer)
.prependTo($multi);