From 115aff6cdbf3b5e2e628b95ca3bb2671ec029269 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 14 Jan 2011 11:21:00 -0800 Subject: [PATCH] deploy VM - show new password in dialog, middle menu item and right panel when middle menu item is clicked. --- ui/scripts/cloud.core.instance.js | 7 ++++--- ui/scripts/cloud.core.js | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/scripts/cloud.core.instance.js b/ui/scripts/cloud.core.instance.js index d73b0633862..e285ba35035 100644 --- a/ui/scripts/cloud.core.instance.js +++ b/ui/scripts/cloud.core.instance.js @@ -1170,9 +1170,10 @@ function initVMWizard() { bindClickToMidMenu($midmenuItem1, vmToRightPanel, getMidmenuId); if (item.passwordenabled == true) { - var extraMessage = "New password: " + item.password; - afterAddingMidMenuItem($midmenuItem1, true, extraMessage); - var afterActionInfo = "Instance " + getVmName(item.name, item.displayname) + " has been created successfully. New password is: " + item.password; + var secondRowText = "New password is " + item.password; + afterAddingMidMenuItem($midmenuItem1, true, secondRowText); + + var afterActionInfo = "Instance " + getVmName(item.name, item.displayname) + " has been created successfully. New password is " + item.password; $midmenuItem1.data("afterActionInfo", afterActionInfo); $("#dialog_info") diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js index 09a6ee78b50..651f44e6b49 100644 --- a/ui/scripts/cloud.core.js +++ b/ui/scripts/cloud.core.js @@ -695,7 +695,7 @@ function beforeAddingMidMenuItem() { $("#midmenu_container").prepend($midmenuItem1.show()); return $midmenuItem1; } -function afterAddingMidMenuItem($midmenuItem1, isSuccessful, extraMessage) { +function afterAddingMidMenuItem($midmenuItem1, isSuccessful, secondRowText) { $midmenuItem1.find("#content").removeClass("inaction"); $midmenuItem1.find("#spinning_wheel").hide(); @@ -730,8 +730,8 @@ function afterAddingMidMenuItem($midmenuItem1, isSuccessful, extraMessage) { }); } - if(extraMessage != null) { - $midmenuItem1.find("#second_row").text(extraMessage); + if(secondRowText != null) { + $midmenuItem1.find("#second_row").text(secondRowText); } }