diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index 71f3285d2..ca8ed1f4b 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -445,6 +445,7 @@ function SchemaDialogView({ const isNew = schema.isNew(schema.origData); const checkIsMounted = useIsMounted(); const preFormReadyQueue = useRef([]); + const Notifier = props.Notifier || Notify; const depListenerObj = useRef(new DepListener()); /* The session data */ @@ -578,7 +579,7 @@ function SchemaDialogView({ }; /* Confirm before reset */ if(props.confirmOnCloseReset) { - Notify.confirm( + Notifier.confirm( gettext('Warning'), gettext('Changes will be lost. Are you sure you want to reset?'), resetIt, @@ -605,7 +606,7 @@ function SchemaDialogView({ changeData[schema.idAttribute] = schema.origData[schema.idAttribute]; } if (schema.warningText) { - Notify.confirm( + Notifier.confirm( gettext('Warning'), schema.warningText, ()=> { @@ -626,7 +627,7 @@ function SchemaDialogView({ props.onSave(isNew, changeData) .then(()=>{ if(schema.informText) { - Notify.alert( + Notifier.alert( gettext('Warning'), schema.informText, ); @@ -785,6 +786,7 @@ SchemaDialogView.propTypes = { customSaveBtnName: PropTypes.string, customSaveBtnIconType: PropTypes.string, formClassName: CustomPropTypes.className, + Notifier: PropTypes.object, }; const usePropsStyles = makeStyles((theme)=>({ diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx index bfcf872ef..bfecf7535 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx @@ -249,6 +249,7 @@ export default function NewConnectionDialog({onClose, onSave}) { disableDialogHelp={true} isTabView={false} formClassName={classes.root} + Notifier={queryToolCtx.modal} />; } diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx index f766ff927..3e4041d4c 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx @@ -338,7 +338,7 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) { }); }; const onHelpClick=()=>{ - let url = url_for('help.static', {'filename': 'query_tool.html'}); + let url = url_for('help.static', {'filename': queryToolCtx.params.is_query_tool ? 'query_tool.html' : 'editgrid.html'}); window.open(url, 'pgadmin_help'); }; const confirmDiscard=(callback)=>{