Add code to show/hide 'tiers' header fields

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

View File

@ -2194,7 +2194,9 @@
}
}
},
dataProvider: function(args) {
dataProvider: function(args) {
var $multi = args.$multi;
$.ajax({
url: createURL('listLoadBalancerRules'),
data: {
@ -2289,6 +2291,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();
}
}
},
@ -2444,6 +2456,8 @@
}
},
dataProvider: function(args) {
var $multi = args.$multi;
$.ajax({
url: createURL('listPortForwardingRules'),
data: {
@ -2495,6 +2509,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

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