From 757bb0c9b0b4f34639743e7890469c241998d4e0 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 19 Dec 2011 19:23:26 -0800 Subject: [PATCH] bug 12552: cloudStack 3.0 new UI - template/ISO page - do not show copy template/ISO action when template's zoneId is null or "-1"(i.e. all zones). --- ui/scripts/templates.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index a61c2d1a7d3..6fcf5b9bd4b 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -1507,8 +1507,11 @@ //do nothing } else { - allowedActions.push("edit"); - allowedActions.push("copyTemplate"); + allowedActions.push("edit"); + + if(jsonObj.zoneid != null || jsonObj.zoneid != "-1") + allowedActions.push("copyTemplate"); + //allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network. } @@ -1546,8 +1549,10 @@ //do nothing } else { - allowedActions.push("edit"); - allowedActions.push("copyISO"); + allowedActions.push("edit"); + + if(jsonObj.zoneid != null || jsonObj.zoneid != "-1") + allowedActions.push("copyISO"); } // "Create VM"