123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508 |
- <?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="" tracemode="" 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" engineurl="../install/TobeSoft/XPlatform/" engineversion="9.2.0.300" httpretry="0" httptimeout="1800" proxyretry="0" onexit="application_onexit">
- <Layout>
- <MainFrame id="mainframe" title="maintitle" defaultfont="" resizable="true" showtitlebar="true" showstatusbar="true" position="absolute 0 0 1280 1024" titletext="Himed" showcascadestatustext="false" showcascadetitletext="false" layered="false" style="showzoomcombo:false;statusbarheight:0;" style.statusbarheight="" onsize="MainFrame_onsize" style.icon="">
- <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::default.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;
- //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 (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;
-
- nMoniterIndex = 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 =0;
- application.mainframe.position.height = 0;
- application.mainframe.visible = true;
- //application.mainframe.style.icon = "theme://images\\icon_titlebar.png";
-
- //trace("==================="+application.popupframes["Login"]);
-
- //로그인 화면 기동
- //application.mainframe.visible = false;
- //var objFrame = new ChildFrame("Login", nScreenLeft+(nScreenWidth/2)-235, nScreenTop+(nScreenHeight/2)-130, nScreenLeft+(nScreenWidth/2)+235, nScreenTop+(nScreenHeight/2)+130);
- var objFrame = new ChildFrame("Login", nScreenLeft+(nScreenWidth/2)-174, nScreenTop+(nScreenHeight/2)-365, nScreenLeft+(nScreenWidth/2)+174, nScreenTop+(nScreenHeight/2)+365);
-
- //objFrame.openalign.halign = "center";
- //objFrame.openalign.valign = "center";
- objFrame.showtitlebar = false;
- //objFrame.autosize = true;
- objFrame.layered = true;
- objFrame.style.background = "transparent";
- objFrame.formurl = "com_hismainxp::form_login.xfdl";
-
- //var rtn = objFrame.showModal("Login");
- var rtn = objFrame.showModal("Login", application.mainframe);
- // trace("==============================================="+rtn);
- // trace(this);
- // trace("=================================");
- // trace("login result : "+ rtn);
- // trace("=================================");
- //objFrame.destroy();
- //objFrame = null;
-
- if(rtn=="OK"){
-
- //로그인 창 나올때 mainframe를 원래 크기로 적용한다.
- application.mainframe.position.left = nMainLeft;
- application.mainframe.position.top = nMainTop;
- application.mainframe.position.width = nMainWidth;
- application.mainframe.position.height = nMainHeight;
-
-
- application.mainframe.visible = true;
- //agv_objAppTopPath.form.setMenuType(gv_sMenuType);
- gf_setMenuType(gv_sMenuType);
-
-
-
-
- }else{
- 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 nTaskBar = objExtCommon.getTaskBarPosition();
-
- nMoniterIndex = 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;
-
- var nLeftCenter = nScreenLeft+((nScreenWidth/2)-(application.mainframe.position.width/2));
-
- if(nTaskBar[0] >= nScreenLeft && nTaskBar[0] < (nScreenLeft + nScreenWidth)){
- if(nTaskBar[0] == nScreenLeft && nTaskBar[1] > nScreenLeft){
- application.mainframe.position.height = nScreenHeight - (nScreenHeight - nTaskBar[1]);
- application.mainframe.move(nLeftCenter, nScreenTop);
- }else if(nTaskBar[0] == nScreenLeft && nTaskBar[1] == nScreenLeft && nTaskBar[2] < nScreenWidth){
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter+nTaskBar[2], nScreenTop);
- }else if(nTaskBar[0] > nScreenLeft && nTaskBar[1] == nScreenLeft){
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter, nScreenTop);
- }else if(nTaskBar[0] == nScreenLeft && nTaskBar[1] == nScreenLeft && nTaskBar[3] < nScreenHeight){
- application.mainframe.position.height = nScreenHeight - nTaskBar[3];
- application.mainframe.move(nLeftCenter, nScreenTop+nTaskBar[3]);
- }
- }else{
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter, nScreenTop);
- }
-
- /*
- if(nTaskBar[0] == 0 && nTaskBar[1] > 0){
- //alert("Main Monitor Bottom TaskBar::" + (nScreenHeight-nTaskBar[1]));
- application.mainframe.position.height = nScreenHeight - (nScreenHeight - nTaskBar[1]);
- application.mainframe.move(nScreenLeft, nScreenTop);
- //trace(nScreenWidth+" "+nScreenHeight+" "+nScreenLeft+" "+nScreenTop);
- }else if(nTaskBar[0] == 0 && nTaskBar[1] == 0 && nTaskBar[2] < nScreenWidth){
- //alert("Main Monitor Left TaskBar::" + nTaskBar[2]);
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nScreenLeft+nTaskBar[2], nScreenTop);
- }else if(nTaskBar[0] > 0 && nTaskBar[1] == 0){
- //alert("Main Monitor Right TaskBar::" + (nScreenWidth-nTaskBar[0]));
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nScreenLeft, nScreenTop);
- }else if(nTaskBar[0] == 0 && nTaskBar[1] == 0 && nTaskBar[3] < nScreenHeight){
- //alert("Main Monitor Top TaskBar::" + nTaskBar[3]);
- application.mainframe.position.height = nScreenHeight - nTaskBar[3];
- application.mainframe.move(nScreenLeft, nScreenTop+nTaskBar[3]);
- }
- */
-
-
- //var hWnd = mainframe.getHandle();
- //var rtn = objExtCommon.getMonitorRect(hWnd);
- //trace( "Form_MaxPosition [ x: " + rtn[0] + " y: " + rtn[1] + " width: " + rtn[2] + " height: " + rtn[3] + "]" );
- //alert(nScreenHeight);
- }
- /****************************************************************************************
- * Argument :
- * Description : 로그아웃 처리
- ****************************************************************************************/
- function gf_logout(){
-
- // 세션토큰 초기화
- gv_sSessionToken = "";
- // 세션변수 초기화
- agv_objBizVariable = 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(){
- var loginSaveInst = "";
- if(gv_bLoginSaveinst){
- gv_LoginSavedInst = application.getPrivateProfile("gv_LoginSavedInst");
-
- loginSaveInst = gv_LoginSavedInst;
- }
- //alert("@@"+loginSaveInst);
-
- var xadlURLArr = application.xadl.split("/");
- if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
- {
- var urlArr = application.services["SVR"].url.split("/");
- // 교육서버
- if(xadlURLArr[2].indexOf("edu") != -1){
- if(loginSaveInst == "his031"){
- urlArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
- }else if(loginSaveInst == "his032"){
- urlArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
- }else if(loginSaveInst == "mis030"){
- urlArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
- }
-
- // 운영서버
- } else {
- if(loginSaveInst == "his031"){
- urlArr = "http://hisx031.knuh.kr:80/himed/.lxp?".split("/");
- }else if(loginSaveInst == "his032"){
- urlArr = "http://hisx032.knuh.kr:80/himed/.lxp?".split("/");
- }else if(loginSaveInst == "mis030"){
- urlArr = "http://misx030.knuh.kr:80/himed/.lxp?".split("/");
- }
- }
-
- var domainArr = urlArr[2].split(":");
- gv_sURLprefix = "http://"+urlArr[2]+"/"+urlArr[3];
- gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+urlArr[3];
- gv_bIsPreview = false;
- }
- 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("/");
- // }
- // }
-
- var localDomainArr = serviceURLArr[2].split(":");
- gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
- gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
- gv_bIsPreview = true;
- }
-
- // TF주소 동적할당(by 김지훈)
- gv_sTFURLprefix = application.services["TFURL"].url;
-
- gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
- gf_useSSL(gv_bUseSSL);
- var rtn = "OK";
- /*
- // 서버환경과 로컬환경을 따져서 Grobal Variable 동적으로 변경 (예 :http://his000dev.schmc.ac.kr:18088/himed2/.lxp? )
- var xadlURLArr = application.xadl.split("/");
- if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
- {
- var domainArr = xadlURLArr[2].split(":");
- gv_sURLprefix = "http://"+xadlURLArr[2]+"/"+xadlURLArr[3];
- gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+xadlURLArr[3];
- gv_bIsPreview = false;
- }
- else // 개발자 환경인 경우 (미리보기환경)
- {
- var serviceURLArr = application.services["SVR"].url.split("/");
- var localDomainArr = serviceURLArr[2].split(":");
- gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
- gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
- gv_bIsPreview = true;
- }
- // TF주소 동적할당(by 김지훈)
- gv_sTFURLprefix = application.services["TFURL"].url;
-
- // SSL 사용여부에 따라 서비스 URL 변경
- gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
- gf_useSSL(gv_bUseSSL);
-
- var rtn = "OK";
- */
-
- }
- //=======================================================================================
- // 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();
-
- gf_setUrl();
- /*
- // 서버환경과 로컬환경을 따져서 Grobal Variable 동적으로 변경 (예 :http://his000dev.schmc.ac.kr:18088/himed2/.lxp? )
- var xadlURLArr = application.xadl.split("/");
- if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
- {
- var domainArr = xadlURLArr[2].split(":");
- gv_sURLprefix = "http://"+xadlURLArr[2]+"/"+xadlURLArr[3];
- gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+xadlURLArr[3];
- gv_bIsPreview = false;
- }
- else // 개발자 환경인 경우 (미리보기환경)
- {
- var serviceURLArr = application.services["SVR"].url.split("/");
- var localDomainArr = serviceURLArr[2].split(":");
- gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
- gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
- gv_bIsPreview = true;
- }
- // TF주소 동적할당(by 김지훈)
- gv_sTFURLprefix = application.services["TFURL"].url;
-
- // SSL 사용여부에 따라 서비스 URL 변경
- gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
- gf_useSSL(gv_bUseSSL);
-
- var rtn = "OK";
- */
- 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){
-
- //팝업 좌표 저장
- agv_objAppTopPath.form.savePopupLocation();
- }
- ]]></Script>
- </ADL>
|