Browse Source

textarea 팝업 미리보기 형식으로 변경

SH 1 month ago
parent
commit
dcb0c585e9
2 changed files with 243 additions and 46 deletions
  1. 120 0
      src/main/webapp/ux/com/pop/comTextareaPop.xml
  2. 123 46
      src/main/webapp/ux/cw/cw0625/CW06250001U.xml

+ 120 - 0
src/main/webapp/ux/com/pop/comTextareaPop.xml

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="/resources/css/all.css" type="text/css"?>
+<?xml-stylesheet href="/resources/css/contents.css" type="text/css"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:w2="http://www.inswave.com/websquare"
+	xmlns:xf="http://www.w3.org/2002/xforms">
+	<head>
+		<!--
+			**************************************************************************
+			* Program ID : /ux/com/pop/comAlert.xml
+			* Program Name : alert창 팝업
+			* Description : alert창 팝업 화면입니다.
+			* Author : 고규호
+			* Version : 2020-01-29
+			*
+			* ========================================
+			* 변경일자 수정자 내 용
+			* ========================================
+			* 2020-01-29 고규호 최초작성
+			**************************************************************************
+		-->
+		<w2:type>DEFAULT</w2:type>
+		<w2:buildDate />
+		<xf:model>
+			<xf:instance>
+				<data xmlns="" />
+			</xf:instance>
+			<w2:dataCollection baseNode="map" />
+			<w2:workflowCollection />
+		</xf:model>
+		<script type="text/javascript" lazy="false"><![CDATA[
+    /**************************************************************************
+     * [1] 초기화
+     **************************************************************************/
+
+    /***************************************************************************
+     * 함수명:scwin.initScreen
+     * 기능:공통코드,각종 필요 코드조회, 권한 등 세팅
+     ***************************************************************************/
+    scwin.initScreen = function(){
+        var param = popupLib.getPopupParam();
+        var param_data = JSON.parse(strLib.serialize(param));
+		txtSubject.setValue( param_data.txtSubject );		//제목
+		txtConts.setValue( param_data.txtConts );			//내용
+		
+    };
+
+    /**************************************************************************
+     * [2] 전역변수 선언
+     **************************************************************************/
+
+    scwin.obj = popupLib.getScwinObj();                             //부모창 scwin 객체 필수
+    scwin.user = WebSquare.session.getAttribute( "user" );          //사용자 정보 객체 필수
+    scwin.cmpnCd  = scwin.user.cmpnCd;                              //회사코드 필수
+    scwin.userId  = scwin.user.userId;                              //사용자ID 필수
+    scwin.prgId = scwin.obj.prgId;                                  //프로그램ID 필수
+    scwin.sysCd = scwin.obj.sysCd;                                  //시스템코드 필수
+    scwin.sysAuth = WebSquare.session.getAttribute( scwin.sysCd );  //시스템권한 필수
+    scwin.prgAuth = scwin.obj.prgAuth;                              //프로그램권한 필수
+    scwin.comp;
+
+    /**************************************************************************
+     * [3] Event 정의
+     *  즐겨찾기 조회 등 버튼목록
+     **************************************************************************/
+    /**************************************************************************
+     * Event:scwin.btnClose_onclick
+     * 기능:닫기 버튼 클릭
+     **************************************************************************/
+    scwin.btnClose_onclick = function(e) {
+		popupLib.closePopup();
+	};
+	
+    /**************************************************************************
+     * [4] Callback
+     **************************************************************************/
+
+    /**************************************************************************
+     * [5] 사용자정의 함수
+     **************************************************************************/
+
+    /***************************************************************************
+     * 함수명:$(document).keyup
+     * 기능:팝업창 키업 이벤트
+     * param:키코드,입력키 정보 객체
+     ***************************************************************************/
+    $(document).keyup(function(e) {
+        if (e.key === "Escape") {
+            popupLib.closePopup();
+        }
+    });
+    ]]></script>
+	</head>
+	<body style="overflow: hidden;">
+		<xf:group id="group" style="padding: 15px;" class="wrap_pop fixed_cont">
+			<xf:group id="pgtbox" style="" class="pgtbox">
+				<w2:textbox id="txtSubject" class="pgt_tit" label=""></w2:textbox>
+				<xf:group id="" style="" class="fr">
+					<w2:anchor class="btn_cm" id="btnClose" outerDiv="true" style="" ev:onclick="scwin.btnClose_onclick">
+						<xf:label><![CDATA[닫기]]></xf:label>
+					</w2:anchor>
+				</xf:group>
+			</xf:group>
+			<xf:group id="shbox" style="" class="shbox">
+				<xf:group id="" style="width:100%;" adaptive="layout" adaptiveThreshold="600" class="w2tb tb" tagname="table">
+					<w2:attributes>
+						<w2:summary></w2:summary>
+					</w2:attributes>
+					<xf:group tagname="colgroup">
+						<xf:group style="width:80%;" tagname="col"></xf:group>
+					</xf:group>
+					<xf:group style="" tagname="tr">
+						<xf:group class="w2tb_td" tagname="td">
+							<xf:textarea id="txtConts" style="width:100%;height: 300px;" ref=""  readOnly="true"></xf:textarea>
+						</xf:group>
+					</xf:group>
+				</xf:group>
+			</xf:group>
+		</xf:group>
+	</body>
+</html>

+ 123 - 46
src/main/webapp/ux/cw/cw0625/CW06250001U.xml

@@ -27,8 +27,7 @@
 			<w2:dataCollection baseNode="map">
 				<w2:dataList baseNode="list" repeatNode="map" id="dcdataList1" saveRemovedData="">
 					<w2:columnInfo>
-						<w2:column id="sel" name="신청" dataType="text" ignoreStatus="true"></w2:column>
-						<w2:column id="sel2" name="반려" dataType="text" ignoreStatus="true"></w2:column>
+						<w2:column id="sel" name="선택" dataType="text" ignoreStatus="true"></w2:column>
 						<w2:column id="cmpnCd" name="cmpnCd" dataType="text"></w2:column>
 						<w2:column id="yearYy" name="년도" dataType="text"></w2:column>
 						<w2:column id="yearHalf" name="반기" dataType="text"></w2:column>
@@ -295,7 +294,7 @@
         }
     	
     	for (var i = 0; i < dcdataList1.getTotalRow(); i++) {
-    		if(dcdataList1.getCellData( i , "sel2" ) == "Y") {
+    		if(dcdataList1.getCellData( i , "sel" ) == "Y") {
            		if(dcdataList1.getCellData( i , "evalEmpNo2" ) == scwin.user.empNo) {
            			commLib.getAlert("승인 및 반려는 평가자1만 가능합니다.");
            			return;
@@ -342,7 +341,72 @@
     scwin.btnBookmark_onclick = function() {
         commLib.getBookMark(scwin.cmpnCd,scwin.userId,scwin.prgId,scwin.sysCd);
     };
-
+    
+    /***************************************************************************
+     * 함 수 명: scwin.grdData1_oncellclick
+     * 기    능: 그리드 셀 클릭시 처리
+     * param: 선택 행,열 정보
+     ***************************************************************************/
+    scwin.grdData1_oncellclick = function(row,col) {
+        var colId = grdData1.getColumnID( col );
+        
+        if(colId == "jobGoal") {
+        	
+        	var txtSubject = grdData1.getHeaderValue(colId);
+        	txtSubject = txtSubject.substring(1);
+        	var txtConts = dcdataList1.getCellData( row , "jobGoal" );
+        	
+        	if(txtConts != '') {
+            	scwin.textareaPop(txtSubject, txtConts);
+            }
+        }
+        
+        if(colId == "kpiStandard") {
+        
+        	var txtSubject = grdData1.getHeaderValue(colId);
+        	txtSubject = txtSubject.substring(1);
+        	var txtConts = dcdataList1.getCellData( row , "kpiStandard" );
+        	
+        	if(txtConts != '') {
+            	scwin.textareaPop(txtSubject, txtConts);
+            }
+        }
+        
+        if(colId == "kpiGrade") {
+        
+        	var txtSubject = grdData1.getHeaderValue(colId);
+        	txtSubject = txtSubject.substring(1);
+        	var txtConts = dcdataList1.getCellData( row , "kpiGrade" );
+        	
+        	if(txtConts != '') {
+            	scwin.textareaPop(txtSubject, txtConts);
+            }
+        }
+        
+        if(colId == "selfFeedback1") {
+        
+        	var txtSubject = grdData1.getHeaderValue(colId);
+        	txtSubject = txtSubject.substring(1);
+        	var txtConts = dcdataList1.getCellData( row , "selfFeedback1" );
+        	
+        	if(txtConts != '') {
+            	scwin.textareaPop(txtSubject, txtConts);
+            }
+        }
+        
+        if(colId == "selfFeedback2") {
+        
+        	var txtSubject = grdData1.getHeaderValue(colId);
+        	txtSubject = txtSubject.substring(1);
+        	var txtConts = dcdataList1.getCellData( row , "selfFeedback2" );
+        	
+        	if(txtConts != '') {
+            	scwin.textareaPop(txtSubject, txtConts);
+            }
+        }
+        
+    };
+    
     /***************************************************************************
      ***************************************************************************/
 	scwin.yy_onviewchange = function(info) {
@@ -591,6 +655,25 @@
    		}
     };
     
+    /***************************************************************************
+     * 함 수 명 : scwin.textareaPop
+     * 기   능 : textarea 상세보기
+     ***************************************************************************/
+    scwin.textareaPop = function(pSubject, pConts) {
+        popupLib.open("comTextareaPop", "/ux/com/pop/comTextareaPop.xml", {
+            title: "상세보기",
+            useLayer: true,
+            modal: true,
+            width: "700",
+            height: "450",
+            param: {
+                txtSubject:pSubject
+                , txtConts:pConts
+            },
+            callback : ""
+        });
+    };
+    
     ]]></script>
 	</head>
 	<body>
@@ -676,7 +759,7 @@
 				</xf:group>
 				<xf:group class="gvwbox" id="" style="">
 					<w2:gridView adaptive="crosstab" adaptiveThreshold="600" autoFit="none" autoFitMinWidth="" class="wq_gvw"
-						dataList="data:dcdataList1" fixedColumn="" fixedColumnWithHidden="false" id="grdData1" ignoreCellClick="false"
+						dataList="data:dcdataList1" fixedColumn="5" fixedColumnWithHidden="false" id="grdData1" ignoreCellClick="false"
 						ignoreToggleOnDisabled="false" keyMoveEditMode="true" moveKeyEditMode="true" rowNumHeaderValue="No" rowNumStatusResize="true"
 						rowNumVisible="true" rowNumWidth="35" rowStatusHeaderValue="상태" rowStatusVisible="true" rowStatusWidth="35" scrollByColumn="true"
 						style="height: 200px;" summaryAuto="false" useShiftKey="true" visibleRowNum=""
@@ -686,32 +769,20 @@
 						<w2:header style="" id="header1">
 							<w2:row style="" id="row1">
 								<w2:column removeBorderStyle="false" width="50" inputType="checkbox" id="selAll" value="선택"
-									blockSelect="false" displayMode="label" checkboxLabel="승인" style="" rowSpan="3">
-								</w2:column>
-								<w2:column removeBorderStyle="false" width="50" inputType="checkbox" id="sel2All" value="선택"
-									blockSelect="false" displayMode="label" checkboxLabel="반려" style="" rowSpan="3">
+									blockSelect="false" displayMode="label" checkboxLabel="선택" style="" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="50" inputType="text" id="cmpnCd" value="cmpnCd"
 									blockSelect="false" displayMode="label" hidden="true" style="" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="50" inputType="text" id="yearYy" value="년도" blockSelect="false"
-									displayMode="label" style="" rowSpan="3">
+									displayMode="label" style="" hidden="true" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="60" inputType="text" id="yearHalf" value="반기" blockSelect="false"
-									displayMode="label" style="" rowSpan="3">
-								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="text" id="statusCd" value="진행상태"
-									blockSelect="false" displayMode="label" style="" rowSpan="3">
+									displayMode="label" style="" hidden="true" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="40" inputType="text" id="seq" value="SEQ" blockSelect="false"
 									displayMode="label" style="" rowSpan="3" colSpan="3">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="100" inputType="text" id="deptCd" value="부서"
-									blockSelect="false" displayMode="label" style="" hidden="true" rowSpan="3">
-								</w2:column>
-								<w2:column removeBorderStyle="false" width="200" inputType="text" id="deptCd" value="부서"
-									blockSelect="false" displayMode="label" style="" rowSpan="3">
-								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="empNo" value="사번" blockSelect="false"
 									displayMode="label" style="" hidden="true" rowSpan="3">
 								</w2:column>
@@ -724,13 +795,22 @@
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="empGb" value="사원구분" blockSelect="false"
 									displayMode="label" style="" rowSpan="3">
 								</w2:column>
+								<w2:column removeBorderStyle="false" width="100" inputType="text" id="deptCd" value="부서"
+									blockSelect="false" displayMode="label" style="" hidden="true" rowSpan="3">
+								</w2:column>
+								<w2:column removeBorderStyle="false" width="200" inputType="text" id="deptCd" value="부서"
+									blockSelect="false" displayMode="label" style="" rowSpan="3">
+								</w2:column>
+								<w2:column removeBorderStyle="false" width="70" inputType="text" id="statusCd" value="진행상태"
+									blockSelect="false" displayMode="label" style="" rowSpan="3">
+								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="jobRate" value="업무비중"
 									blockSelect="false" displayMode="label" style="" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="100" inputType="text" id="goalCd" value="목표코드"
 									blockSelect="false" displayMode="label" style="" rowSpan="3">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="250" inputType="text" id="jobGoal" value="Goal"
+								<w2:column removeBorderStyle="false" width="250" inputType="text" id="jobGoal" value="Goal"
 									blockSelect="false" displayMode="label" style="" rowSpan="3">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="300" inputType="text" id="column01" value="KPI"
@@ -753,16 +833,16 @@
 								</w2:column>
 							</w2:row>
 							<w2:row style="" id="row3">
-								<w2:column removeBorderStyle="false" width="150" inputType="text" id="kpiStandard" value="기준"
+								<w2:column removeBorderStyle="false" width="150" inputType="text" id="kpiStandard" value="기준"
 									blockSelect="false" displayMode="label" style="" rowSpan="2">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="150" inputType="text" id="kpiGrade" value="등급"
+								<w2:column removeBorderStyle="false" width="150" inputType="text" id="kpiGrade" value="등급"
 									blockSelect="false" displayMode="label" style="" rowSpan="2">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="200" inputType="text" id="selfFeedback1" value="긍정요인"
+								<w2:column removeBorderStyle="false" width="200" inputType="text" id="selfFeedback1" value="긍정요인"
 									blockSelect="false" displayMode="label" style="" rowSpan="2">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="200" inputType="text" id="selfFeedback2" value="개선필요"
+								<w2:column removeBorderStyle="false" width="200" inputType="text" id="selfFeedback2" value="개선필요"
 									blockSelect="false" displayMode="label" style="" rowSpan="2">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="evalEmpNo1" value="사번"
@@ -819,9 +899,6 @@
 								<w2:column removeBorderStyle="false" width="70" inputType="checkbox" id="sel" blockSelect="false"
 									displayMode="label" trueValue="Y" falseValue="N" valueType="other">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="checkbox" id="sel2" blockSelect="false"
-									displayMode="label" trueValue="Y" falseValue="N" valueType="other">
-								</w2:column>
 								<w2:column removeBorderStyle="false" width="130" inputType="text" id="cmpnCd" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
@@ -833,10 +910,6 @@
 									displayMode="label" readOnly="true">
 									<w2:choices></w2:choices>
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="80" inputType="select" id="statusCd" blockSelect="false"
-									displayMode="label" readOnly="true">
-									<w2:choices></w2:choices>
-								</w2:column>
 								<w2:column removeBorderStyle="false" width="30" inputType="text" id="seq" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
@@ -846,13 +919,6 @@
 								<w2:column removeBorderStyle="false" width="30" inputType="text" id="subSeq" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="100" inputType="textImage" id="deptCd" blockSelect="false"
-									displayMode="label" readOnly="false" imageSrc="/resources/images/contents/ico_tb_search.png"
-									imageClickFunction="scwin.dptPopSearch" imageWidth="20">
-								</w2:column>
-								<w2:column removeBorderStyle="false" width="200" inputType="text" id="deptNm" blockSelect="false"
-									displayMode="label" readOnly="true">
-								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="empNo" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
@@ -866,19 +932,30 @@
 									displayMode="label" escape="true" readOnly="true">
 									<w2:choices></w2:choices>
 								</w2:column>
+								<w2:column removeBorderStyle="false" width="100" inputType="textImage" id="deptCd" blockSelect="false"
+									displayMode="label" readOnly="false" imageSrc="/resources/images/contents/ico_tb_search.png"
+									imageClickFunction="scwin.dptPopSearch" imageWidth="20">
+								</w2:column>
+								<w2:column removeBorderStyle="false" width="200" inputType="text" id="deptNm" blockSelect="false"
+									displayMode="label" readOnly="true">
+								</w2:column>
+								<w2:column removeBorderStyle="false" width="80" inputType="select" id="statusCd" blockSelect="false"
+									displayMode="label" readOnly="true">
+									<w2:choices></w2:choices>
+								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="jobRate" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="goalCd" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="jobGoal" blockSelect="false"
+								<w2:column removeBorderStyle="false" width="70" inputType="link" id="jobGoal" blockSelect="false"
 									displayMode="label" readOnly="true" displayType="all" textAlign="left">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="kpiStandard" blockSelect="false"
+								<w2:column removeBorderStyle="false" width="70" inputType="link" id="kpiStandard" blockSelect="false"
 									displayMode="label" readOnly="true" displayType="all" textAlign="left">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="kpiGrade" blockSelect="false"
+								<w2:column removeBorderStyle="false" width="70" inputType="link" id="kpiGrade" blockSelect="false"
 									displayMode="label" readOnly="true" displayType="all" textAlign="left">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="returnFeedback" blockSelect="false"
@@ -887,11 +964,11 @@
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="selfEvalGrade" blockSelect="false"
 									displayMode="label" readOnly="true">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="selfFeedback1" blockSelect="false"
-									displayMode="label" readOnly="true" displayType="all" textAlign="left">
+								<w2:column removeBorderStyle="false" width="70" inputType="link" id="selfFeedback1" blockSelect="false"
+									displayMode="label" readOnly="true" displayType="" textAlign="left">
 								</w2:column>
-								<w2:column removeBorderStyle="false" width="70" inputType="textarea" id="selfFeedback2" blockSelect="false"
-									displayMode="label" readOnly="true" displayType="all" textAlign="left">
+								<w2:column removeBorderStyle="false" width="70" inputType="link" id="selfFeedback2" blockSelect="false"
+									displayMode="label" readOnly="true" displayType="" textAlign="left">
 								</w2:column>
 								<w2:column removeBorderStyle="false" width="70" inputType="text" id="evalEmpNo1" blockSelect="false"
 									displayMode="label" readOnly="true">