feat: 시추공 정보 입력 시 표고 값에 하이픈 넣을 때 0으로 변환되도록 수정
parent
edcec0971f
commit
8b730a30b1
10
list.txt
10
list.txt
|
|
@ -1,9 +1,3 @@
|
|||
#src\main\resources\egovframework\egovProps\globals.properties
|
||||
src\main\webapp\WEB-INF\views\web\input\meta_info.jsp
|
||||
src\main\webapp\WEB-INF\views\web\input\meta_info1.jsp
|
||||
# 신규 프로젝트 생성 시, 프로젝트 명 중복 여부 개선
|
||||
src\main\java\geoinfo\regi\projectList\service\ProjectListService.java
|
||||
src\main\java\geoinfo\regi\projectList\service\impl\ProjectListServiceImpl.java
|
||||
src\main\java\geoinfo\regi\projectList\service\ProjectListMapper.java
|
||||
src\main\resources\egovframework\sqlmap\mapper\regi\projectList.xml
|
||||
src\main\java\geoinfo\regi\projectList\ProjectListController.java
|
||||
# 시추공 정보 입력 시 표고 값에 하이픈 넣을 때 0으로 변환되도록 수정
|
||||
src\main\webapp\WEB-INF\views\web\input\header.jsp
|
||||
|
|
@ -9,6 +9,251 @@
|
|||
|
||||
<script type="text/javaScript" src="/web/js/shortcut.js"></script>
|
||||
|
||||
<style>
|
||||
@keyframes shake {
|
||||
0% { transform: translateX(0); }
|
||||
10% { transform: translateX(-5px); }
|
||||
20% { transform: translateX(5px); }
|
||||
30% { transform: translateX(-5px); }
|
||||
40% { transform: translateX(5px); }
|
||||
50% { transform: translateX(-5px); }
|
||||
60% { transform: translateX(5px); }
|
||||
70% { transform: translateX(-5px); }
|
||||
80% { transform: translateX(5px); }
|
||||
90% { transform: translateX(-5px); }
|
||||
100% { transform: translateX(0); }
|
||||
}
|
||||
|
||||
.shake-animation {
|
||||
animation: shake 0.6s;
|
||||
}
|
||||
|
||||
/* The snackbar - position it at the bottom and in the middle of the screen */
|
||||
#snackbar {
|
||||
visibility: hidden; /* Hidden by default. Visible on click */
|
||||
min-width: 250px; /* Set a default minimum width */
|
||||
margin-left: -125px; /* Divide value of min-width by 2 */
|
||||
background-color: #000000; /* Black background color */
|
||||
color: #ff0000; /* White text color */
|
||||
text-align: center; /* Centered text */
|
||||
border-radius: 2px; /* Rounded borders */
|
||||
padding: 16px; /* Padding */
|
||||
position: fixed; /* Sit on top of the screen */
|
||||
z-index: 1; /* Add a z-index if needed */
|
||||
left: 50%; /* Center the snackbar */
|
||||
bottom: 80px; /* 30px from the bottom */
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Show the snackbar when clicking on a button (class added with JavaScript) */
|
||||
#snackbar.show {
|
||||
visibility: visible; /* Show the snackbar */
|
||||
/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
|
||||
However, delay the fade out process for 2.5 seconds /
|
||||
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Animations to fade the snackbar in and out */
|
||||
@-webkit-keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 80px; opacity: 1;}
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 80px; opacity: 1;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeout {
|
||||
from {bottom: 80px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
||||
@keyframes fadeout {
|
||||
from {bottom: 80px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javaScript">
|
||||
|
||||
function shakeAndHighlight(targetEle, message) {
|
||||
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
||||
|
||||
// 빨간색 테두리 설정
|
||||
targetEle.style.border = "2px solid red";
|
||||
|
||||
// 흔들리는 애니메이션 추가
|
||||
targetEle.classList.add("shake-animation");
|
||||
|
||||
|
||||
//alert
|
||||
setTimeout(function() {
|
||||
if( typeof message != 'undefined' ) {
|
||||
//alert(message);
|
||||
|
||||
var snackbarEle = document.getElementById("snackbar");
|
||||
if( typeof snackbarEle === 'undefined' || snackbarEle === null ) {
|
||||
//snackbar 엘리먼트 생성
|
||||
snackbarEle = createSnackBarEle();
|
||||
}
|
||||
snackbarEle.innerHTML = message;
|
||||
}
|
||||
}, 1);
|
||||
|
||||
// 3초 후 원래 스타일로 복원
|
||||
setTimeout(function() {
|
||||
targetEle.style.border = originalStyle;
|
||||
targetEle.classList.remove("shake-animation");
|
||||
//targetEle.focus();
|
||||
showSnackbar();
|
||||
}, 700);
|
||||
}
|
||||
|
||||
function createSnackBarEle () {
|
||||
const snackbar = document.createElement('div');
|
||||
snackbar.id = 'snackbar';
|
||||
|
||||
// 2. body 태그 가져오기
|
||||
const body = document.body;
|
||||
|
||||
// 3. body 태그 맨 아래에 snackbar 추가
|
||||
body.appendChild(snackbar);
|
||||
return snackbar;
|
||||
}
|
||||
|
||||
function showSnackbar() {
|
||||
// Get the snackbar DIV
|
||||
var snackbar = document.getElementById("snackbar");
|
||||
|
||||
if( typeof snackbar === 'undefined' || snackbar === null ) {
|
||||
//snackbar 엘리먼트 생성
|
||||
snackbar = createSnackBarEle();
|
||||
}
|
||||
|
||||
// Add the "show" class to DIV
|
||||
snackbar.className = "show";
|
||||
|
||||
var innerText = snackbar.innerText;
|
||||
innerText = String(innerText);
|
||||
// After some seconds, remove the show class from DIV
|
||||
|
||||
const totalShowDuration = 4000 + innerText.length * 86;
|
||||
|
||||
setTimeout(function(){
|
||||
snackbar.className = snackbar.className.replace("show", "");
|
||||
}, totalShowDuration);
|
||||
|
||||
setTimeout(function(){
|
||||
snackbar.style.visibility = 'hidden';
|
||||
}, totalShowDuration - 500);
|
||||
|
||||
|
||||
const remainingDuration = totalShowDuration / 1000 - (0.5 * 2);
|
||||
|
||||
// CSS 스타일을 JavaScript로 추가합니다.
|
||||
snackbar.style.visibility = 'visible';
|
||||
snackbar.style.animation = 'fadein 0.5s, fadeout 0.5s ' + String(remainingDuration) + 's';
|
||||
snackbar.style.webkitAnimation = 'fadein 0.5s, fadeout 0.5s ' + String(remainingDuration) + 's';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글 은/는 return 함수
|
||||
*/
|
||||
function getKoreanParticle(word) {
|
||||
// 입력받은 문자열의 마지막 글자를 추출합니다.
|
||||
const lastChar = word.slice(-1);
|
||||
|
||||
// 자음으로 끝나는 경우 '은'을, 모음으로 끝나는 경우 '는'을 반환합니다.
|
||||
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||
if (consonants.includes(lastChar)) {
|
||||
return '은';
|
||||
} else {
|
||||
return '는';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글 로/으로 return 함수
|
||||
*/
|
||||
function getKoreanParticle2(word) {
|
||||
word = String(word);
|
||||
const lastChar = word.slice(-1);
|
||||
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||
const numberConsonantsNeun = '036';
|
||||
|
||||
// 0, 3, 6만 으로 로 이어진다/
|
||||
if (numberConsonantsNeun.includes(lastChar)) {
|
||||
return '으로';
|
||||
}
|
||||
|
||||
if ( hasNonNumericCharacters(lastChar) == false ) {
|
||||
return '로';
|
||||
}
|
||||
|
||||
// 1. 'ㄹ'로 끝나는 경우 '로'를 사용합니다.
|
||||
if (lastChar === 'ㄹ') {
|
||||
return '로';
|
||||
}
|
||||
|
||||
// 2. 그 외 자음으로 끝나는 경우 '으로'를 사용합니다.
|
||||
if (consonants.includes(lastChar)) {
|
||||
return '으로';
|
||||
}
|
||||
|
||||
// 3. 모음으로 끝나는 경우 '로'를 사용합니다.
|
||||
return '로';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 특정 input의 1 또는 -로 되어 있는 것을 제거한 뒤에 그 값이 빈 값이면 필수값이라고 사용자에게 안내한다.
|
||||
*/
|
||||
function requirementInputData(id, fieldName) {
|
||||
var InputCompanyEle = document.getElementById(id);
|
||||
InputCompanyEle.addEventListener('focusout', function(event) {
|
||||
|
||||
let inputValue = event.target.value;
|
||||
|
||||
if( inputValue.replace(/[1|\-]/g, '').trim() === "" ) {
|
||||
shakeAndHighlight(event.target, fieldName + getKoreanParticle(fieldName) +' 필수 값입니다.');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자만 들어가는 field에 hyphen을 입력한 경우, 특정 숫자값으로 대체한다.
|
||||
*/
|
||||
function hyphenToSomeNumber(id, fieldName, someNumber) {
|
||||
var InputCompanyEle = document.getElementById(id);
|
||||
InputCompanyEle.addEventListener('focusout', function(event) {
|
||||
|
||||
let inputValue = event.target.value;
|
||||
|
||||
if( inputValue.replace(/[\-]/g, '').trim() === "" ) {
|
||||
shakeAndHighlight(event.target, fieldName + ' 값이 없는 경우 ' + someNumber + getKoreanParticle2(someNumber) + ' 대체 됩니다. (숫자만 입력 가능)');
|
||||
event.target.value = someNumber;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function hasNonNumericCharacters(str) {
|
||||
return /[^0-9]/.test(str);
|
||||
}
|
||||
|
||||
function removeNonNumeric(str) {
|
||||
let inputValue = String(str);
|
||||
return inputValue.replace(/[^0-9]/g, '');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javaScript">
|
||||
<%
|
||||
FileCmmn fileCmmn = FileCmmn.getInstance();
|
||||
|
|
@ -403,6 +648,24 @@ window.onload = function() {
|
|||
|
||||
casingDepthKeyupValidator();
|
||||
|
||||
requirementInputData("HOLE_NAME", "시추공명");
|
||||
|
||||
//수동으로 시추좌표를 입력한 경우, 좌표직접입력 버튼을 꼭 눌러누세요.
|
||||
var HoleYEle = document.getElementById("HOLE_Y");
|
||||
HoleYEle.addEventListener('focusout', function(event) {
|
||||
|
||||
var manualCoordinateButtonEle = document.getElementById("manual-coordinate-button");
|
||||
if( event.target.value.trim() !== "" ) {
|
||||
shakeAndHighlight(manualCoordinateButtonEle !== null ? manualCoordinateButtonEle : event.target, '수동으로 시추좌표를 입력한 경우, 좌표직접입력 버튼을 꼭 눌러누세요.');
|
||||
}
|
||||
});
|
||||
requirementInputData("HOLE_BORING_BY", "시추자");
|
||||
requirementInputData("HOLE_INSPECTED_BY", "조사자");
|
||||
hyphenToSomeNumber("HOLE_EL", "표고(m)", 0);
|
||||
//requirementInputData("00000000", "000000");
|
||||
//requirementInputData("00000000", "000000");
|
||||
|
||||
|
||||
/*
|
||||
//지자체'L_DIS','M_DIS'
|
||||
if('${sd}' != null && '${sd}' != ''){
|
||||
|
|
@ -1371,7 +1634,7 @@ function fn_HoleLoad(){
|
|||
<td colspan="3">
|
||||
X : <input name="HOLE_X" id="HOLE_X" type="text" style="width:200px;" maxlength="19" value="${mapHeader.holeOrX}" valid="notnull" validNm="X좌표" oninput="isNumberEvt(this,this.value)" />,
|
||||
Y : <input name="HOLE_Y" id="HOLE_Y" type="text" style="width:200px;" maxlength="19" value="${mapHeader.holeOrY}" valid="notnull" validNm="Y좌표" oninput="isNumberEvt(this,this.value)"/>
|
||||
<button type="button" class="btn btn-small btn-rounded5 btn-dark-gray" onClick="fn_MapInput('tm');return false;"><span>좌표직접입력</span></button>
|
||||
<button type="button" id="manual-coordinate-button" class="btn btn-small btn-rounded5 btn-dark-gray" onClick="fn_MapInput('tm');return false;"><span>좌표직접입력</span></button>
|
||||
<button type="button" class="btn btn-small btn-rounded5 btn-dark-gray" onClick="fn_MapPopup();return false;"><span>지도선택입력</span></button>
|
||||
<p>예) (서-동) X : 203769.128, (남-북) Y : 443270.103</p>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -67,8 +67,93 @@
|
|||
from {bottom: 80px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javaScript">
|
||||
|
||||
function shakeAndHighlight(targetEle, message) {
|
||||
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
||||
|
||||
// 빨간색 테두리 설정
|
||||
targetEle.style.border = "2px solid red";
|
||||
|
||||
// 흔들리는 애니메이션 추가
|
||||
targetEle.classList.add("shake-animation");
|
||||
|
||||
|
||||
//alert
|
||||
setTimeout(function() {
|
||||
if( typeof message != 'undefined' ) {
|
||||
//alert(message);
|
||||
|
||||
var snackbarEle = document.getElementById("snackbar");
|
||||
snackbarEle.innerHTML = message;
|
||||
}
|
||||
}, 1);
|
||||
|
||||
// 3초 후 원래 스타일로 복원
|
||||
setTimeout(function() {
|
||||
targetEle.style.border = originalStyle;
|
||||
targetEle.classList.remove("shake-animation");
|
||||
//targetEle.focus();
|
||||
showSnackbar();
|
||||
}, 700);
|
||||
}
|
||||
|
||||
function showSnackbar() {
|
||||
// Get the snackbar DIV
|
||||
var x = document.getElementById("snackbar");
|
||||
|
||||
// Add the "show" class to DIV
|
||||
x.className = "show";
|
||||
|
||||
// After 3 seconds, remove the show class from DIV
|
||||
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글 은/는 return 함수
|
||||
*/
|
||||
function getKoreanParticle(word) {
|
||||
// 입력받은 문자열의 마지막 글자를 추출합니다.
|
||||
const lastChar = word.slice(-1);
|
||||
|
||||
// 자음으로 끝나는 경우 '은'을, 모음으로 끝나는 경우 '는'을 반환합니다.
|
||||
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||
if (consonants.includes(lastChar)) {
|
||||
return '은';
|
||||
} else {
|
||||
return '는';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 특정 input의 1 또는 -로 되어 있는 것을 제거한 뒤에 그 값이 빈 값이면 필수값이라고 사용자에게 안내한다.
|
||||
*/
|
||||
function requirementInputData(id, fieldName) {
|
||||
var InputCompanyEle = document.getElementById(id);
|
||||
InputCompanyEle.addEventListener('focusout', function(event) {
|
||||
|
||||
let inputValue = event.target.value;
|
||||
|
||||
if( inputValue.replace(/[1|\-]/g, '').trim() === "" ) {
|
||||
shakeAndHighlight(event.target, fieldName + getKoreanParticle(fieldName) +' 필수 값입니다.');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function hasNonNumericCharacters(str) {
|
||||
return /[^0-9]/.test(str);
|
||||
}
|
||||
|
||||
function removeNonNumeric(str) {
|
||||
let inputValue = String(str);
|
||||
return inputValue.replace(/[^0-9]/g, '');
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javaScript">
|
||||
|
||||
//지자체 (행정구역)
|
||||
|
|
@ -159,78 +244,7 @@ function fn_save(rUrl){
|
|||
}
|
||||
|
||||
|
||||
function shakeAndHighlight(targetEle, message) {
|
||||
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
||||
|
||||
// 빨간색 테두리 설정
|
||||
targetEle.style.border = "2px solid red";
|
||||
|
||||
// 흔들리는 애니메이션 추가
|
||||
targetEle.classList.add("shake-animation");
|
||||
|
||||
|
||||
//alert
|
||||
setTimeout(function() {
|
||||
if( typeof message != 'undefined' ) {
|
||||
//alert(message);
|
||||
|
||||
var snackbarEle = document.getElementById("snackbar");
|
||||
snackbarEle.innerHTML = message;
|
||||
}
|
||||
}, 1);
|
||||
|
||||
// 3초 후 원래 스타일로 복원
|
||||
setTimeout(function() {
|
||||
targetEle.style.border = originalStyle;
|
||||
targetEle.classList.remove("shake-animation");
|
||||
//targetEle.focus();
|
||||
showSnackbar();
|
||||
}, 700);
|
||||
}
|
||||
|
||||
function showSnackbar() {
|
||||
// Get the snackbar DIV
|
||||
var x = document.getElementById("snackbar");
|
||||
|
||||
// Add the "show" class to DIV
|
||||
x.className = "show";
|
||||
|
||||
// After 3 seconds, remove the show class from DIV
|
||||
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글 은/는 return 함수
|
||||
*/
|
||||
function getKoreanParticle(word) {
|
||||
// 입력받은 문자열의 마지막 글자를 추출합니다.
|
||||
const lastChar = word.slice(-1);
|
||||
|
||||
// 자음으로 끝나는 경우 '은'을, 모음으로 끝나는 경우 '는'을 반환합니다.
|
||||
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||
if (consonants.includes(lastChar)) {
|
||||
return '은';
|
||||
} else {
|
||||
return '는';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 특정 input의 1 또는 -로 되어 있는 것을 제거한 뒤에 그 값이 빈 값이면 필수값이라고 사용자에게 안내한다.
|
||||
*/
|
||||
function requirementInputData(id, fieldName) {
|
||||
var InputCompanyEle = document.getElementById(id);
|
||||
InputCompanyEle.addEventListener('focusout', function(event) {
|
||||
|
||||
let inputValue = event.target.value;
|
||||
|
||||
if( inputValue.replace(/[1|\-]/g, '').trim() === "" ) {
|
||||
shakeAndHighlight(event.target, fieldName + getKoreanParticle(fieldName) +' 필수 값입니다.');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
|
||||
|
|
@ -328,14 +342,7 @@ window.onload = function() {
|
|||
|
||||
};
|
||||
|
||||
function hasNonNumericCharacters(str) {
|
||||
return /[^0-9]/.test(str);
|
||||
}
|
||||
|
||||
function removeNonNumeric(str) {
|
||||
let inputValue = String(str);
|
||||
return inputValue.replace(/[^0-9]/g, '');
|
||||
}
|
||||
|
||||
function fn_excel_input(){
|
||||
location.href="/excel_input_step00.do?REPORT_TYPE=CH"+"&PROJECT_CODE=";
|
||||
|
|
|
|||
Loading…
Reference in New Issue