mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Added spacing for message and loading spinner.
2) Rename the GrantWizard Dialog. 3) Return the activeStep from disableNextStep function.
This commit is contained in:
parent
9754b0fe14
commit
02b83146be
@ -34,6 +34,9 @@ const useStyles = makeStyles((theme)=>({
|
|||||||
},
|
},
|
||||||
loader: {
|
loader: {
|
||||||
color: theme.otherVars.loader.color,
|
color: theme.otherVars.loader.color,
|
||||||
|
},
|
||||||
|
message: {
|
||||||
|
marginLeft: '0.5rem',
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -46,7 +49,7 @@ export default function Loader({message}) {
|
|||||||
<Box className={classes.root}>
|
<Box className={classes.root}>
|
||||||
<Box className={classes.loaderRoot}>
|
<Box className={classes.loaderRoot}>
|
||||||
<CircularProgress className={classes.loader} />
|
<CircularProgress className={classes.loader} />
|
||||||
<Typography>{message}</Typography>
|
<Typography className={classes.message}>{message}</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -136,7 +136,7 @@ function Wizard({ stepList, onStepChange, onSave, className, ...props }) {
|
|||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (props.disableNextStep) {
|
if (props.disableNextStep) {
|
||||||
setdisableNext(props.disableNextStep());
|
setdisableNext(props.disableNextStep(activeStep));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,9 +17,7 @@ const useStyles = makeStyles(() =>
|
|||||||
stepPanel: {
|
stepPanel: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
// paddingLeft: '2em',
|
|
||||||
minHeight: '100px',
|
minHeight: '100px',
|
||||||
// paddingTop: '1em',
|
|
||||||
paddingBottom: '1em',
|
paddingBottom: '1em',
|
||||||
paddingRight: '1em',
|
paddingRight: '1em',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
|
@ -135,7 +135,7 @@ export default function GrantWizard({ sid, did, nodeInfo, nodeData }) {
|
|||||||
isVisible: false
|
isVisible: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
var steps = ['Object Selection', 'Privilege Selection', 'Review Selection'];
|
var steps = ['Object Selection', 'Privilege Selection', 'Review'];
|
||||||
const [selectedObject, setSelectedObject] = React.useState([]);
|
const [selectedObject, setSelectedObject] = React.useState([]);
|
||||||
const [selectedAcl, setSelectedAcl] = React.useState({});
|
const [selectedAcl, setSelectedAcl] = React.useState({});
|
||||||
const [msqlData, setSQL] = React.useState('');
|
const [msqlData, setSQL] = React.useState('');
|
||||||
|
@ -81,8 +81,8 @@ define([
|
|||||||
start_grant_wizard: function() {
|
start_grant_wizard: function() {
|
||||||
|
|
||||||
// Declare Wizard dialog
|
// Declare Wizard dialog
|
||||||
if (!Alertify.wizardDialog) {
|
if (!Alertify.grantWizardDialog) {
|
||||||
Alertify.dialog('wizardDialog', function factory() {
|
Alertify.dialog('grantWizardDialog', function factory() {
|
||||||
|
|
||||||
// Generate wizard main container
|
// Generate wizard main container
|
||||||
var $container = $('<div class=\'wizard_dlg\' id=\'grantWizardDlg\'></div>');
|
var $container = $('<div class=\'wizard_dlg\' id=\'grantWizardDlg\'></div>');
|
||||||
@ -122,10 +122,10 @@ define([
|
|||||||
<GrantWizard sid={sid} did={did} nodeInfo={info} nodeData={d} />
|
<GrantWizard sid={sid} did={did} nodeInfo={info} nodeData={d} />
|
||||||
</Theme>,
|
</Theme>,
|
||||||
document.getElementById('grantWizardDlg'));
|
document.getElementById('grantWizardDlg'));
|
||||||
Alertify.wizardDialog().elements.modal.style.maxHeight=0;
|
Alertify.grantWizardDialog().elements.modal.style.maxHeight=0;
|
||||||
Alertify.wizardDialog().elements.modal.style.maxWidth='none';
|
Alertify.grantWizardDialog().elements.modal.style.maxWidth='none';
|
||||||
Alertify.wizardDialog().elements.modal.style.overflow='visible';
|
Alertify.grantWizardDialog().elements.modal.style.overflow='visible';
|
||||||
Alertify.wizardDialog().elements.dimmer.style.display='none';
|
Alertify.grantWizardDialog().elements.dimmer.style.display='none';
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ define([
|
|||||||
// Clear the view and remove the react component.
|
// Clear the view and remove the react component.
|
||||||
return setTimeout((function () {
|
return setTimeout((function () {
|
||||||
ReactDOM.unmountComponentAtNode(document.getElementById('grantWizardDlg'));
|
ReactDOM.unmountComponentAtNode(document.getElementById('grantWizardDlg'));
|
||||||
return Alertify.wizardDialog().destroy();
|
return Alertify.grantWizardDialog().destroy();
|
||||||
}), 500);
|
}), 500);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -147,12 +147,12 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Call Grant Wizard Dialog and set dimensions for wizard
|
// Call Grant Wizard Dialog and set dimensions for wizard
|
||||||
Alertify.wizardDialog('').set({
|
Alertify.grantWizardDialog('').set({
|
||||||
onmaximize:function(){
|
onmaximize:function(){
|
||||||
Alertify.wizardDialog().elements.modal.style.maxHeight='initial';
|
Alertify.grantWizardDialog().elements.modal.style.maxHeight='initial';
|
||||||
},
|
},
|
||||||
onrestore:function(){
|
onrestore:function(){
|
||||||
Alertify.wizardDialog().elements.modal.style.maxHeight=0;
|
Alertify.grantWizardDialog().elements.modal.style.maxHeight=0;
|
||||||
},
|
},
|
||||||
}).resizeTo(pgBrowser.stdW.lg, pgBrowser.stdH.lg);
|
}).resizeTo(pgBrowser.stdW.lg, pgBrowser.stdH.lg);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user