Add code to show/hide 'tiers' header fields

This commit is contained in:
Brian Federle 2012-07-10 14:17:38 -07:00
parent a42c837f95
commit e4a00f1faf
2 changed files with 26 additions and 1 deletions

View File

@ -2260,7 +2260,9 @@
}
}
},
dataProvider: function(args) {
dataProvider: function(args) {
var $multi = args.$multi;
$.ajax({
url: createURL('listLoadBalancerRules'),
data: {
@ -2355,6 +2357,16 @@
});
}
});
// Check if tiers are present; hide/show header drop-down
var hasTiers = false;
var $headerFields = $multi.find('.header-fields');
if (hasTiers) {
$headerFields.hide();
} else {
$headerFields.show();
}
}
},
@ -2510,6 +2522,8 @@
}
},
dataProvider: function(args) {
var $multi = args.$multi;
$.ajax({
url: createURL('listPortForwardingRules'),
data: {
@ -2561,6 +2575,16 @@
}
});
});
// Check if tiers are present; hide/show header drop-down
var hasTiers = false;
var $headerFields = $multi.find('.header-fields');
if (hasTiers) {
$headerFields.hide();
} else {
$headerFields.show();
}
},
error: function(data) {
args.response.error(parseXMLHttpResponse(data));

View File

@ -891,6 +891,7 @@
var getData = function() {
dataProvider({
context: context,
$multi: $multi,
response: {
success: function(args) {
$multi.find('.data-item').remove();