Browse Source

저장후 그리드 로우 포커스 수정

SBK 1 year ago
parent
commit
993f40a26c

+ 4 - 16
src/main/webapp/ux/co/co0102/CO01020001U.xml

@@ -474,7 +474,8 @@
 		    	scwin.scrollY_grdData1();
 		    	scwin.scrollY_grdData1();
 		    	
 		    	
 		    	if(scwin.FocusedRow != null){
 		    	if(scwin.FocusedRow != null){
-		    		scwin.scrollToLastFocusedRow();
+					grdData1.setFocusedCell(scwin.FocusedRow, "ccNm", false);
+					scwin.FocusedRow = null;
 		    	}
 		    	}
             }
             }
         });
         });
@@ -530,19 +531,6 @@
         	cell.attr('title',cell.text());
         	cell.attr('title',cell.text());
         });
         });
     };
     };
-    
-    /***************************************************************************
-     * 함수명 : scwin.scrollToLastFocusedRow
-     * 기능 : 저장 후 마지막에 선택한 로우 로 이동
-     ***************************************************************************/
-	scwin.scrollToLastFocusedRow = function() {
-		document.querySelector("#tabc_layout_contents_1811_body_grdData1_scrollY_div").scroll({left:0,top:50000,behavior:"smooth"});
-		setTimeout(function() {
-			grdData1.setTopRowIndex( scwin.FocusedRow );
-			grdData1.setFocusedCell(scwin.FocusedRow, "ccNm", false);
-			scwin.FocusedRow = null;
-		}, 800);
-	};
 
 
     /***************************************************************************
     /***************************************************************************
      * 함수명 : scwin.getComonDefaultRow
      * 함수명 : scwin.getComonDefaultRow
@@ -719,7 +707,7 @@
 							keyMoveEditMode="true" moveKeyEditMode="true" rowNumHeaderValue="No" rowNumStatusResize="true" rowNumVisible="true" rowNumWidth="35"
 							keyMoveEditMode="true" moveKeyEditMode="true" rowNumHeaderValue="No" rowNumStatusResize="true" rowNumVisible="true" rowNumWidth="35"
 							rowStatusHeaderValue="상태" rowStatusVisible="true" rowStatusWidth="35" scrollByColumn="false" scrollByColumnAdaptive="false"
 							rowStatusHeaderValue="상태" rowStatusVisible="true" rowStatusWidth="35" scrollByColumn="false" scrollByColumnAdaptive="false"
 							style="height: 200px;" summaryAuto="false" useShiftKey="true" visibleRowNum="" enterKeyMove="none" readOnly="true"
 							style="height: 200px;" summaryAuto="false" useShiftKey="true" visibleRowNum="" enterKeyMove="none" readOnly="true"
-							ev:oncellclick="scwin.grdData1_oncellclick" fixedColumn="" ev:onscrolly="scwin.scrollY_grdData1" syncScrollId="" mergeCells="">
+							ev:oncellclick="scwin.grdData1_oncellclick" fixedColumn="" ev:onscrolly="scwin.scrollY_grdData1" syncScrollId="" mergeCells="" defaultCellHeight="28">
 							<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
 							<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
 							<w2:header style="" id="header1">
 							<w2:header style="" id="header1">
 								<w2:row style="" id="row1">
 								<w2:row style="" id="row1">
@@ -786,7 +774,7 @@
 									<w2:column width="70" id="progActRtMeasr" inputType="textarea" textAlign="left"></w2:column>
 									<w2:column width="70" id="progActRtMeasr" inputType="textarea" textAlign="left"></w2:column>
 									<w2:column removeBorderStyle="false" width="70" inputType="text" id="empPmNm" blockSelect="false"
 									<w2:column removeBorderStyle="false" width="70" inputType="text" id="empPmNm" blockSelect="false"
 										displayMode="label" textAlign="center">
 										displayMode="label" textAlign="center">
-									</w2:column>
+									</w2:column>								
 									<w2:column removeBorderStyle="false" width="70" inputType="text" id="empPeNm" blockSelect="false"
 									<w2:column removeBorderStyle="false" width="70" inputType="text" id="empPeNm" blockSelect="false"
 										displayMode="label" textAlign="center">
 										displayMode="label" textAlign="center">
 									</w2:column>
 									</w2:column>

+ 4 - 19
src/main/webapp/ux/co/co0106/CO01060001U.xml

@@ -314,7 +314,8 @@
 				scwin.scrollY_grdData1();
 				scwin.scrollY_grdData1();
 
 
 				if (scwin.FocusedRow != null) {
 				if (scwin.FocusedRow != null) {
-					scwin.scrollToLastFocusedRow();
+					grdData1.setFocusedCell(scwin.FocusedRow, "ccNm", false);
+					scwin.FocusedRow = null;
 				}
 				}
 			}
 			}
 		});
 		});
@@ -397,23 +398,7 @@
 				}
 				}
 				break;
 				break;
 		}
 		}
-	};
-
-	/***************************************************************************
-	 * 함수명 : scwin.scrollToLastFocusedRow
-	 * 기능 : 저장 후 마지막에 선택한 로우 로 이동
-	 ***************************************************************************/
-	scwin.scrollToLastFocusedRow = function() {
-		document.querySelector("#tabc_layout_contents_1817_body_grdData1_scrollY_div").scroll({left:0,top:50000,behavior:"smooth"});
-		setTimeout(function() {
-			grdData1.setTopRowIndex( scwin.FocusedRow );
-			grdData1.setFocusedCell(scwin.FocusedRow, "ccNm", false);
-			scwin.FocusedRow = null;
-		}, 800);
-	};
-
-
-	]]></script>
+	};	]]></script>
 	</head>
 	</head>
 	<body>
 	<body>
 		<xf:group id="sub_contents" style="" class="sub_contents fixed_cont">
 		<xf:group id="sub_contents" style="" class="sub_contents fixed_cont">
@@ -548,7 +533,7 @@
 							keyMoveEditMode="true" moveKeyEditMode="true" rowNumHeaderValue="No" rowNumStatusResize="true" rowNumVisible="true" rowNumWidth="30"
 							keyMoveEditMode="true" moveKeyEditMode="true" rowNumHeaderValue="No" rowNumStatusResize="true" rowNumVisible="true" rowNumWidth="30"
 							rowStatusHeaderValue="상태" rowStatusVisible="true" rowStatusWidth="30" scrollByColumn="false" scrollByColumnAdaptive="false"
 							rowStatusHeaderValue="상태" rowStatusVisible="true" rowStatusWidth="30" scrollByColumn="false" scrollByColumnAdaptive="false"
 							style="height: 200px;left:0px;top:5px;" summaryAuto="false" useShiftKey="true" visibleRowNum="" enterKeyMove="none" readOnly="true"
 							style="height: 200px;left:0px;top:5px;" summaryAuto="false" useShiftKey="true" visibleRowNum="" enterKeyMove="none" readOnly="true"
-							fixedColumn="5" ev:onscrolly="scwin.scrollY_grdData1">
+							fixedColumn="5" ev:onscrolly="scwin.scrollY_grdData1" defaultCellHeight="28">
 							<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
 							<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
 							<w2:header style="" id="header1">
 							<w2:header style="" id="header1">
 								<w2:row style="" id="row1">
 								<w2:row style="" id="row1">