var CONTEXT_NAME = "/web"; var HOST_NAME = "http://" + document.location.host + CONTEXT_NAME; /** * ³¯Â¥¸¦ ¼±ÅÃÇÒ ¼ö ÀÖ´Â ¸ð´Þ ÆÄ¾÷ È­¸é âÀ» ¿¬´Ù. * * @param field ³¯Â¥°¡ ÀÔ·ÂµÉ Çʵå */ function getDate(field) { var url = CONTEXT_NAME + "/popup/DatePopup.jsp"; var ws = formatWindowProperty(300, 250, 276, 340); /* IE */ if (window.showModalDialog) { var dt = showModalDialog(url, window, ws); if (dt != null) { if (dt.year == "") { field.value = ""; } else { field.value = dt.year + "-" + dt.month + "-" + dt.day; } } } else { url += "?formName=" + field.form.getAttribute("name") + "&fieldName=" + field.name; window.open(url, null, ws); } } /** * ¼ø¼­¸¦ º¯°æÇÒ ¼ö ÀÖ´Â ÆÄ¾÷ È­¸é âÀ» ¿¬´Ù. * * @param getStatement ´ë»ó ¸®½ºÆ®¸¦ °¡Á®¿À´Â Äõ¸® ¾ÆÀ̵ð * @param updateStatement ¼ø¼­¸¦ º¯°æÇÏ´Â Äõ¸® ¾ÆÀ̵ð * @param query ±âŸ ÆÄ¶ó¹ÌÅÍ·Î JParam °´Ã¼¸¦ ´ã°í ÀÖ´Â ¹è¿­ */ function openOrderPopup(getStatement, updateStatement, query) { var url = CONTEXT_NAME + "/popup/OrderPopup.jsp?getStatement=" + getStatement + "&updateStatement=" + updateStatement; var ws = formatWindowProperty1(166, 129, 310, 270); if (query) { for (var i = 0; i < query.length; i++) { url = url + "&" + query[i].name + "=" + query[i].value; } } window.open(url, null, ws); } /** * µµ¿ò¸» ÆÄ¾÷ È­¸é âÀ» ¿¬´Ù. * * @param context ÇöÀç º¸°í ÀÖ´Â ¾÷¹« È­¸éÀÇ URL */ function openHelpPopup(context) { var url = CONTEXT_NAME + "/popup/HelpPopup.jsp?context=" + context; var ws = formatWindowProperty1(166, 129, 700, 500); window.open(url, null, ws); } /** * ÄÚµå ¸®½ºÆ® ÆÄ¾÷ È­¸é âÀ» ¿¬´Ù. * * @param id ÄÚµå ¾ÆÀ̵𰡠ÀÔ·ÂµÉ Çʵå * @param name ÄÚµå À̸§ÀÌ ÀÔ·ÂµÉ Çʵå * @param code ÄÚµå * @param selector ¼±ÅÃÀÚ */ function openCodePopup(id, name, code, selector) { var url = CONTEXT_NAME + "/popup/CodePopup.jsp?id=" + id.name + "&name=" + name.name + "&code=" + code; if (selector) { url += "&selector=" + selector; } var ws = formatWindowProperty1(166, 129, 600, 500); window.open(url, null, ws); } /** * ¼­¹ö ÀνºÅϽº ÆÄ¾÷ È­¸é âÀ» ¿¬´Ù. * * @param interface ÄÄÇ»³ÍÆ® ÀÎÅÍÆäÀ̽º * @param moduleId ÄÄÆ÷³ÍÆ® ¸ðµâ ¾ÆÀ̵ð */ function openInstancePopup(interfaceName, moduleId) { var url = CONTEXT_NAME + "/RefreshComponent.do?c_interface=" + interfaceName + "&moduleId=" + moduleId; var ws = formatWindowProperty1(166, 129, 400, 300); window.open(url, null, ws); } function formatWindowProperty(left, top, width, height) { if (window.showModalDialog) { return "status:no; dialogLeft:" + left + "px; dialogTop:" + top + "px; dialogWidth:" + width + "px; dialogHeight:" + height + "px"; } else { return "modal, left=" + left + "px, top=" + top + ", width=" + width + "px, height=" + height + "px"; } } function formatWindowProperty1(left, top, width, height) { return "left=" + left + ", top=" + top + ", width=" + width + ", height=" + height; } function JParam(name, value) { this.name = name; this.value = value; } function formatWindowProperty2(left, top, width, height) { return "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height + ",menubar=no,scrollbars=yes,status=no,resizable=no"; } /** * ±ÔÁ¦¾È³»¼­ ÂüÁ¶ ÆË¾÷ È­¸é âÀ» ¿¬´Ù. * * @param val ÆÄ¶ó¹ÌÅͰª */ function openRgRefsView(val) { var selSggCd = ""; if(document.getElementById("selSggCd") != null) { selSggCd = document.getElementById("selSggCd").value; } var url = CONTEXT_NAME + "/regguide/common/RgRefsView.jsp" + val + "&selSggCd=" + selSggCd; var ws = formatWindowProperty2(166, 129, 620, 400); window.open(url, "procRefsViewPopup", ws); } /** * ÀÎÇã°¡ ÀýÂ÷ ÆË¾÷ È­¸é âÀ» ¿¬´Ù. * * @param val ÆÄ¶ó¹ÌÅͰª */ function openProcDescView(val) { var url = CONTEXT_NAME + "/regguide/common/RgProcDescView.jsp" + val var ws = formatWindowProperty2(166, 129, 775, 500); window.open(url, "procDescViewPopup", ws); } function openPageHelp() { var helpUrl = document.location.pathname; var helpUrlArray = helpUrl.split("/"); helpUrl = CONTEXT_NAME + "/ext/help/" + helpUrlArray[helpUrlArray.length-1].replace(".jsp", ".htm"); var ws = formatWindowProperty2(166, 129, 700, 500); window.open(helpUrl, "procPageHelp", ws); } /** * PrintPopup.jsp¸¦ ¿¬´Ù. * * @param doAction ½ÇÇàÇÒ openerÀÇ ¸Þ¼Òµå */ var printPopId; function openPrintPopup(doAction) { var ieCheck = true;//navigator.userAgent.match(/MSIE 7/) ? true : false; // IE7ÀÎÁö üũ if(ieCheck){ var width = (screen.availWidth)? ((screen.availWidth<750)? screen.availWidth:760):760; var height = (screen.availHeight)? screen.availHeight-110 : 470; var x = (screen.availWidth- width)/2; var y = 10; var winState = 'top=' + y + ',left=' + x + ',width=' +width +',height=' + height + ',menubar=yes, toolbar=no, scrollbars=yes, status=no,resizable=no'; if (typeof(doAction)=="undefined") doAction = ""; printPopId = window.open('./PrintPopup.jsp?doAction=' + doAction,'',winState); printPopId.focus(); } else{ window.print(); } }