123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPZSN00601" classname="SPZSN00501_직원공유팝업" inheritanceid="" position="absolute 0 0 900 900" titletext="직원공유" oninit="SPZSN00601_oninit" onload="SPZSN00601_onload" onbeforeclose="SPZSN00601_onbeforeclose">
- <Layouts>
- <Layout>
- <ActiveX id="atx_HwpCtrl" position="absolute 0 105 900 819" progid="{bd9c32de-3155-4691-8972-097d53b10052}" taborder="0"/>
- <Div id="div_noticeinfo" taborder="1" position="absolute 0 26 900 104">
- <Layouts>
- <Layout>
- <Edit id="edt_title" taborder="1" position="absolute 74 1 899 21" anchor="default" autoselect="true" imemode="hangul" style="font:Dotum,9,bold;"/>
- <Shape id="line7" class="line_2" position="absolute 1 20 899 26" anchor="default"/>
- <Static id="Static00" text="제목" class="cell_1" position="absolute 1 1 69 23" anchor="default"/>
- <Shape id="line00" class="line_2" position="absolute 1 43 899 49" anchor="default"/>
- <Static id="Static01" text="게시자" class="cell_1" position="absolute 1 24 69 46" anchor="default"/>
- <Shape id="line01" class="line_2" position="absolute 1 66 899 72" anchor="default"/>
- <Static id="Static02" text="게시판" class="cell_1" position="absolute 1 47 69 69" anchor="default"/>
- <Static id="Static03" text="게시일" class="cell_1" position="absolute 265 24 333 46" anchor="default"/>
- <Static id="stt_usernm" position="absolute 79 25 263 45" anchor="default" style="color:#0058c5ff;"/>
- <Calendar id="cal_fromdd" taborder="2" position="absolute 338 24 485 44" anchor="default" autoselect="true" dateformat="yyyy년 MM월 dd일 (ddd)" value="null" editformat="yyyy년 MM월 dd일"/>
- <Calendar id="cal_todd" taborder="5" position="absolute 338 47 485 67" anchor="default" autoselect="true" dateformat="yyyy년 MM월 dd일 (ddd)" value="null" editformat="yyyy년 MM월 dd일"/>
- <Static id="Static04" text="종료일" class="cell_1" position="absolute 265 47 333 69" anchor="default"/>
- <Shape id="line02" class="line_10" position="absolute 0 72 900 78" anchor="default"/>
- <Static id="stt_boardnm" position="absolute 79 48 263 68" anchor="default" style="font:Dotum,9,bold;"/>
- <Static id="stt_tempsave" text="임시저장중" position="absolute 496 25 596 45" style="color:red;font:Dotum,9,bold;" visible="false" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Div id="div_noticereadinfo" taborder="5" text="Div00" position="absolute 0 0 900 29">
- <Layouts>
- <Layout>
- <Static id="stt_seqno" position="absolute 79 4 143 24" anchor="default"/>
- <Static id="stt_readcnt" position="absolute 231 4 295 24" anchor="default"/>
- <Shape id="line7" class="line_2" position="absolute 1 23 900 29" anchor="default"/>
- <Static id="Static00" text="번호" class="cell_1" position="absolute 1 4 69 26" anchor="default"/>
- <Static id="Static01" text="조회" class="cell_1" position="absolute 153 4 221 26" anchor="default"/>
- <Shape id="line02" class="line_10" position="absolute 0 0 900 5" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_tempsave" taborder="6" text="임시저장" onclick="btn_tempsave_onclick" class="btn2" position="absolute 662 4 738 24" visible="false"/>
- <Button id="btn_edit" taborder="7" text="수정" onclick="btn_edit_onclick" class="btn5" position="absolute 796 4 846 24" visible="false"/>
- <Button id="btn_close" taborder="8" text="닫기" onclick="btn_close_onclick" class="btn3" position="absolute 850 4 900 24"/>
- <Button id="btn_del" taborder="9" text="삭제" position="absolute 743 4 793 24" class="btn5" visible="false" onclick="btn_del_onclick"/>
- <Button id="btn_save" taborder="13" text="게시" onclick="btn_save_onclick" class="btn5" position="absolute 741 4 793 24" visible="false"/>
- <Static id="Static05" text="첨부파일" class="cell_1" position="absolute 0 825 68 900" style="padding:5 0 0 8;align:left top;"/>
- <Grid id="grd_files" taborder="14" binddataset="ds_file" scrollpixel="all" useinputpanel="false" selecttype="multirow" oncellclick="grd_files_oncellclick" position="absolute 72 826 900 900" onmousewheel="grd_files_onmousewheel" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="531"/>
- <Column size="100"/>
- <Column size="30"/>
- <Column size="60"/>
- <Column size="60"/>
- </Columns>
- <Rows>
- <Row size="24"/>
- </Rows>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="text" style="padding:0 8 0 8;" text="bind:filename"/>
- <Cell col="2" colspan="2" taborder="undefined">
- <Cell displaytype="number" style="align:right middle;padding:0 0 0 0;" text="bind:filesize" expr="expr:Math.ceil(filesize / 1024)"/>
- <Cell col="1" displaytype="text" style="align:left middle;padding:0 0 0 0;" text="KB"/>
- </Cell>
- <Cell col="4" displaytype="expr:utlf_isNull(filekey) ? "normal" : "button"" edittype="expr:utlf_isNull(filekey) ? "none" : "button"" text="expr:utlf_isNull(filekey) ? "" : "미리보기""/>
- <Cell col="5" displaytype="expr:utlf_isNull(filekey) ? "normal" : "button"" edittype="expr:utlf_isNull(filekey) ? "none" : "button"" text="expr:utlf_isNull(filekey) ? "" : "파일받기""/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_file_add" taborder="15" text="추가" position="absolute 5 850 64 870" class="btn5" onclick="btn_file_add_onclick" visible="false"/>
- <Button id="btn_file_del" taborder="16" text="삭제" class="btn5" position="absolute 5 874 64 894" onclick="btn_file_del_onclick" visible="false"/>
- <Shape id="line02" class="line_10" position="absolute 0 820 900 826"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="genrno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_boardtype" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- <Column id="titleYn" type="STRING" size="256"/>
- <Column id="title" type="STRING" size="256"/>
- <Column id="popuptitle" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">공지사항</Col>
- <Col id="value">C1</Col>
- <Col id="titleYn">N</Col>
- <Col id="instcd"/>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">C2</Col>
- <Col id="label">지침게시물</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">Q1</Col>
- <Col id="label">질향상활동</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">Q2</Col>
- <Col id="label">지표관리활동</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">Q3</Col>
- <Col id="label">표준진료지침활동</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="label">교육자료</Col>
- <Col id="value">Q4</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="label">주의경보및정보제공</Col>
- <Col id="value">P1</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">P2</Col>
- <Col id="label">환자안전관리활동(KNUH)</Col>
- <Col id="titleYn">N</Col>
- <Col id="instcd">031</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="label">환자안전관리활동(KNUCH)</Col>
- <Col id="value">P2</Col>
- <Col id="titleYn">N</Col>
- <Col id="instcd">032</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">P3</Col>
- <Col id="label">환자안전교육</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">I1</Col>
- <Col id="label">감염관리활동</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="label">감염관리매뉴얼</Col>
- <Col id="value">I2</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- <Col id="instcd">031</Col>
- </Row>
- <Row>
- <Col id="label">감염관리지침</Col>
- <Col id="value">I2</Col>
- <Col id="titleYn">N</Col>
- <Col id="title">직원공유게시판</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="instcd">032</Col>
- </Row>
- <Row>
- <Col id="value">I3</Col>
- <Col id="label">교육자료</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">I4</Col>
- <Col id="label">지침게시물</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">I5</Col>
- <Col id="label">국내외감염병동향</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="label">환자∙보호자 교육자료</Col>
- <Col id="value">I6</Col>
- <Col id="titleYn">N</Col>
- <Col id="title">직원공유게시판</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="instcd">032</Col>
- </Row>
- <Row>
- <Col id="value">S1</Col>
- <Col id="label">직원안전활동</Col>
- <Col id="titleYn">N</Col>
- <Col id="popuptitle">직원공유</Col>
- <Col id="title">직원공유게시판</Col>
- </Row>
- <Row>
- <Col id="value">M1</Col>
- <Col id="label">공지사항</Col>
- <Col id="titleYn">Y</Col>
- <Col id="popuptitle">만족도조사</Col>
- <Col id="title">공지사항</Col>
- </Row>
- <Row>
- <Col id="value">M2</Col>
- <Col id="label">만족도조사 보고서</Col>
- <Col id="titleYn">Y</Col>
- <Col id="popuptitle">만족도조사</Col>
- <Col id="title">만족도조사 보고서</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_notice" firefirstcount="0" firenextcount="0" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="255"/>
- <Column id="genrdd" type="STRING" size="255"/>
- <Column id="genrno" type="BIGDECIMAL" size="255"/>
- <Column id="seqno" type="BIGDECIMAL" size="255"/>
- <Column id="boardtype" type="STRING" size="255"/>
- <Column id="userid" type="STRING" size="255"/>
- <Column id="usernm" type="STRING" size="255"/>
- <Column id="deptcd" type="STRING" size="255"/>
- <Column id="deptnm" type="STRING" size="255"/>
- <Column id="fromdd" type="STRING" size="255"/>
- <Column id="todd" type="STRING" size="255"/>
- <Column id="histstat" type="STRING" size="255"/>
- <Column id="title" type="STRING" size="255"/>
- <Column id="conts" type="STRING" size="255"/>
- <Column id="contstxt" type="STRING" size="255"/>
- <Column id="filekey" type="STRING" size="255"/>
- <Column id="hitcount" type="BIGDECIMAL" size="255"/>
- <Column id="edityn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filekey" type="STRING" size="256"/>
- <Column id="fileseq" type="STRING" size="256"/>
- <Column id="filename" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filepath" type="STRING" size="256" sumtext="파일서버경로"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filekey" type="STRING" size="256"/>
- <Column id="fileseq" type="STRING" size="256"/>
- <Column id="filename" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filepath" type="STRING" size="256" sumtext="파일서버경로"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_attfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filepath" type="STRING" size="256"/>
- <Column id="fullpath" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_result" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="count" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_filelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="attfilecnts" type="STRING" size="256" sumtext="첨부파일내용"/>
- <Column id="fullpath" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_save_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filekey" type="STRING" size="256"/>
- <Column id="fileseq" type="STRING" size="256"/>
- <Column id="filename" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filepath" type="STRING" size="256" sumtext="파일서버경로"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_delete_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filekey" type="STRING" size="256"/>
- <Column id="fileseq" type="STRING" size="256"/>
- <Column id="filename" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filepath" type="STRING" size="256" sumtext="파일서버경로"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="div_noticeinfo.edt_title" propid="value" datasetid="ds_notice" columnid="title"/>
- <BindItem id="item1" compid="div_noticeinfo.cal_fromdd" propid="value" datasetid="ds_notice" columnid="fromdd"/>
- <BindItem id="item2" compid="div_noticeinfo.cal_todd" propid="value" datasetid="ds_notice" columnid="todd"/>
- <BindItem id="item3" compid="div_noticereadinfo.stt_seqno" propid="text" datasetid="ds_notice" columnid="seqno"/>
- <BindItem id="item4" compid="div_noticereadinfo.stt_readcnt" propid="text" datasetid="ds_notice" columnid="hitcount"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
- var gMaxSize = 10485760;
- var gIsRefresh = false;
- function SPZSN00601_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SPZSN00601_onload(obj:Form, e:LoadEventInfo)
- {
- var boardtype = "Q1";
- var genrno = "-1";
-
- try {
- genrno = plgv_genrno;
- boardtype = plgv_boardtype;
- } catch(e) {}
-
- //글자 서식, 테이블, 이미지 툴만 show
- atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_FORMAT");
- atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_TABLE");
- atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_IMAGE");
-
- fInit(boardtype, genrno);
- }
- function fInit(sBoardtype, sGenrno) {
- if(fIsEditing()) { // 내용 작성한 것이 있을 때는 한번 물어본다
- if(sysf_messageBox("작성 중인 내용이 있습니다. 저장하지 않고 새로 여시겠습니까?", "Q") != 6) {
- return;
- }
- }
-
- if(sGenrno == -1) { // 새글
- gIsRefresh = true; // 창 닫을 때 메인 게시판 재조회
-
- div_noticeinfo.stt_usernm.text = sysf_getUserInfo("usernm") + " (" + sysf_getUserInfo("dutplcenm") + ")";
-
- fSetTitle(sBoardtype);
-
- ds_notice.clearData();
- ds_notice.addRow();
-
- ds_notice.setColumn(0, "status", "i");
- ds_notice.setColumn(0, "fromdd", utlf_getCurrentDate());
- ds_notice.setColumn(0, "todd", "99991231");
- ds_notice.setColumn(0, "boardtype", sBoardtype);
-
- fSetEditMode(true);
-
- atx_HwpCtrl.Clear(1);
-
- fInitHWP(true);
- } else {
- fInitHWP(false);
-
- ds_send.setColumn(0, "genrno", sGenrno);
-
- var oParam = {};
- oParam.id = "SPZSN00601";
- oParam.service = "noticeinfoapp.noticeinfo";
- oParam.method = "reqGetStaffShareNoticeDetail";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_notice=notice ds_file=files";
- oParam.async = true;
- oParam.callback = "cf_SPZSN00601";
- tranf_submit(oParam);
- }
- }
- function fSetTitle(sBoardtype) {
- var instcd = sysf_getUserInfo("dutplceinstcd");
-
- ds_boardtype.filter("(utlf_isNull(instcd) || instcd == " + instcd + ") && value == '" + sBoardtype + "'");
-
- var titleYn = ds_boardtype.getColumn(0, "titleYn");
- var title = ds_boardtype.getColumn(0, "popuptitle");
- var boardnm = ds_boardtype.getColumn(0, "label");
-
- if(titleYn == "Y") frmf_initTitle(this, title);
-
- div_noticeinfo.stt_boardnm.text = boardnm;
- this.titletext = this.titletext + " - " + boardnm;
- }
- function cf_SPZSN00601(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
-
- div_noticeinfo.stt_usernm.text = ds_notice.getColumn(0, "usernm") + " (" + ds_notice.getColumn(0, "deptnm") + ")";
-
- fSetTitle(ds_notice.getColumn(0, "boardtype"));
-
- ds_file.addColumn("filedata", "BLOB");
-
- ds_file.rowposition = -1;
-
- var conts = ds_notice.getColumn(0, "conts");
- if(utlf_isNull(conts)) {
- sysf_messageBox("내용 조회에 실패하였습니다", "E");
- } else {
- atx_HwpCtrl.SetTextFile(conts, "HWPML2X", "");
- atx_HwpCtrl.MovePos(2, null, 1); // 커서를 제일 앞으로 이동
- }
-
- fSetEditMode(false);
- }
- function fIsEditing() { // 현재 내용에 텍스트가 입력되어 있을 때
- return (fIsEditMode() && !utlf_isNull(atx_HwpCtrl.GetTextFile("TEXT", "")));
- }
- function fIsEditMode() { // 현재 EditMode 중일 때
- return (atx_HwpCtrl.EditMode == 0) ? false : true;
- }
- function fSetEditMode(enable) {
- atx_HwpCtrl.ShowToolBar(enable);
-
- if(enable) {
- atx_HwpCtrl.EditMode = 1;
-
- btn_edit.text = "취소";
-
- if(ds_notice.getColumn(0, "status") == "i") // 새 글 일때는 취소 버튼 안보이도록 함
- btn_edit.visible = false;
- else
- btn_edit.visible = true;
-
- btn_tempsave.visible = true;
- btn_del.visible = false;
- btn_save.visible = true;
- btn_file_add.visible = true;
- btn_file_del.visible = true;
-
- // 임시저장중일 때는 따로 표시
- if(ds_notice.getColumn(0, "histstat") == "N")
- div_noticeinfo.stt_tempsave.visible = true;
- else
- div_noticeinfo.stt_tempsave.visible = false;
-
- div_noticereadinfo.visible = false;
-
- div_noticeinfo.cal_fromdd.class = "";
- div_noticeinfo.cal_fromdd.readonly = false;
- div_noticeinfo.cal_todd.class = "";
- div_noticeinfo.cal_todd.readonly = false;
-
- div_noticeinfo.edt_title.class = "";
- div_noticeinfo.edt_title.readonly = false;
- div_noticeinfo.edt_title.setFocus();
- } else {
- // 내용도 원복
- ds_notice.reset();
- ds_file.reset();
- var conts = ds_notice.getColumn(0, "conts");
- atx_HwpCtrl.SetTextFile(conts, "HWPML2X", "");
-
- atx_HwpCtrl.EditMode = 0;
-
- btn_edit.text = "수정";
-
- // 자신이 올린 것은 수정 가능
- if(ds_notice.getColumn(0, "edityn") == "Y") {
- btn_edit.visible = true;
- btn_del.visible = true;
-
- if(ds_notice.getColumn(0, "histstat") == "N")
- div_noticeinfo.stt_tempsave.visible = true;
- else
- div_noticeinfo.stt_tempsave.visible = false;
- } else {
- btn_edit.visible = false;
- btn_del.visible = false;
-
- div_noticeinfo.stt_tempsave.visible = false;
- }
-
- btn_tempsave.visible = false;
- btn_save.visible = false;
- btn_file_add.visible = false;
- btn_file_del.visible = false;
-
- div_noticereadinfo.visible = true;
-
- div_noticeinfo.cal_fromdd.class = "cal_transbg";
- div_noticeinfo.cal_fromdd.readonly = true;
- div_noticeinfo.cal_todd.class = "cal_transbg";
- div_noticeinfo.cal_todd.readonly = true;
-
- div_noticeinfo.edt_title.class = "edt_transbg";
- div_noticeinfo.edt_title.readonly = true;
- }
- }
- function fInitHWP() {
- // atx_HwpCtrl.ShowToolBar(true);
- // //atx_HwpCtrl.ShowStatusBar(1);
- //
- // //글자 서식, 테이블, 이미지 툴만 show
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_MENU");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_STANDARD");
- // atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_FORMAT");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_DRAW");
- // atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_TABLE");
- // atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_IMAGE");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_NUMBERBULLET");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_HEADER_FOOTER");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_MASTERPAGE");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_NOTE");
- // //atx_HwpCtrl.SetToolBar(-1, "TOOLBAR_COMMENT");
-
- // 기본 글자체를 굴림으로
- var act = atx_HwpCtrl.CreateAction("CharShape");
- var set = act.CreateSet();
- act.GetDefault(set);
- set.SetItem("FaceNameHangul", "돋움");
- set.SetItem("FaceNameLatin", "돋움");
- set.SetItem("FaceNameHanja", "돋움");
- set.SetItem("FaceNameJapanese", "돋움");
- set.SetItem("FaceNameOther", "돋움");
- set.SetItem("FaceNameSymbol", "돋움");
- set.SetItem("FaceNameUser", "돋움");
- act.Execute(set); // 액션 실행
-
- // 페이지 여백 설정
- var act = atx_HwpCtrl.CreateAction("PageSetup");// 액션 생성
- var set = act.CreateSet();// parameter set 생성
-
- act.GetDefault(set);// parameter set 초기화
- set.setItem("ApplyTo", 3);
-
- var pset = set.CreateItemSet("PageDef","PageDef");
- var MARGIN = 1000;
-
- pset.SetItem("PaperWidth", 70000);
- pset.SetItem("PaperHeight", 70000);
- pset.SetItem("TopMargin", MARGIN);
- pset.SetItem("BottomMargin", MARGIN);
- pset.SetItem("LeftMargin", MARGIN);
- pset.SetItem("RightMargin", MARGIN);
- pset.SetItem("HeaderLen", 0);
- pset.SetItem("FooterLen", 0);
- pset.SetItem("GutterLen", 0);
- act.Execute(set);// 액션 실행
- }
- function btn_close_onclick(obj:Button, e:ClickEventInfo)
- {
- if(fIsEditing()) { // 내용 작성한 것이 있을 때는 한번 물어본다
- if(sysf_messageBox("작성 중인 내용이 있습니다. 저장하지 않고 창을 닫으시겠습니까?", "Q") == 6) {
- this.close();
- }
- } else {
- this.close();
- }
- }
- function btn_edit_onclick(obj:Button, e:ClickEventInfo)
- {
- if(fIsEditMode()) {
- fSetEditMode(false);
- } else {
- fSetEditMode(true);
- }
- }
- function btn_tempsave_onclick(obj:Button, e:ClickEventInfo)
- {
- fSaveHWP("N");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- fSaveHWP("Y");
- }
- function fSaveHWP(sHiststat) {
- // 입력값 체크
- if(utlf_isNull(ds_notice.getColumn(0, "title"))) {
- sysf_messageBox("제목을 입력하여 주십시오", "E");
- div_noticeinfo.edt_title.setFocus();
- return;
- }
- if(utlf_isNull(ds_notice.getColumn(0, "fromdd"))) {
- sysf_messageBox("게시일을 입력하여 주십시오", "E");
- div_noticeinfo.cal_fromdd.setFocus();
- return;
- }
- if(utlf_isNull(ds_notice.getColumn(0, "todd"))) {
- sysf_messageBox("종료일을 입력하여 주십시오", "E");
- div_noticeinfo.cal_todd.setFocus();
- return;
- }
- ds_notice.setColumn(0, "histstat", sHiststat);
- ds_notice.setColumn(0, "conts", atx_HwpCtrl.GetTextFile("HWPML2X", ""));
- ds_notice.setColumn(0, "contstxt", atx_HwpCtrl.GetTextFile("TEXT", ""));
-
- ds_save_file.clearData();
-
- if(ds_file.rowcount <= 0) {
- ds_notice.setColumn(0, "filekey", "");
- } else {
- ds_file.filter("utlf_isNull(filekey) == true");
- ds_save_file.copyData(ds_file, true);
- ds_file.filter("");
- }
-
- var oParam = {};
- oParam.id = "SPZSN00601";
- oParam.service = "noticeinfoapp.noticeinfo";
- oParam.method = "reqSetStaffShareNotice";
- oParam.inds = "req=ds_notice savefiles=ds_save_file deletefiles=ds_delete_file";
- oParam.outds = "ds_result=result ds_notice=notice ds_file=files";
- oParam.async = false;
- tranf_submit(oParam);
-
- if(ds_result.getColumn(0, "count") == -1) {
- sysf_messageBox("저장에 실패하였습니다", "E");
- return;
- }
-
- ds_file.addColumn("filedata", "BLOB");
-
- ds_delete_file.clearData();
-
- ds_file.rowposition = -1;
-
- // 임시저장중일 때는 따로 표시
- if(ds_notice.getColumn(0, "histstat") == "N")
- div_noticeinfo.stt_tempsave.visible = true;
- else
- div_noticeinfo.stt_tempsave.visible = false;
-
- fSetEditMode(false);
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- if(sysf_messageBox("삭제 하시겠습니까? (첨부파일까지 함께 삭제됩니다)", "Q") != 6)
- return;
- ds_notice.setColumn(0, "status", "d");
-
- if(ds_file.rowcount <= 0) {
- ds_notice.setColumn(0, "filekey", "");
- } else {
- ds_file.filter("utlf_isNull(filekey) == false");
- ds_delete_file.appendData(ds_file);
- ds_file.filter("");
- }
-
- var oParam = {};
- oParam.id = "SPZSN00601";
- oParam.service = "noticeinfoapp.noticeinfo";
- oParam.method = "reqSetStaffShareNotice";
- oParam.inds = "req=ds_notice deletefiles=ds_delete_file";
- oParam.outds = "ds_result=result";
- oParam.async = false;
- tranf_submit(oParam);
-
- if(ds_result.getColumn(0, "count") == -1) {
- sysf_messageBox("삭제 실패 하였습니다", "E");
- } else {
- sysf_messageBox("삭제 하였습니다", "I");
- gIsRefresh = true; // 창 닫을 때 메인 게시판 재조회
- this.close();
- }
- }
- function btn_file_add_onclick(obj:Button, e:ClickEventInfo)
- {
- fFileAdd();
- }
- function fFileAdd(colName) {
- //******파일을 첨부하기 위해 파일열기가 open 되게 한다.
- var oDsSaveFile = ds_file;
-
-
- //파일을 받아오기 위해 파일열기 팝업창을 띄운다.
- var fd = new FileDialog;
- var objVFileList = fd.open("첨부 할 파일을 선택하여 주십시오.", FileDialog.MULTILOAD);
-
- if(utlf_isNull(objVFileList)) return;
-
- ds_temp_file.clearData();
-
- for(var i = 0; i < objVFileList.length; i++) {
- var nRow = ds_temp_file.addRow();
-
- var objFileinfo = dsf_writeFileToDs(objVFileList[i], ds_temp_file, nRow, "filedata");
-
- if (!checkFileSize(objFileinfo.filesize)){
- sysf_messageBox(objFileinfo.filename + " 파일의 크기가 최대치(" + gMaxSize + "Byte)를 초과하여 첨부할 수 없습니다", "E");
- ds_temp_file.deleteRow(nRow);
- } else {
- ds_temp_file.setColumn(nRow, "filename", objFileinfo.filename);
- ds_temp_file.setColumn(nRow, "filesize", objFileinfo.filesize);
- ds_temp_file.setColumn(nRow, "filetype", objFileinfo.filetype);
- }
- }
-
- oDsSaveFile.appendData(ds_temp_file);
-
- grd_files.vscrollbar.pos = grd_files.vscrollbar.max;
-
- oDsSaveFile.rowposition = oDsSaveFile.rowcount - 1;
- }
- function checkFileSize(fileSize)
- {
- if (fileSize <= gMaxSize)
- return true;
- else
- return false;
- }
- function grd_files_onmousewheel(obj:Grid, e:MouseWheelEventInfo)
- {
- obj.vscrollbar.pos += ((e.amount < 0) ? 6 : -6);
- //obj.vscrollbar.pos = obj.vscrollbar.pos - e.amount;
-
- return true;
- }
- function btn_file_del_onclick(obj:Button, e:ClickEventInfo)
- {
- // 서버에 저장 되어 있는 것들을 지우기 위해 담아둠
- var selectedRows = grdf_getSelectedRows(grd_files);
-
- for(var i = selectedRows.length - 1; i >= 0; i--) {
- var currow = selectedRows[i];
-
- if(!utlf_isNull(ds_file.getColumn(currow, "filekey"))) {
- var nRow = ds_delete_file.addRow();
- ds_delete_file.copyRow(nRow, ds_file, currow);
- }
-
- ds_file.deleteRow(currow);
- }
- }
- function grd_files_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.col == 4) {
- fPreview(ds_file.getColumn(e.row, "filename"), ds_file.getColumn(e.row, "filepath"));
- } else if(e.col == 5) {
- fFileDown(ds_file.getColumn(e.row, "filename"), ds_file.getColumn(e.row, "filepath"));
- }
- }
- function fPreview(filenm, filepath) {
- if(utlf_isNull(filepath)) return;
-
- var temp_path = "C:\\temp2";
-
- var objActiveX = new ActiveX();
- var FSO = objActiveX.createObject("Scripting.FileSystemObject");
-
- objActiveX.destroy();
- objActiveX = null;
-
- // 객체 생성 실패하면 리턴
- if (FSO == null) return;
- // 시스템 드라이브가 없다면..
- if (FSO.DriveExists("C") == false) return;
- // 임시디렉토리가 없으면 생성
- if (FSO.FolderExists(temp_path) == false)
- folder = FSO.CreateFolder(temp_path);
-
- ds_attfile.setColumn(0, "filepath", filepath);
- ds_attfile.setColumn(0, "fullpath", temp_path + "\\" + filenm);
- //키값을 가지고 DB에 저장된 데이타를 조회하러 간다
- var oParam = {};
- oParam.id = "SPZSN00603";
- oParam.service = "noticeinfoapp.noticeinfo";
- oParam.method = "reqGetAttachFile";
- oParam.inds = "req=ds_attfile";
- oParam.outds = "ds_filelist=file";
- oParam.async = true;
- oParam.callback = "cf_SPZSN00603";
- tranf_submit(oParam);
- }
- function cf_SPZSN00603(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
-
- if(ds_filelist.rowcount > 0) {
- var fullpath = ds_filelist.getColumn(0, "fullpath");
-
- dsf_readFileFromDs(fullpath, ds_filelist, 0, "filecnts"); // 파일저장
-
- system.execShell("\"" + fullpath + "\"");
- }
- }
- function fFileDown(filenm, filepath) {
- if(utlf_isNull(filepath)) return;
-
- //파일을 다운로드 하기 위해 저장할 창을 띄움
- var fd = new FileDialog;
- var objVFileList = fd.open("다운 받을 위치를 선택하여 주십시오.", FileDialog.SAVE, "", filenm);
-
- if (objVFileList != null) {
- ds_attfile.setColumn(0, "filepath", filepath);
- ds_attfile.setColumn(0, "fullpath", objVFileList.fullpath);
- //키값을 가지고 DB에 저장된 데이타를 조회하러 간다
- var oParam = {};
- oParam.id = "SPZSN00602";
- oParam.service = "noticeinfoapp.noticeinfo";
- oParam.method = "reqGetAttachFile";
- oParam.inds = "req=ds_attfile";
- oParam.outds = "ds_filelist=file";
- oParam.async = true;
- oParam.callback = "cf_SPZSN00602";
- tranf_submit(oParam);
- }
- }
- function cf_SPZSN00602(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
-
- if(ds_filelist.rowcount > 0) {
- var fullpath = ds_filelist.getColumn(0, "fullpath");
-
- dsf_readFileFromDs(fullpath, ds_filelist, 0, "filecnts"); // 파일저장
-
- if(sysf_messageBox("파일을", "Q004") == "6")
- system.execShell("\"" + fullpath + "\"");
- }
- }
- function SPZSN00601_onbeforeclose(obj:Form, e:CloseEventInfo)
- {
- var mainObj = frmf_getMainViewer();
-
- if(!utlf_isNull(mainObj) && mainObj.frmf_getScreenID() == "SPZSN00600" && gIsRefresh) {
- mainObj.fRefresh();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|