ZUM001.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //메인화면 창 사이즈 설정
  2. function getWindowWidth(){
  3. return (screen.width - (screen.width - screen.availWidth) > 1280) ?
  4. 1280 : screen.width - (screen.width - screen.availWidth);
  5. }
  6. function getWindowHeight(){
  7. return (screen.height - (screen.height - screen.availHeight) > 990) ?
  8. 990 : screen.height - (screen.height - screen.availHeight);
  9. }
  10. function getScrollBarsYN(){
  11. return (getWindowWidth() < 1280 || getWindowHeight() < 990) ? 'yes' : 'no';
  12. }
  13. function setWindowSize() {
  14. var winWidth = getWindowWidth();
  15. var winHeight = getWindowHeight();
  16. if (winWidth == 1280 && winHeight < 990)
  17. {
  18. winWidth = winWidth + 20 ;
  19. }
  20. if (winWidth < 1280 && winHeight == 990)
  21. {
  22. winHeight = winHeight + 20 ;
  23. }
  24. resizeTo(winWidth, winHeight);
  25. }
  26. //scrollbar
  27. function setBodyScroll(){
  28. document.body.scroll = getScrollBarsYN();
  29. }
  30. //viewer object반환
  31. function getViewerObject(name){
  32. return document.all.item(systemcd+"_"+name);
  33. }
  34. //메인 닫기 클릭시 처리
  35. function setWindowClose(mainstatus){
  36. var status = getViewerObject("sysMessage");//message Object
  37. status.window.javascript.setGlobalVariable("mainclose", mainstatus);
  38. }
  39. //비밀번호 변경
  40. function passwordUpdate()
  41. {
  42. var status = getViewerObject("sysMessage");//message Object
  43. status.window.javascript.modal("SPZUM01100", "", null, null, null, null, null, "width:505px;height:370px");
  44. }
  45. //로그아웃
  46. function userLogout() {
  47. var status = getViewerObject("sysMessage");//message Object
  48. if ( confirm("로그아웃 하시겠습니까?") ) {
  49. closePopupWindow();
  50. delUserInfo();
  51. hismainForm.action = "logout.live";
  52. hismainForm.submit();
  53. }
  54. }
  55. // 로그아웃(xrw 에서만 호출하기 위한 메소드)
  56. // 다수의 child 가 존재할 경우 해당 child 들을 모두 닫은 후에(xrw에서수행) 로그아웃하기 위해 새로 생성
  57. function logout() {
  58. hismainForm.action = "logout.live";
  59. hismainForm.submit();
  60. }
  61. //로그아웃시 세션정보 삭제
  62. function delUserInfo(){
  63. var status = getViewerObject("sysMessage");//message Object
  64. var userInfoKeyStr = sessionFormat
  65. var userInfoKeyArr = userInfoKeyStr.split("|");
  66. var len = userInfoKeyArr.length;
  67. for(i=0;i<len;i++) {
  68. status.window.javascript.setGlobalVariable(userInfoKeyArr[i], "");
  69. }
  70. status.window.javascript.setGlobalVariable("userinfos", "");
  71. }
  72. //로그아웃시 열린 팝업 close
  73. function closePopupWindow() {
  74. var status = getViewerObject("sysMessage");//message Object
  75. status.window.javascript.fLogout();
  76. }
  77. //열린화면
  78. function openScreenList(){
  79. var posX = window.event.screenX-224;
  80. var posY = window.event.screenY;
  81. var status = getViewerObject("sysMessage");//message Object
  82. status.window.javascript.fOpenScreenList(posX, posY);
  83. }
  84. //바로가기 등록
  85. function insShortcutMenu(){
  86. var status = getViewerObject("sysMessage");//message Object
  87. status.window.javascript.modal("SPZUM01300", "", "", "", "", "", "", "width:709; height:875; align:center; sysmenu:hidden; ");
  88. }