From 15f1874cc169ef2fee048228593b020166904cee Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 27 Oct 2010 14:45:01 -0700 Subject: [PATCH] new UI - fix: "Hit Enter key should auto submit on dialogs" --- ui/new/scripts/cloud.core2.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index 62e7564b5be..13062744207 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -780,39 +780,39 @@ function setVmStateInRightPanel(stateValue, $stateField) { function initDialog(elementId, width1) { if(width1 == null) { - $("#"+elementId).dialog({ + activateDialog($("#"+elementId).dialog({ autoOpen: false, modal: true, zIndex: 2000 - }); + })); } else { - $("#"+elementId).dialog({ + activateDialog($("#"+elementId).dialog({ width: width1, autoOpen: false, modal: true, zIndex: 2000 - }); + })); } } function initDialogWithOK(elementId, width1) { if(width1 == null) { - $("#"+elementId).dialog({ + activateDialog($("#"+elementId).dialog({ autoOpen: false, modal: true, zIndex: 2000, buttons: { "OK": function() { $(this).dialog("close"); } } - }); + })); } else { - $("#"+elementId).dialog({ + activateDialog($("#"+elementId).dialog({ width: width1, autoOpen: false, modal: true, zIndex: 2000, buttons: { "OK": function() { $(this).dialog("close"); } } - }); + })); } }