From bdbf66f5c71e2ecc01cec736aac0e55f951919ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Weing=C3=A4rtner?= Date: Thu, 2 Aug 2018 13:36:12 -0300 Subject: [PATCH] Fix wizards (new instance and new zone) div width problem in Chrome --- ui/scripts/ui-custom/instanceWizard.js | 12 ++++++------ ui/scripts/ui-custom/zoneWizard.js | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index 443e2371378c..1f830cea601f 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -1359,18 +1359,18 @@ $wizard.find('div.data-disk-offering span.custom-disk-size').html(_s(old)); }); + var wizardWidth = 950; + if($.browser.mozilla){ + wizardWidth = 896; + } var wizardDialog = $wizard.dialog({ title: _l('label.vm.add'), - width: 896, + width: wizardWidth, height: 570, closeOnEscape: false }); - var wizardDialogDiv = wizardDialog.closest('.ui-dialog'); - wizardDialogDiv.css('z-index', 5001); - - $('button.ui-dialog-titlebar-close').remove() - return wizardDialogDiv.overlay(); + return cloudStack.applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton(wizardDialog, 5001) }; instanceWizard(args); diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js index 078f7afa0e4e..2efba6694f68 100644 --- a/ui/scripts/ui-custom/zoneWizard.js +++ b/ui/scripts/ui-custom/zoneWizard.js @@ -1423,10 +1423,14 @@ showStep(1); + var wizardWidth = 850; + if($.browser.mozilla){ + wizardWidth = 750; + } var $dialog = $wizard.dialog({ title: _l('label.installWizard.addZone.title'), closeOnEscape: false, - width: 750, + width: wizardWidth, height: 665, resizable: false });