From 262bbbe8001631df8aa00ed6a89bbb66e49dc141 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Tue, 10 Jul 2012 15:39:09 -0700 Subject: [PATCH] Add block to show/hide tier select -- Hidden by default, needs real conditional code --- ui/scripts/network.js | 20 ++++++++++++++------ ui/scripts/ui-custom/enableStaticNAT.js | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index bb9f4f906cc..6699d163d97 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1236,12 +1236,20 @@ custom: cloudStack.uiCustom.enableStaticNAT({ // VPC tierSelect: function(args) { - args.response.success({ - data: [ - { id: '1', description: 'VPC 1' }, - { id: '2', description: 'VPC 2' } - ] - }); + args.$tierSelect.hide(); // Hidden by default + + // Determine if tiers are supported here + var enableTiers = false; + + if (enableTiers) { + args.$tierSelect.show(); + args.response.success({ + data: [ + { id: '1', description: 'VPC 1' }, + { id: '2', description: 'VPC 2' } + ] + }); + } }, listView: $.extend(true, {}, cloudStack.sections.instances, { diff --git a/ui/scripts/ui-custom/enableStaticNAT.js b/ui/scripts/ui-custom/enableStaticNAT.js index f3fbfadd16a..67a54e16ed6 100644 --- a/ui/scripts/ui-custom/enableStaticNAT.js +++ b/ui/scripts/ui-custom/enableStaticNAT.js @@ -137,6 +137,7 @@ // Get tier data tierSelect({ context: context, + $tierSelect: $tierSelect, response: { success: function(args) { var data = args.data;