diff --git a/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx b/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx index d9f4915..bd57628 100644 --- a/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx +++ b/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx @@ -67,7 +67,6 @@ function AttachFile(props) { //기존 server에 upload된 file인 props.serverFiles file들을 렌더링 초기에 넣어 놓기 useEffect(function () { - if( !props.serverFiles ) { return; @@ -79,7 +78,8 @@ function AttachFile(props) { props.serverFiles[idx].index=nNewIndex++; items.push( props.serverFiles[idx] ); } - setFileItem(items); + setFileItem(items); + props.setFiles(items); // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.serverFiles]); diff --git a/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx b/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx index 8fc6842..66c9008 100644 --- a/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx +++ b/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx @@ -9,11 +9,9 @@ import { FileUploader } from "react-drag-drop-files"; */ function FileDragDrop({fileTypes, children, multiple, label, onDrop, handleChange, file, setFile, dropMessageStyle, name, maxSize, disabled}) { - const temp = 0; - return ( ({ + backDrop: { + backdropFilter: "blur(3px)", + backgroundColor:'rgba(0,0,30,0.4)' + }, +})); + +function SimpleDialog(props) { + + const { open } = props; + const classes = useStyles(); + + return ( + + + + + + + + ); +} + +SimpleDialog.propTypes = { + open: PropTypes.bool.isRequired, +}; + +export default function LoadingProgress({open, setOpen}) { + + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx index 953f5a9..4917e2c 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx @@ -5,6 +5,8 @@ import LinearProgress from '@mui/material/LinearProgress'; import AttachFile from "../../../../components/file/AttachFile"; import RichTextEditor from "../../../../components/editor/RichTextEditor"; import AlertDialogSlide from "../../../../components/alert/AlertDialogSlide"; +import LoadingProgress from "../../../../components/progress/LoadingProgress"; + import CODE from 'constants/code'; @@ -20,8 +22,7 @@ const StyledDiv = styled.div` .board_view2 { margin-bottom: 30px; dl.file-attach-wrapper dd { - padding: 0px; - + padding: 14px; .file_attach { width: 100%; @@ -183,12 +184,14 @@ function PopupEditor(props) { } const requestTask = (callbackParams) => { + setOpenLoadingProgress(true); EgovNet.requestFetch(callbackParams.requestUrl, requestOptions, (resp) => { + setOpenLoadingProgress(false); if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) { if (modeInfo.mode === CODE.MODE_MODIFY) { - alert("게시글이 수정 되었습니다."); + //alert("게시글이 수정 되었습니다."); } navigate({ pathname: URL.ADMIN__CONTENTS__POP_UP }); } else { @@ -295,12 +298,10 @@ function PopupEditor(props) { const [serverFiles, setServerFiles] = useState(); const [files, setFiles] = useState(); - /* - let files = null; - const setFiles = (myFiles) => { - files = myFiles; - }; - */ + + + + const [openLoadingProgress, setOpenLoadingProgress] = React.useState(false); const Location = React.memo(function Location() { @@ -427,6 +428,7 @@ function PopupEditor(props) { {/* */} + {/* */}