Fixed an issue where the error message does not have a close button on utility dialogs. Fixes #5670

This commit is contained in:
Yogesh Mahajan 
2020-08-07 17:17:51 +05:30
committed by Akshay Joshi
parent 9ad7476a34
commit 3672013ddc
11 changed files with 88 additions and 44 deletions

View File

@@ -172,18 +172,23 @@ define('pgadmin.browser', [
default: 500,
// If you change above values then make sure to update
// calc method logic
calc: () => {
calc: (passed_width) => {
let iw = window.innerWidth;
if (iw > pgAdmin.Browser.stdW.lg)
return pgAdmin.Browser.stdW.lg;
else if (iw > pgAdmin.Browser.stdW.md)
return pgAdmin.Browser.stdW.md;
else if (iw > pgAdmin.Browser.stdW.sm)
return pgAdmin.Browser.stdW.sm;
else
// if avilable screen resolution is still
// less then return the width value as it
return iw;
if(iw > passed_width){
return passed_width;
}else{
if (iw > pgAdmin.Browser.stdW.lg)
return pgAdmin.Browser.stdW.lg;
else if (iw > pgAdmin.Browser.stdW.md)
return pgAdmin.Browser.stdW.md;
else if (iw > pgAdmin.Browser.stdW.sm)
return pgAdmin.Browser.stdW.sm;
else
// if avilable screen resolution is still
// less then return the width value as it
return iw;
}
},
},
stdH: {
@@ -193,17 +198,21 @@ define('pgadmin.browser', [
default: 550,
// If you change above values then make sure to update
// calc method logic
calc: () => {
calc: (passed_height) => {
// We are excluding sm as it is too small for dialog
let ih = window.innerHeight;
if (ih > pgAdmin.Browser.stdH.lg)
return pgAdmin.Browser.stdH.lg;
else if (ih > pgAdmin.Browser.stdH.md)
return pgAdmin.Browser.stdH.md;
else
// if avilable screen resolution is still
// less then return the height value as it
return ih;
if (ih > passed_height){
return passed_height;
}else{
if (ih > pgAdmin.Browser.stdH.lg)
return pgAdmin.Browser.stdH.lg;
else if (ih > pgAdmin.Browser.stdH.md)
return pgAdmin.Browser.stdH.md;
else
// if avilable screen resolution is still
// less then return the height value as it
return ih;
}
},
},
// Default panels