From 2da75a93bff5699bb102031465b42ab2392705c8 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 1 Nov 2010 20:12:25 -0700 Subject: [PATCH] new UI - apply setBooleanEditField() to all editable dropdown boolean field. --- ui/new/scripts/cloud.core2.serviceoffering.js | 3 ++- ui/new/scripts/cloud.core2.template.js | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/new/scripts/cloud.core2.serviceoffering.js b/ui/new/scripts/cloud.core2.serviceoffering.js index 19b0b2580b5..bea58ac4d3f 100644 --- a/ui/new/scripts/cloud.core2.serviceoffering.js +++ b/ui/new/scripts/cloud.core2.serviceoffering.js @@ -216,7 +216,8 @@ function serviceOfferingJsonToDetailsTab() { $thisTab.find("#memory").text(convertBytes(parseInt(jsonObj.memory)*1024*1024)); setBooleanReadField(jsonObj.offerha, $thisTab.find("#offerha")); - $thisTab.find("#offerha_edit").val(jsonObj.offerha); + setBooleanEditField(jsonObj.offerha, $thisTab.find("#offerha_edit")); + //$thisTab.find("#offerha_edit").val(jsonObj.offerha); $thisTab.find("#networktype").text(toNetworkType(jsonObj.usevirtualnetwork)); $thisTab.find("#tags").text(fromdb(jsonObj.tags)); diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index edd5c0b6c9e..06082727804 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -257,13 +257,16 @@ function templateJsonToDetailsTab() { $thisTab.find("#size").text(""); setBooleanReadField(jsonObj.passwordenabled, $thisTab.find("#passwordenabled")); - $thisTab.find("#passwordenabled_edit").val(jsonObj.passwordenabled); + setBooleanEditField(jsonObj.passwordenabled, $thisTab.find("#passwordenabled_edit")); + //$thisTab.find("#passwordenabled_edit").val(jsonObj.passwordenabled); setBooleanReadField(jsonObj.ispublic, $thisTab.find("#ispublic")); - $thisTab.find("#ispublic_edit").val(jsonObj.ispublic); + setBooleanEditField(jsonObj.ispublic, $thisTab.find("#ispublic_edit")); + //$thisTab.find("#ispublic_edit").val(jsonObj.ispublic); setBooleanReadField(jsonObj.isfeatured, $thisTab.find("#isfeatured")); - $thisTab.find("#isfeatured_edit").val(jsonObj.isfeatured); + setBooleanEditField(jsonObj.isfeatured, $thisTab.find("#isfeatured_edit")); + //$thisTab.find("#isfeatured_edit").val(jsonObj.isfeatured); setBooleanReadField(jsonObj.crossZones, $thisTab.find("#crossZones"));