From 676b2e74aa4d3f38dda623714d862d51d68c72d8 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 21 Dec 2010 13:24:29 -0800 Subject: [PATCH] bug 7539: Template page, ISO page - when isready == false, do not show Download Template/ISO option. --- ui/scripts/cloud.core.iso.js | 2 +- ui/scripts/cloud.core.template.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/cloud.core.iso.js b/ui/scripts/cloud.core.iso.js index 151134c2703..9bb7f21976b 100644 --- a/ui/scripts/cloud.core.iso.js +++ b/ui/scripts/cloud.core.iso.js @@ -341,7 +341,7 @@ function isoJsonToDetailsTab() { */ // "Download ISO", "Delete ISO" - if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account))) || (jsonObj.isready == false && jsonObj.isostatus != null && jsonObj.isostatus.indexOf("% Downloaded") != -1)) { + if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account))) || (jsonObj.isready == false)) { //do nothing } else { diff --git a/ui/scripts/cloud.core.template.js b/ui/scripts/cloud.core.template.js index d70067ed541..15ec79757ef 100644 --- a/ui/scripts/cloud.core.template.js +++ b/ui/scripts/cloud.core.template.js @@ -336,7 +336,7 @@ function templateJsonToDetailsTab() { // "Download Template", "Delete Template" if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account))) - || (jsonObj.isready == false && jsonObj.templatestatus != null && jsonObj.templatestatus.indexOf("% Downloaded") != -1) || jsonObj.templatetype == "SYSTEM") { + || (jsonObj.isready == false) || jsonObj.templatetype == "SYSTEM") { //do nothing } else {