123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786 |
- <?xml version="1.0" encoding="utf-8"?>
- <ADL version="1.1">
- <TypeDefinition url="default_typedef.xml"/>
- <GlobalVariables url="globalvars.xml"/>
- <Application id="himed2" codepage="utf-8" language="Korean" loginformurl="" loginformstyle="" windowopeneffect="" windowcloseeffect="" version="" themeid="XPKNU.xtheme" onload="application_onload" usewaitcursor="false" addcookietovariable="true" onerror="application_onerror" licenseurl="XPLATFORM_Client_License.xml" framemovetype="default" ondownloadactivex="application_ondownloadactivex" filesecurelevel="all" networksecurelevel="all" httpretry="0" httptimeout="1800" proxyretry="0" onexit="application_onexit" onbeforeexit="application_onbeforeexit" tracemode="append" engineversion="9.2.2.240" traceduration="14" engineurl="../install/TobeSoft/XPlatform_922240/XPLATFORM9.2.2_SetupEngine.exe" enginesetupkey="{E05CD7D8-28AF-4577-89AC-E4F1F8ABF046}" usesoftkeyboard="false">
- <Layout>
- <MainFrame id="mainframe" title="maintitle" defaultfont="" resizable="true" showtitlebar="true" showstatusbar="true" position="absolute 0 0 0 0" titletext="Ku2.0" showcascadestatustext="false" showcascadetitletext="false" layered="false" style="showzoomcombo:false;statusbarheight:0;" style.statusbarheight="" onsize="MainFrame_onsize" style.icon="" onactivate="MainFrame_onactivate" ondeactivate="MainFrame_ondeactivate">
- <VFrameSet id="VFrameSet" separatesize="120,*,23">
- <Frames>
- <ChildFrame id="ChildFrameTop" showtitlebar="false" formurl="com_hismainxp::form_top.xfdl" dragmovetype="none" style="statusbarheight:0;" openstatus="normal"/>
- <FrameSet id="FrameSet">
- <Frames>
- <ChildFrame id="ChildFrameWork" formurl="com_hismainxp::form_work.xfdl" dragmovetype="none" resizable="false" showtitlebar="false" openstatus="maximize"/>
- </Frames>
- </FrameSet>
- <ChildFrame id="ChildFrameBottom" showtitlebar="false" formurl="com_hismainxp::form_bottom.xfdl" dragmovetype="none" style="statusbarheight:0;"/>
- </Frames>
- </VFrameSet>
- </MainFrame>
- </Layout>
- <ScreenInfo/>
- <Style url="CSS::xpknu_theme.css"/>
- </Application>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : HIT
- * Job Name :
- * File Name : himed2.xadl
- * Creator :
- * Make Date : 2014-01-01
- *
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-01-01 임준호
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Global Variable
- //---------------------------------------------------------------------------------------
- //상단 프레임
- var agv_objAppTopPath = null;
- //업무화면을 관리하는 프레임셋
- var agv_objAppWorkPath = null;
- //하단 프레임
- var agv_objAppBottomPath = null;
- //시스템 에러 구분 application_onerror에서 사용
- var agv_bSystemError = false;
- //업무용 세션 변수
- var agv_objBizVariable = null;
- //업무용 변수(TF model attribute)
- var agv_objBizAttribute = null;
- //Cache Variable
- var agv_objCommonCache = new Object();
- //last transaction time(milli)
- var agv_nLastTransactionTime = 0;
- //var agv_sStartMemoryInfo = Math.round(system.getMemoryStatus("FreePhysical")/1000000)+"";
- //frmf_openForm 함수에서 인자값을 넘길때 사용(frmf_openForm) - frmf_getMainFormParam()에서 사용한다.
- var agv_objMainFormParam = null;
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.usessl : ssl 사용 여부
- * Description : ssl 설정
- ****************************************************************************************/
- function gf_useSSL(usessl)
- {
- if(system.osversion == "Windows XP") {
- gv_bUseSSL = false;
- usessl = false;
- }
-
- if (usessl){
- application.services["SVR"].url = gv_sURLprefixSSL+"/.lxp?";
- }else{
- application.services["SVR"].url = gv_sURLprefix+"/.lxp?";
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 로그인 화면 기동
- ****************************************************************************************/
- function gf_loginProcess()
- {
- var nMoniterIndex;
- var nScreenLeft;
- var nScreenTop;
- var nScreenRight;
- var nScreenBottom;
- var nScreenWidth;
- var nScreenHeight;
- var arrScreenSize;
-
- var monitorIndex = application.getPrivateProfile("gv_nMonitorIndex");
- if(lf_isNull(monitorIndex)) monitorIndex = 1;
-
- nMoniterIndex = monitorIndex;//system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
- //alert("login process="+nMoniterIndex);
- objScreenSize = system.getScreenRect(nMoniterIndex);
- nScreenLeft = objScreenSize.left;
- nScreenTop = objScreenSize.top;
- nScreenRight = objScreenSize.right;
- nScreenBottom = objScreenSize.bottom;
- nScreenWidth = nScreenRight - nScreenLeft;
- nScreenHeight = nScreenBottom - nScreenTop;
-
- // //로그인 창 나올때 작업표시줄 아이콘 표시를 위하여 mainframe 크기를 0으로 줄인다.
- // var nMainLeft = application.mainframe.position.left;
- // var nMainTop = application.mainframe.position.top;
- // var nMainWidth = application.mainframe.position.width;
- // var nMainHeight = application.mainframe.position.height;
- //
- application.mainframe.position.left = Math.ceil(nScreenLeft+(nScreenWidth/2));
- application.mainframe.position.top = Math.ceil(nScreenTop+(nScreenHeight/2));
- application.mainframe.position.width = 1; // 0 인 상태로는 titletext 값 변경이 안됨
- application.mainframe.position.height = 1;
- application.mainframe.visible = true;
-
- //application.mainframe.style.icon = "theme://images\\icon_titlebar.png";
-
- //로그인 화면 기동
- var left = nScreenLeft + (nScreenWidth / 2) - 217;
- var top = nScreenTop + (nScreenHeight / 2) - 353;
-
- // left, top 좌표가 원격 접속시 -로 발생하는 현상이 있는 것에 대한 처리
- if(left < 0) left = 423;
- if(top < 0) top = 140;
-
- var right = left + 434;
- var bottom = top + 353;
-
- var objFrame = new ChildFrame("Login", left, top, right, bottom);
- objFrame.showtitlebar = false;
- objFrame.titlebar.minbutton.enable = true;
- objFrame.titlebar.maxbutton.enable = false;
- objFrame.layered = true;
- objFrame.style.background = "transparent";
- objFrame.formurl = "com_hismainxp::form_login.xfdl";
- objFrame.style.icon = "IMG::" + gv_currentInstcd + ".png";
- var rtn = objFrame.showModal("Login", application.mainframe);
- if(rtn=="OK"){
- //로그인 창 나올때 mainframe를 원래 크기로 적용한다.
- gf_setFrameSize();
- // application.mainframe.position.left = nMainLeft;
- // application.mainframe.position.top = nMainTop;
- // application.mainframe.position.width = nMainWidth;
- // application.mainframe.position.height = nMainHeight;
-
- // application.mainframe.visible = true;
- // gf_setMenuType(gv_sMenuType);
- //
- // agv_objAppBottomPath.form.fSetBottomTexts();
- }else{
- gv_isCanLogout = true;
- exit();
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 메인 프레임 사이즈 및 위치 설정
- ****************************************************************************************/
- function gf_setFrameSize()
- {
- var nMoniterIndex;
- var nScreenLeft;
- var nScreenTop;
- var nScreenRight;
- var nScreenBottom;
- var nScreenWidth;
- var nScreenHeight;
- var arrScreenSize;
-
- var objExtCommon = new ExtCommon();
-
- var objExt = new ExtCommon();
- var IE_Gbn = objExt.regGetValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\Microsoft\\Internet Explorer\\", "Version", "S");
- gv_IE_Ver = IE_Gbn.substr(0,1);
-
-
- var nTaskBar = objExtCommon.getTaskBarPosition();
- var monitorIndex = application.getPrivateProfile("gv_nMonitorIndex");
- if(lf_isNull(monitorIndex)) monitorIndex = 1;
-
- nMoniterIndex = monitorIndex;//system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
- objScreenSize = system.getScreenRect(nMoniterIndex);
-
- nScreenLeft = objScreenSize.left;
- nScreenTop = objScreenSize.top;
- nScreenRight = objScreenSize.right;
- nScreenBottom = objScreenSize.bottom;
- nScreenWidth = nScreenRight - nScreenLeft;
- nScreenHeight = nScreenBottom - nScreenTop;
-
- application.mainframe.position.width = 1280;
- var nLeftCenter = nScreenLeft + ((nScreenWidth / 2) - (application.mainframe.position.width / 2));
-
- // tastbar의 x 위치가 마이너스로 나오는 경우에 대한 예외 처리
- if(nTaskBar[0] < 0) {
- nTaskBar[1] += nTaskBar[0]; // top
- nTaskBar[2] += nTaskBar[0]; // right
- nTaskBar[3] += nTaskBar[0]; // bottom
- nTaskBar[0] = 0; // left
- }
-
- // 작업 표시줄 사이즈만 따로 구하자
- var nTaskBarWidth = Math.abs(nTaskBar[2] - nTaskBar[0]);
- var nTaskBarHeight = Math.abs(nTaskBar[3] - nTaskBar[1]);
-
- var nTaskBarMoniterIndex = system.getMonitorIndex(nTaskBar[0], nTaskBar[1]); //모니터번호
- var objTaskBarScreenSize = system.getScreenRect(nTaskBarMoniterIndex);
-
- var nTaskBarScreenLeft = objTaskBarScreenSize.left;
- var nTaskBarScreenTop = objTaskBarScreenSize.top;
- var nTaskBarScreenRight = objTaskBarScreenSize.right;
- var nTaskBarScreenBottom = objTaskBarScreenSize.bottom;
- var nTaskBarScreenWidth = nTaskBarScreenRight - nTaskBarScreenLeft;
- var nTaskBarScreenHeight = nTaskBarScreenBottom - nTaskBarScreenTop;
-
- var nFixScreenLeft = 0;
- var nFixScreenTop = 0;
- var nFixScreenRight = 0;
- var nFixScreenBottom = 0;
- var nFixScreenWidth = 0;
- var nFixScreenHeight = 0;
- var nFixTaskBarWidth = 0;
- var nFixTaskBarHeight = 0;
-
-
- if((nMoniterIndex != nTaskBarMoniterIndex) && (system.osversion != "Windows 10")) {
- nFixScreenLeft = nScreenLeft;
- nFixScreenTop = nScreenTop;
- nFixScreenRight = nScreenRight;
- nFixScreenBottom = nScreenBottom;
- nFixScreenWidth = nScreenWidth;
- nFixScreenHeight = nScreenHeight;
- nFixTaskBarWidth = 0;
- nFixTaskBarHeight = 0;
- } else {
- nFixScreenLeft = nTaskBarScreenLeft;
- nFixScreenTop = nTaskBarScreenTop;
- nFixScreenRight = nTaskBarScreenRight;
- nFixScreenBottom = nTaskBarScreenBottom;
- nFixScreenWidth = nTaskBarScreenWidth;
- nFixScreenHeight = nTaskBarScreenHeight;
- nFixTaskBarWidth = nTaskBarWidth;
- nFixTaskBarHeight = nTaskBarHeight;
- }
-
- if(nTaskBar[0] == nTaskBarScreenLeft) {
- if(nTaskBar[1] == nTaskBarScreenTop) {
- if(nTaskBar[2] == nTaskBarScreenRight) { // 위쪽
- application.mainframe.position.height = nFixScreenHeight - nFixTaskBarHeight;
- application.mainframe.move(nLeftCenter, nFixScreenTop + nFixTaskBarHeight);
- } else { // 왼쪽
- application.mainframe.position.width = (nFixScreenWidth > 1280) ? 1280 : (nFixScreenWidth - nFixTaskBarWidth);
- application.mainframe.position.height = nFixScreenHeight;
- application.mainframe.move(nLeftCenter + nFixTaskBarWidth, nFixScreenTop);
- }
- } else { // 아래쪽
- application.mainframe.position.height = nFixScreenHeight - nFixTaskBarHeight;
- application.mainframe.move(nLeftCenter, nFixScreenTop);
- }
- } else if(nTaskBar[2] == nTaskBarScreenRight){ // 오른쪽
- application.mainframe.position.width = (nFixScreenWidth > 1280) ? 1280 : (nFixScreenWidth - nFixTaskBarWidth);
- application.mainframe.position.height = nFixScreenHeight;
- application.mainframe.move(nLeftCenter, nFixScreenTop);
- }
-
- if(application.mainframe.position.height <= 1) {
- application.mainframe.position.height = 984;
- application.mainframe.move(nLeftCenter, nScreenTop);
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 로그아웃 처리
- ****************************************************************************************/
- function gf_logout(){
-
- // 세션토큰 초기화
- gv_sSessionToken = "";
- gv_sSessionToken_ENC = "";
-
- // 세션변수 초기화
- agv_objBizVariable = new Object();
- agv_objBizAttribute = new Object();
-
- gds_userInfo.clear();
-
- //메인프레임의 최대화/최소화 상태를 normal 상태로 만든다.
- //최대화 상태일때 크기 조절이 안된다.
- application.mainframe.openstatus = "normal";
-
- gf_loginProcess();
- }
- /****************************************************************************************
- * Argument : 01.sMenuType : 메뉴타입
- * Description : 메뉴타입에 따라 상단프레임(TOP) height 조절
- ****************************************************************************************/
- function gf_setMenuType(sMenuType){
-
- var vfameset = application.mainframe.VFrameSet;
- //trace("menutype : "+ sMenuType);
-
- if (sMenuType == "01"){
- // 상단정보를 보이게 조정
- vfameset.separatesize = "120,*,23";
- }else{
- // 상단정보를 숨김
- vfameset.separatesize = "35,*,23";
- }
- }
- function gf_setUrl(inst){
- application.mainframe.style.icon = "";
- var loginSaveInst = "";
- if(gv_bLoginSaveinst){
- gv_LoginSavedInst = application.getPrivateProfile("gv_LoginSavedInst");
-
- loginSaveInst = gv_LoginSavedInst;
- } else {
- if(inst != null && inst != "" && inst != undefined)
- loginSaveInst = gv_LoginSavedInst = inst;
- }
-
- var urlTFArr = application.services["TFURL"].url;
-
- var xadlURLArr = application.xadl.split("/");
- if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
- {
- // 시스템 구분 미저장 시
- if(loginSaveInst == "") {
- if(xadlURLArr[2].indexOf("hisx031") != -1) { // 본원 접속
- loginSaveInst = "his031";
- }
- else if(xadlURLArr[2].indexOf("hisx032") != -1) { // 칠곡 접속
- loginSaveInst = "his032";
- }
- else if(xadlURLArr[2].indexOf("misx030") != -1) { // MIS 접속
- loginSaveInst = "mis030";
- }
- else if(xadlURLArr[2].indexOf("crmx030") != -1) { // CRM 접속
- loginSaveInst = "crm030";
- }
- else if(xadlURLArr[2].indexOf("hisx033") != -1) { // 치과 접속
- loginSaveInst = "his033";
- }
- else if(xadlURLArr[2].indexOf("misx033") != -1) { // MIS치과 접속
- loginSaveInst = "mis033";
- }
- }
- trace("loginSaveInst : " + loginSaveInst);
- var urlArr = application.services["SVR"].url.split("/");
-
- // 로컬서버
- if(xadlURLArr[2].indexOf("999dev") != -1){
- // if(loginSaveInst == "his031"){
- // urlArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
- // urlTFArr = "http://his031edu.knuh.kr/himed";
- // }else if(loginSaveInst == "his032"){
- // urlArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
- // urlTFArr = "http://his032edu.knuh.kr/himed";
- // }else if(loginSaveInst == "mis030"){
- // urlArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
- // urlTFArr = "http://mis030edu.knuh.kr/himed";
- // }
- gv_currentInstnm = "개인로컬";
- gv_bUseSSL = false;
- }
- // 교육서버
- else if(xadlURLArr[2].indexOf("edu") != -1){
- if(loginSaveInst == "his031"){
- urlArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his031edu.knuh.kr/himed";
- gv_currentInstnm = "본원교육";
- }else if(loginSaveInst == "his032"){
- urlArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his032edu.knuh.kr/himed";
- gv_currentInstnm = "칠곡교육";
- }else if(loginSaveInst == "mis030"){
- urlArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://mis030edu.knuh.kr/himed";
- gv_currentInstnm = "MIS교육";
- }else if(loginSaveInst == "crm030"){
- urlArr = "http://crmx030edu.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://crm030edu.knuh.kr/himed";
- gv_currentInstnm = "CRM교육";
- }else if(loginSaveInst == "his033"){
- urlArr = "http://hisx033edu.knudh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his033edu.knudh.kr/himed";
- gv_currentInstnm = "치과교육";
- }else if(loginSaveInst == "mis033"){
- urlArr = "http://misx033edu.knudh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://mis033edu.knudh.kr/himed";
- gv_currentInstnm = "MIS치과교육";
- }
-
- gv_bUseSSL = true;
- }
- // 운영서버
- else {
- if(loginSaveInst == "his031"){
- urlArr = "http://hisx031.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his031.knuh.kr/himed";
- gv_currentInstnm = "본원운영";
- }else if(loginSaveInst == "his032"){
- urlArr = "http://hisx032.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his032.knuh.kr/himed";
- gv_currentInstnm = "칠곡운영";
- }else if(loginSaveInst == "mis030"){
- urlArr = "http://misx030.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://mis030.knuh.kr/himed";
- gv_currentInstnm = "MIS운영";
- }else if(loginSaveInst == "crm030"){
- urlArr = "http://crmx030.knuh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://crm030.knuh.kr/himed";
- gv_currentInstnm = "CRM운영";
- }else if(loginSaveInst == "his033"){
- urlArr = "http://hisx033.knudh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://his033.knudh.kr/himed";
- gv_currentInstnm = "치과운영";
- }else if(loginSaveInst == "mis033"){
- urlArr = "http://misx033.knudh.kr:80/himed/.lxp?".split("/");
- urlTFArr = "http://mis033.knudh.kr/himed";
- gv_currentInstnm = "MIS치과운영";
- }
-
- gv_bUseSSL = true;
- }
-
- trace("urlArr : " + urlArr);
- trace("urlTFArr : " + urlTFArr);
- trace("gv_currentInstnm : " + gv_currentInstnm);
-
- var domainArr = urlArr[2].split(":");
- gv_sURLprefix = "http://"+urlArr[2]+"/"+urlArr[3];
- gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+urlArr[3];
- gv_sTFURLprefix = urlTFArr;
- gv_bIsPreview = false;
- gv_isCommonPopup = true; // 공통 마우스 우측 팝업 사용
- }
- else // 개발자 환경인 경우 (미리보기환경)
- {
- var serviceURLArr = application.services["SVR"].url.split("/");
- // if(loginSaveInst != ""){
- // if(loginSaveInst == "his031"){
- // serviceURLArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
- // }else if(loginSaveInst == "his032"){
- // serviceURLArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
- // }else if(loginSaveInst == "mis030"){
- // serviceURLArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
- // }
- // }
- gv_currentInstnm = "개인로컬";
-
- var localDomainArr = serviceURLArr[2].split(":");
- gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
- gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
- gv_sTFURLprefix = urlTFArr;
- gv_bIsPreview = true;
- gv_bUseSSL = false;
-
- application.mainframe.style.icon = "IMG::KU2_031.ico";
- }
- if(loginSaveInst == "his031"){
- gv_currentInstcd = "his031";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_031.ico";
- }else if(loginSaveInst == "his032"){
- gv_currentInstcd = "his032";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_032.ico";
- }else if(loginSaveInst == "mis030"){
- gv_currentInstcd = "mis030";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_030.ico";
- }else if(loginSaveInst == "crm030"){
- gv_currentInstcd = "crm030";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_CRM030.ico";
- }else if(loginSaveInst == "his033"){
- gv_currentInstcd = "his033";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_033.ico";
- }else if(loginSaveInst == "mis033"){
- gv_currentInstcd = "mis033";
- gv_LoginSavedInst = loginSaveInst;
- application.mainframe.style.icon = "IMG::KU2_MIS033.ico";
- }
-
- // 접속시스템에 따라 타이틀바 아이콘 표시
- var objTitlebar = application.mainframe.titlebar;
- var oIv = objTitlebar.components["ivIcon"];
- if(lf_isNull(oIv)) {
- oIv = new ImageViewer();
- oIv.init("ivIcon", -1, -1, 27, 25);
- oIv.style.background = "#262d39ff";
- oIv.style.border = "0 none transparent";
- oIv.style.bordertype = "normal 0 0";
- oIv.style.padding = "2 0 0 0";
- oIv.imagealign = "right top";
- objTitlebar.addChild(oIv.name, oIv);
- oIv.show();
- }
-
- oIv.image = "";
- oIv.image = "IMG::" + gv_currentInstcd + ".png";
-
- //gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
- gf_useSSL(gv_bUseSSL);
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components :
- * Components ID :
- * Event : onload
- * Argument : 01.obj : Object
- * : 02.e : LoadEventInfo
- * Description :
- ****************************************************************************************/
- function application_onload(obj:Object, e:LoadEventInfo)
- {
- agv_objAppTopPath = mainframe.VFrameSet.ChildFrameTop; // 상단정보
- agv_objAppWorkPath = mainframe.VFrameSet.FrameSet.ChildFrameWork; // 업무화면
- agv_objAppBottomPath = mainframe.VFrameSet.ChildFrameBottom; // 하단정보
- //업무용 세션 변수 초기화
- agv_objBizVariable = new Object();
- agv_objBizAttribute = new Object();
-
- gv_isCDW = false;
-
- // 익스플로어에서 url로 접속한 경우 (TFSmartUpdate 실행 안해도 되도록 설정)
- if(!lf_isNull(JSESSIONID)) {
- gv_bFromWeb = "Y";
- }
-
- gf_setUrl();
- //gf_setFrameSize();
- gf_loginProcess();
- }
- /****************************************************************************************
- * Components : application
- * Components ID :
- * Event : onerror
- * Argument : 01.obj : Object
- * : 02.e : ErrorEventInfo
- * Description :
- ****************************************************************************************/
- function application_onerror(obj:Object, e:ErrorEventInfo){
-
- agv_bSystemError = true;
-
- //트랜잭션시 ESC키로 종료막음. - tobesoft 2014.03.17
- if(e.errorcode == "-2147418039"){ //ESC키가 눌렸을때
- //return true;
- }
-
- //임시 오류 확인용
- //alert(e.errorcode+"\n"+e.errormsg);
- }
- /****************************************************************************************
- * Components : application
- * Components ID :
- * Event : ondownloadactivex
- * Argument : 01.obj : Object
- * : 02.e : LoadEventInfo
- * Description : 엑티브 엑스 다운로드 alert 방지용
- ****************************************************************************************/
- function application_ondownloadactivex(obj:Object, e:LoadEventInfo){
- //지우면 안됨.
- }
- /****************************************************************************************
- * Components : MainFrame
- * Components ID : mainframe
- * Event : onsize
- * Argument : 01.obj : MainFrame
- * : 02.e : SizeEventInfo
- * Description : 메인프레임 리사이즈
- ****************************************************************************************/
- function MainFrame_onsize(obj:MainFrame, e:SizeEventInfo){
-
- // if(gv_sSessionToken != ""){
- // if(e.cx<=1280){
- // obj.position.width = 1280;
- // return;
- // }
- // }
- }
- /****************************************************************************************
- * Components : application
- * Components ID : application
- * Event : onexit
- * Argument : 01.obj : Object
- * : 02.e : ExitEventInfo
- * Description : 메인프레임 닫기
- ****************************************************************************************/
- function application_onexit(obj:Object, e:ExitEventInfo){
-
- }
- function application_onbeforeexit(obj:Object, e:ExitEventInfo)
- {
- var isCDW = false;
- try {
- isCDW = gv_isCDW;
- } catch(e) {
- }
-
- if(isCDW == "false" || !isCDW) {
- // 메모 저장 안되는 현상이 있어서 강제로 포커스 날림
- agv_objAppWorkPath.form.div_menu_group.div_left_memo.ta_memo.onkillfocus.fireEvent(agv_objAppWorkPath.form.div_menu_group.div_left_memo.ta_memo, new KillFocusEventInfo());
- }
-
- if(gv_isCanLogout == true) {
- // XPlatform Process가 남아있는 현상이 있어서 종료시 Process 강제 킬하도록 함 (2017.07.29 smkim)
- var extCommonApi = new ExtCommon();
- var nProcessId = extCommonApi.getCurrentProcessId();
- extCommonApi.killProcessById(nProcessId);
-
- return true;
- }
-
- // 작업표시줄에서 X 클릭시 메인창이 위로 올라오고 메시지팝업이 뜨도록 수정
- application.mainframe.activate();
-
- try {
- agv_objAppWorkPath.form.frmf_loadingbarTrace(3);
- } catch(e) {}
-
- if(lf_messageBox("Ku2.0 을 종료하시겠습니까?") != 6) {
- return false;
- }
-
- agv_objAppTopPath.form.lf_logout(true);
-
- return false;
- }
- function lf_findPopup(sPopupId){
- var objForm = application.popupframes[sPopupId];
- if(!lf_isNull(objForm)) objForm = application.popupframes[sPopupId].form;
-
- return objForm;
- }
- function lf_isNull(sValue)
- {
- if( ("x"+sValue == "xNaN") && ( new String(sValue.length).valueOf() == "undefined")) return true;
-
- if (sValue == null) return true;
-
- var v_ChkStr = new String(sValue);
- if (v_ChkStr == null) return true;
- if (v_ChkStr.toString().length == 0 ) return true;
- return false;
- }
- function lf_messageBox(pMessage) {
- var nMoniterIndex = system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
- var objScreenInfo = system.getScreenRect(nMoniterIndex);
- var nScreenLeft = objScreenInfo.left;
- var nScreenTop = objScreenInfo.top;
- var nScreenRight = objScreenInfo.right;
- var nScreenBottom = objScreenInfo.bottom;
- var nScreenWidth = nScreenRight - nScreenLeft;
- var nScreenHeight = nScreenBottom - nScreenTop;
-
- var objMsgSize = lf_getConfirmMsgSize(pMessage);
-
- var nWidth = 374;
- var nHeight = 131;
- var nWidthGap = 0;
- var nHeightGap = 0;
- if(objMsgSize.width > 278){
- nWidth = nWidth + (objMsgSize.width-278);
- nWidthGap = (objMsgSize.width-278)/2;
- }
- if(objMsgSize.height > 20){
- nHeight = nHeight + (objMsgSize.height-20);
- nHeightGap = (objMsgSize.height-20);
- }
-
- var nLeft = (nScreenLeft+(nScreenWidth/2))-(nWidth/2);
- var nTop = (nScreenTop+(nScreenHeight/2))-(nHeight/2);
-
- var newChild = new ChildFrame();
- newChild.showtitlebar = false;
- newChild.autosize = false;
- //newChild.layered = true;
- newChild.resizable = false;
- newChild.init("SPZUM00500", nLeft, nTop, nLeft+nWidth, nTop+nHeight);
- newChild.formurl = "com_hismainxp::form_confirm.xfdl";
- newChild.openalign = "center middle";
-
- var objArgs = new Object();
- objArgs.plgv_pMessage = pMessage;
- objArgs.plgv_sttWidth = objMsgSize.width;
- objArgs.plgv_sttHeight = objMsgSize.height;
- objArgs.plgv_nWidthGap = nWidthGap;
- objArgs.plgv_nHeightGap = nHeightGap;
- objArgs.plgv_msgTitle = "확인";
- objArgs.plgv_msgBoxType = "Q";
-
- return newChild.showModal("SPZUM00500", this, objArgs, this, "lock=all");
- }
-
- function lf_getConfirmMsgSize(sMsg){
-
- var objExtCommon = new ExtCommon();
-
- var arrMsg = sMsg.split("\n");
- var nRowCnt = arrMsg.length;
-
- var nMaxWidth = 0;
- var nHeigth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), sMsg)[0];
- if(nRowCnt == 1){
- nMaxWidth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), sMsg)[1];
- }else{
- for(var i in arrMsg){
- var nCurrWidth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), arrMsg[i])[1];
- if(nCurrWidth > nMaxWidth){
- nMaxWidth = nCurrWidth;
- }
- }
- }
-
- var objMsgSize = new Object();
- objMsgSize.width = nMaxWidth+1;
- objMsgSize.height = nHeigth*nRowCnt;
-
- return objMsgSize;
- }
-
- function MainFrame_onactivate(obj:MainFrame, e:ActivateEventInfo)
- {
- var objTitlebar = application.mainframe.titlebar;
- var oIv = objTitlebar.components["ivIcon"];
- if(!lf_isNull(oIv)) {
- oIv.style.background = "#262d39ff";
- }
- }
- function MainFrame_ondeactivate(obj:MainFrame, e:ActivateEventInfo)
- {
- var objTitlebar = application.mainframe.titlebar;
- var oIv = objTitlebar.components["ivIcon"];
- if(!lf_isNull(oIv)) {
- oIv.style.background = "#5d626bff";
- }
- }
- ]]></Script>
- </ADL>
|