rafaelweingartner closed pull request #2786: Fix alert message in VM creation wizard URL: https://github.com/apache/cloudstack/pull/2786
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 5b602c271fb..78f4c61b310 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -1045,11 +1045,9 @@ } }] }); - - $('button.ui-dialog-titlebar-close').remove(); - return cloudStack.applyDefaultZindexOnJqueryDialog($dialog); + + return cloudStack.applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton($dialog, 5001); } - return false; } }; diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js index 895800cbfc4..ec2ecda6d7a 100644 --- a/ui/scripts/ui/utils.js +++ b/ui/scripts/ui/utils.js @@ -146,22 +146,17 @@ }); }; - var applyZindexOnJqueryDialog = function($dialog){ + var applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton = function($dialog, customZindex){ + var defaultZindex = 5000; + if(!customZindex){ + customZindex = defaultZindex; + } + $('button.ui-dialog-titlebar-close').remove() + var $dialogDiv = $dialog.closest('.ui-dialog'); - $dialogDiv.css('z-index', 5000); - return $dialogDiv; - }; - cloudStack.applyDefaultZindexOnJqueryDialog = applyZindexOnJqueryDialog; - - var applyZindexAndOverlayOnJqueryDialog = function($dialog){ - var $dialogDiv = applyZindexOnJqueryDialog($dialog); + $dialogDiv.css('z-index', customZindex); + return $dialogDiv.overlay(); }; - cloudStack.applyDefaultZindexAndOverlayOnJqueryDialog = applyZindexAndOverlayOnJqueryDialog; - - var applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton = function($dialog){ - $('button.ui-dialog-titlebar-close').remove() - return applyZindexAndOverlayOnJqueryDialog($dialog) - }; cloudStack.applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton = applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton; })(jQuery, cloudStack); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services