feat: 발주기관 GNB에서 지도 열기 기능 추가
parent
cb90c10405
commit
5667560c1c
2
list.txt
2
list.txt
|
|
@ -1,6 +1,7 @@
|
|||
#src\main\resources\egovframework\egovProps\globals.properties
|
||||
src\main\webapp\com\css\common.v2.0.css
|
||||
src\main\webapp\com\css\common.v2.0.css.map
|
||||
src\main\java\geoinfo\main\login\LoginController.java
|
||||
src\main\webapp\WEB-INF\views\drilling\common\includeTopMenu.jsp
|
||||
src\main\webapp\js\home\index.js
|
||||
src\main\webapp\WEB-INF\views\drilling\home\drilling_index.jsp
|
||||
|
|
@ -8,6 +9,7 @@ src\main\webapp\WEB-INF\views\drilling\common\includeTopMenu.jsp
|
|||
src\main\webapp\WEB-INF\views\drilling\input\drilling_input.jsp
|
||||
src\main\webapp\WEB-INF\views\drilling\inquiry\drilling_inquiry_project.jsp
|
||||
src\main\webapp\WEB-INF\views\drilling\inquiry\drilling_inquiry.jsp
|
||||
src\main\webapp\com\js\drilling\drilling-common.js
|
||||
#src\main\webapp\com\img\drilling\banner_0308_02_1.jpg
|
||||
#src\main\webapp\com\img\drilling\banner_0410_01_3.jpg
|
||||
#src\main\webapp\com\img\drilling\banner_0818_01_1.jpg
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ public class DrillingHomeController {
|
|||
@Autowired
|
||||
DrillingHomeService drillingHomeService;
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@RequestMapping(value = "/drilling/index.do")
|
||||
public String drillingInquiry(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
|
|
@ -70,6 +73,29 @@ public class DrillingHomeController {
|
|||
return "isError";
|
||||
}
|
||||
|
||||
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
String cls = MyUtil.getStringFromObject( request.getSession().getAttribute("CLS") );
|
||||
|
||||
model.addAttribute("userId", userId);
|
||||
model.addAttribute("cls", cls);
|
||||
|
||||
try {
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, userId );
|
||||
model.addAttribute("mbr", spGetProjectMbrParams);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
}
|
||||
|
||||
return "/drilling/home/drilling_index";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,17 +301,17 @@ public class LoginController {
|
|||
phoneNo = certResult.get("phoneNo");
|
||||
}
|
||||
catch(IndexOutOfBoundsException ex){
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다. code: 1");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=pwsearch");
|
||||
return mv;
|
||||
}
|
||||
catch(NumberFormatException ex){
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다. code: 2");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=pwsearch");
|
||||
return mv;
|
||||
}
|
||||
catch(Exception ex){
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다. code: 3");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=pwsearch");
|
||||
return mv;
|
||||
}
|
||||
|
|
@ -596,7 +596,7 @@ public class LoginController {
|
|||
"userId:[" + "null" + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
mv.setViewName("/");
|
||||
mv.setViewName("redirect:/index.do?cntyn=0");
|
||||
} else {
|
||||
users.remove(userId, request.getSession());
|
||||
RequestContextHolder.getRequestAttributes().removeAttribute(userId, RequestAttributes.SCOPE_SESSION);
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<c:if test="${'2' == cls}">
|
||||
<header>
|
||||
<!-- 네비게이션 시작 -->
|
||||
<nav class="navbar navbar-default bootsnav navbar-fixed-top">
|
||||
<div class="nav-header-bg"></div>
|
||||
<div class="nav-header-line"></div>
|
||||
<div class="nav-header-container">
|
||||
<div class="nav-header-inner">
|
||||
<!-- 글로벌 시작 -->
|
||||
<div class="navbar-global-wrapper">
|
||||
<!-- 로고 시작 -->
|
||||
<div class="logo-wrapper">
|
||||
<a href="index.do?cntyn=0" target="_self" onfocus="this.blur()" title="국토지반정보 포털시스템" class="logo">
|
||||
<img src="${pageContext.request.contextPath}/com/img/common/header/logo_v2.png" class="logo-dark" alt="국토지반정보 포털시스템 로고">
|
||||
</a>
|
||||
<span class="page-system-title">프로젝트 등록</span>
|
||||
</div>
|
||||
<!-- 로고 끝 -->
|
||||
<!-- 글로벌 링크 시작 -->
|
||||
<div class="global-link-wrapper">
|
||||
<ul>
|
||||
<!-- 로그인시 시작 -->
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test="${cls != 1}">
|
||||
<span class="username-zone"><span class="username">${userName}(${userId})</span>님이 로그인하셨습니다.</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="username-zone"><span class="username">${companyName}(${userId})</span>님이 로그인하셨습니다.</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/logout.do?location=left" onFocus='this.blur()' class="btn top-btn-member logout-btn">로그아웃</a>
|
||||
</li>
|
||||
<!-- 로그인시 끝 -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 글로벌 링크 끝 -->
|
||||
</div>
|
||||
<!-- 글로벌 끝 -->
|
||||
<!-- 메뉴 시작 -->
|
||||
<div class="navbar-collapse-wrapper">
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul id="accordion" class="nav navbar-nav">
|
||||
<!-- 1뎁스 메뉴 시작 -->
|
||||
<li id="projectList" class="dropdown simple-dropdown">
|
||||
<a href="/drilling/inquiry.do" data-target="navbar-nav-webManage">부산관리청 관리자님 환영합니다</a>
|
||||
</li>
|
||||
<!-- 1뎁스 메뉴 끝 -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 메뉴 끝 -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- 네비게이션 끝 -->
|
||||
</header>
|
||||
</c:if>
|
||||
|
|
@ -11,6 +11,12 @@
|
|||
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="gl-district" name="gl-district" value="" />
|
||||
<input type="hidden" id="gm-district" name="gm-district" value="" />
|
||||
<input type="hidden" id="gs-district" name="gs-district" value="" />
|
||||
<input type="hidden" id="gf-district" name="gf-district" value="" />
|
||||
<input type="hidden" id="last-team-name" name="last-team-name" value="" />
|
||||
|
||||
<!-- header -------------------------------------------->
|
||||
<header class="drilling-wrap-header">
|
||||
<div id="header_cont">
|
||||
|
|
@ -45,7 +51,7 @@
|
|||
<nav class="gnb" id="gnb">
|
||||
<ul>
|
||||
<li class="">
|
||||
<a href="https://www.molit.go.kr/wrocm/USR/WPGE0201/m_34849/DTL.jsp">
|
||||
<a href='javascript:void(0);' onclick="onClickBtnViewOnMap()">
|
||||
지도 보기
|
||||
</a>
|
||||
<div class="depth2_box" style="display: none;">
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<div>
|
||||
<!-- 메뉴 서비스 -->
|
||||
<ul class="wrap_service">
|
||||
<li class="item01"><a href="https://www.calspia.go.kr/portal/" title="새창"><i>지도 보기</i></a></li>
|
||||
<li class="item01"><a href='javascript:void(0);' onclick="onClickBtnViewOnMap()"><i>지도 보기</i></a></li>
|
||||
<li class="item02"><a href="/drilling/inquiry-project.do"><i>건설 조회</i></a></li>
|
||||
<li class="item03"><a href="/drilling/inquiry.do"><i>입력 조회</i></a></li>
|
||||
<li class="item04"><a href="/drilling/input.do"><i>입력 하기</i></a></li>
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<div class="content-wrapper">
|
||||
<div class="content1">
|
||||
<div class="page-top-check">
|
||||
<p class="check-title"><span class="last-team-name" id="last-team-name"></span></p>
|
||||
<p class="check-title"><span class="last-team-name-span" id="last-team-name-span"></span></p>
|
||||
<ul class="check-category">
|
||||
<li id="gl-district"></li>
|
||||
<li id="gm-district"></li>
|
||||
<li id="gs-district"></li>
|
||||
<li id="gf-district"></li>
|
||||
<li id="gl-district-li"></li>
|
||||
<li id="gm-district-li"></li>
|
||||
<li id="gs-district-li"></li>
|
||||
<li id="gf-district-li"></li>
|
||||
</ul>
|
||||
<p class="check-title">기관명이 없을 시, 연락 바랍니다. 연락처: <span class="contact-tel">031-995-0934</span></p>
|
||||
</div>
|
||||
|
|
@ -105,68 +105,42 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<script type="text/javascript">
|
||||
var tableId = 0;
|
||||
|
||||
function setName(inputValue, arrDistrict, index ) {
|
||||
|
||||
let xhr;
|
||||
if(window.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
targetId = arrDistrict[index];
|
||||
|
||||
if( inputValue != null && inputValue !== "" ) {
|
||||
document.getElementById(targetId).innerText = inputValue;
|
||||
if( 0 < index ) {
|
||||
const element = document.getElementById(arrDistrict[index-1]);
|
||||
toggleClass(element, 'has-arrow');
|
||||
}
|
||||
} else {
|
||||
// IE5, IE6 일때
|
||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
document.getElementById(targetId).style.display = "none";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function departments() {
|
||||
xhr.open('GET', '/drilling/input/departments.do', true);
|
||||
xhr.setRequestHeader('Content-type', 'application/json');
|
||||
function callbackDepartments() {
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
// 요청 성공 시 처리
|
||||
const obj = JSON.parse(xhr.responseText);
|
||||
console.log('%o', obj);
|
||||
const glDistrict = document.getElementById('gl-district') .value;
|
||||
const gmDistrict = document.getElementById('gm-district') .value;
|
||||
const gsDistrict = document.getElementById('gs-district') .value;
|
||||
const gfDistrict = document.getElementById('gf-district') .value;
|
||||
const lastTeamName = document.getElementById('last-team-name') .value;
|
||||
|
||||
var lastTeamName = "";
|
||||
const arrDistrict= ['gl-district-li', 'gm-district-li', 'gs-district-li', 'gf-district-li'];
|
||||
setName( glDistrict, arrDistrict, 0);
|
||||
setName( gmDistrict, arrDistrict, 1);
|
||||
setName( gsDistrict, arrDistrict, 2);
|
||||
setName( gfDistrict, arrDistrict, 3);
|
||||
document.getElementById('last-team-name-span').innerText = lastTeamName;
|
||||
|
||||
if( obj.data.glDistrict != null ) {
|
||||
document.getElementById('gl-district').innerText = obj.data.glDistrict;
|
||||
lastTeamName = obj.data.glDistrict;
|
||||
} else {
|
||||
document.getElementById('gl-district').style.display = "none";
|
||||
}
|
||||
if( obj.data.gmDistrict != null ) {
|
||||
document.getElementById('gm-district').innerText = obj.data.gmDistrict;
|
||||
lastTeamName = obj.data.gmDistrict;
|
||||
} else {
|
||||
document.getElementById('gm-district').style.display = "none";
|
||||
}
|
||||
if( obj.data.gsDistrict != null ) {
|
||||
document.getElementById('gs-district').innerText = obj.data.gsDistrict;
|
||||
lastTeamName = obj.data.gsDistrict;
|
||||
} else {
|
||||
document.getElementById('gs-district').style.display = "none";
|
||||
}
|
||||
if( obj.data.gfDistrict != null ) {
|
||||
document.getElementById('gf-district').innerText = obj.data.gfDistrict;
|
||||
lastTeamName = obj.data.gfDistrict;
|
||||
} else {
|
||||
document.getElementById('gf-district').style.display = "none";
|
||||
}
|
||||
|
||||
// 가장 마지막 이름을 알아내야 함.
|
||||
document.getElementById('last-team-name').innerText = lastTeamName;
|
||||
|
||||
|
||||
} else if (xhr.readyState === 4) {
|
||||
// 요청 실패 시 처리
|
||||
console.error('요청 실패:', xhr.status);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
departments();
|
||||
|
||||
function getToday() {
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
|
|
|
|||
|
|
@ -37,18 +37,8 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<!-- javascript start-->
|
||||
<script type="text/javascript">
|
||||
|
||||
let xhr;
|
||||
if(window.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else {
|
||||
// IE5, IE6 일때
|
||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
function trim(str) {
|
||||
str = String(str);
|
||||
return str.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
|
||||
|
||||
function onClickBtnSearch() {
|
||||
const pagingEle = document.getElementById('paging');
|
||||
|
|
|
|||
|
|
@ -37,68 +37,6 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<!-- javascript start-->
|
||||
<script type="text/javascript">
|
||||
|
||||
let xhr;
|
||||
if(window.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else {
|
||||
// IE5, IE6 일때
|
||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
function trim(str) {
|
||||
str = String(str);
|
||||
return str.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
|
||||
function departments() {
|
||||
|
||||
if(typeof XMLHttpRequest != 'undefined'){
|
||||
xhr = new XMLHttpRequest();
|
||||
}
|
||||
xhr.open('GET', '/drilling/input/departments.do', true);
|
||||
xhr.setRequestHeader('Content-type', 'application/json');
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
// 요청 성공 시 처리
|
||||
const obj = JSON.parse(xhr.responseText);
|
||||
console.log('%o', obj);
|
||||
|
||||
var lastTeamName = "";
|
||||
|
||||
if( obj.data.glDistrict != null ) {
|
||||
document.getElementById('gl-district').value = obj.data.glDistrict;
|
||||
lastTeamName = obj.data.glDistrict;
|
||||
}
|
||||
if( obj.data.gmDistrict != null ) {
|
||||
document.getElementById('gm-district').value = obj.data.gmDistrict;
|
||||
lastTeamName = obj.data.gmDistrict;
|
||||
}
|
||||
if( obj.data.gsDistrict != null ) {
|
||||
document.getElementById('gs-district').value = obj.data.gsDistrict;
|
||||
lastTeamName = obj.data.gsDistrict;
|
||||
}
|
||||
if( obj.data.gfDistrict != null ) {
|
||||
document.getElementById('gf-district').value = obj.data.gfDistrict;
|
||||
lastTeamName = obj.data.gfDistrict;
|
||||
}
|
||||
|
||||
// 가장 마지막 이름을 알아내야 함.
|
||||
document.getElementById('last-team-name').value = lastTeamName;
|
||||
|
||||
|
||||
} else if (xhr.readyState === 4) {
|
||||
// 요청 실패 시 처리
|
||||
console.error('요청 실패:', xhr.status);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onClickBtnSearch() {
|
||||
const pagingEle = document.getElementById('paging');
|
||||
const activeLinks = pagingEle.querySelectorAll('li.is-active a');
|
||||
|
|
@ -226,44 +164,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
xhr.send();
|
||||
}
|
||||
|
||||
function onClickBtnViewOnMap() {
|
||||
const projectMasterCompanyName = '${mbr.projectMasterCompanyName}';
|
||||
let projectCode = '${mbr.ProjectCode}';
|
||||
|
||||
let minX = Number('${mbr.v_min_x}');
|
||||
let minY = Number('${mbr.v_min_y}');
|
||||
let maxX = Number('${mbr.v_max_x}');
|
||||
let maxY = Number('${mbr.v_max_y}');
|
||||
|
||||
|
||||
|
||||
|
||||
const gl = document.getElementById('gl-district').value;
|
||||
const gm = document.getElementById('gm-district').value;
|
||||
const gs = document.getElementById('gs-district').value;
|
||||
const gf = document.getElementById('gf-district').value;
|
||||
const lastTeamName = document.getElementById('last-team-name').value;
|
||||
|
||||
openMap('${sessionScope.USERID}','${cls}', gl, gm, gs, gf, lastTeamName, projectMasterCompanyName, maxX-minX, maxY-minY);
|
||||
}
|
||||
|
||||
function openMap(userid,cls, gl = null, gm = null, gs = null, gf = null, lastTeamName = null, projectMasterCompanyName = null, positionX= null, positionY= null)
|
||||
{
|
||||
win = 'map';
|
||||
sizeX=window.screen.width;
|
||||
sizeY=window.screen.height;
|
||||
|
||||
let userArea = projectMasterCompanyName;
|
||||
if( userArea == null ) {
|
||||
if( userid === 't3-1' ) {
|
||||
userArea = "충청남도";
|
||||
} else if( userid === 't3-2' ) {
|
||||
userArea = "부산광역시";
|
||||
}
|
||||
}
|
||||
var mapWin = window.open("/map/mapMain.do?userArea=" + encodeURIComponent(userArea) + "&gl=" + gl + "&gm=" + gm + "&gs=" + gs + "&gf=" + gf + "&lastTeamName=" + lastTeamName + "&positionX=" + positionX + "&positionY=" + positionY + "#tab_1_1","mapWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY + ",left=0,top=0");
|
||||
mapWin.focus();
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
|
@ -414,12 +315,6 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" id="gl-district" name="gl-district" value="" />
|
||||
<input type="hidden" id="gm-district" name="gm-district" value="" />
|
||||
<input type="hidden" id="gs-district" name="gs-district" value="" />
|
||||
<input type="hidden" id="gf-district" name="gf-district" value="" />
|
||||
<input type="hidden" id="last-team-name" name="last-team-name" value="" />
|
||||
<!-- 내용 끝 -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6001,7 +6001,7 @@ ul.faq-q > li textarea {
|
|||
line-height: 18px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.drilling .check-title .last-team-name {
|
||||
.drilling .check-title .last-team-name-span {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 32px;
|
||||
|
|
@ -6020,7 +6020,7 @@ ul.faq-q > li textarea {
|
|||
.drilling .check-category li:last-child::after {
|
||||
content: none;
|
||||
}
|
||||
.drilling .check-category li::after {
|
||||
.drilling .check-category li.has-arrow::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4194,7 +4194,7 @@ ul.faq-q > li textarea {
|
|||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 10px;
|
||||
.last-team-name {
|
||||
.last-team-name-span {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 32px;
|
||||
|
|
@ -4213,6 +4213,7 @@ ul.faq-q > li textarea {
|
|||
content: none;
|
||||
}
|
||||
}
|
||||
&.has-arrow {
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
|
|
@ -4220,6 +4221,7 @@ ul.faq-q > li textarea {
|
|||
height: 16px;
|
||||
background:url(/com/img/common/icon/ico_category_arrow.png) no-repeat 14px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,473 +1,120 @@
|
|||
/* ----------------------------------
|
||||
|
||||
Name : common.js
|
||||
Categorie : 적응형 레이아웃의 공통기능을 위한 js
|
||||
Author : 이상혁
|
||||
Version : v.1.0
|
||||
Created : 2020-03-02
|
||||
Last update : 2020-03-02
|
||||
|
||||
-------------------------------------*/
|
||||
|
||||
/*==============================================================*/
|
||||
// browser 체크 시작
|
||||
/*==============================================================*/
|
||||
var isMobile = false;
|
||||
var isiPhoneiPad = false;
|
||||
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
isMobile = true;
|
||||
let xhr;
|
||||
if(window.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else {
|
||||
// IE5, IE6 일때
|
||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
||||
isiPhoneiPad = true;
|
||||
}
|
||||
/*==============================================================*/
|
||||
// browser 체크 끝
|
||||
/*==============================================================*/
|
||||
function onClickBtnViewOnMap() {
|
||||
const projectMasterCompanyName = '${mbr.projectMasterCompanyName}';
|
||||
let projectCode = '${mbr.ProjectCode}';
|
||||
|
||||
/*==============================================================*/
|
||||
// 메뉴 사이즈 및 포지션 체크 시작
|
||||
/*==============================================================*/
|
||||
function SetMegamenuPosition() {
|
||||
if ($(window).width() > 991) {
|
||||
setTimeout(function () {
|
||||
// var totalHeight = $('nav.navbar').outerHeight();
|
||||
var totalHeight = $('navbar-collapse-wrapper').outerHeight(); // 시추 상단 메뉴 2뎁스 포지션을 구하기 위한 1뎁스 높이값
|
||||
$('.mega-menu').css({top: totalHeight});
|
||||
if ($('.navbar-brand-top').length === 0)
|
||||
$('.dropdown.simple-dropdown > .dropdown-menu').css({top: totalHeight});
|
||||
}, 200);
|
||||
} else {
|
||||
$('.mega-menu').css('top', '');
|
||||
$('.dropdown.simple-dropdown > .dropdown-menu').css('top', '');
|
||||
}
|
||||
let minX = Number('${mbr.v_min_x}');
|
||||
let minY = Number('${mbr.v_min_y}');
|
||||
let maxX = Number('${mbr.v_max_x}');
|
||||
let maxY = Number('${mbr.v_max_y}');
|
||||
|
||||
|
||||
|
||||
|
||||
const gl = document.getElementById('gl-district').value;
|
||||
const gm = document.getElementById('gm-district').value;
|
||||
const gs = document.getElementById('gs-district').value;
|
||||
const gf = document.getElementById('gf-district').value;
|
||||
const lastTeamName = document.getElementById('last-team-name').value;
|
||||
|
||||
openMap('${sessionScope.USERID}','${cls}', gl, gm, gs, gf, lastTeamName, projectMasterCompanyName, maxX-minX, maxY-minY);
|
||||
}
|
||||
|
||||
// page title space
|
||||
function setPageTitleSpace() {
|
||||
if ($('.navbar').hasClass('navbar-top') || $('nav').hasClass('navbar-fixed-top')) {
|
||||
if ($('.top-space').length > 0) {
|
||||
// var top_space_height = $('.navbar').outerHeight();
|
||||
var top_space_height = $('.navbar-collapse-wrapper').outerHeight(); // 시추 상단 메뉴 2뎁스 포지션을 구하기 위한 1뎁스 높이값
|
||||
if ($('.top-header-area').length > 0) {
|
||||
top_space_height = top_space_height + $('.top-header-area').outerHeight();
|
||||
}
|
||||
$('.top-space').css('margin-top', top_space_height + "px");
|
||||
function openMap(userid,cls, gl = null, gm = null, gs = null, gf = null, lastTeamName = null, projectMasterCompanyName = null, positionX= null, positionY= null)
|
||||
{
|
||||
win = 'map';
|
||||
sizeX=window.screen.width;
|
||||
sizeY=window.screen.height;
|
||||
|
||||
let userArea = projectMasterCompanyName;
|
||||
if( userArea == null ) {
|
||||
if( userid === 't3-1' ) {
|
||||
userArea = "충청남도";
|
||||
} else if( userid === 't3-2' ) {
|
||||
userArea = "부산광역시";
|
||||
}
|
||||
}
|
||||
var mapWin = window.open("/map/mapMain.do?userArea=" + encodeURIComponent(userArea) + "&gl=" + gl + "&gm=" + gm + "&gs=" + gs + "&gf=" + gf + "&lastTeamName=" + lastTeamName + "&positionX=" + positionX + "&positionY=" + positionY + "#tab_1_1","mapWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY + ",left=0,top=0");
|
||||
mapWin.focus();
|
||||
}
|
||||
/*==============================================================*/
|
||||
// 메뉴 사이즈 및 포지션 체크 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// sticky nav 시작
|
||||
/*==============================================================*/
|
||||
$(window).on("scroll", init_scroll_navigate);
|
||||
function init_scroll_navigate() {
|
||||
|
||||
var headerHeight = $('nav').outerHeight();
|
||||
if (!$('header').hasClass('no-sticky')) {
|
||||
if ($(document).scrollTop() >= headerHeight) {
|
||||
$('header').addClass('sticky');
|
||||
|
||||
} else if ($(document).scrollTop() <= headerHeight) {
|
||||
$('header').removeClass('sticky');
|
||||
setTimeout(function () {
|
||||
setPageTitleSpace();
|
||||
}, 500);
|
||||
}
|
||||
SetMegamenuPosition();
|
||||
}
|
||||
|
||||
function trim(str) {
|
||||
str = String(str);
|
||||
return str.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
/*==============================================================*/
|
||||
// sticky nav 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// 메인비쥬얼 (parallax) 시작
|
||||
/*==============================================================*/
|
||||
function stellarParallax() {
|
||||
if ($(window).width() > 1024) {
|
||||
$.stellar();
|
||||
} else {
|
||||
$.stellar('destroy');
|
||||
$('.parallax').css('background-position', '');
|
||||
function departments() {
|
||||
|
||||
if(typeof XMLHttpRequest != 'undefined'){
|
||||
xhr = new XMLHttpRequest();
|
||||
}
|
||||
}
|
||||
/*==============================================================*/
|
||||
// 메인비쥬얼 (parallax) 끝
|
||||
/*==============================================================*/
|
||||
xhr.open('GET', '/drilling/input/departments.do', true);
|
||||
xhr.setRequestHeader('Content-type', 'application/json');
|
||||
|
||||
/*==============================================================*/
|
||||
// full screen 시작
|
||||
/*==============================================================*/
|
||||
function fullScreenHeight() {
|
||||
var element = $(".full-screen");
|
||||
var $minheight = $(window).height();
|
||||
element.parents('section').imagesLoaded(function () {
|
||||
if ($(".top-space .full-screen").length > 0)
|
||||
{
|
||||
var $headerheight = $("header nav.navbar").outerHeight();
|
||||
$(".top-space .full-screen").css('min-height', $minheight - $headerheight);
|
||||
} else {
|
||||
element.css('min-height', $minheight);
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
// 요청 성공 시 처리
|
||||
const obj = JSON.parse(xhr.responseText);
|
||||
console.log('%o', obj);
|
||||
|
||||
var lastTeamName = "";
|
||||
|
||||
if( obj.data.glDistrict != null ) {
|
||||
document.getElementById('gl-district').value = obj.data.glDistrict;
|
||||
lastTeamName = obj.data.glDistrict;
|
||||
}
|
||||
});
|
||||
|
||||
var minwidth = $(window).width();
|
||||
$(".full-screen-width").css('min-width', minwidth);
|
||||
}
|
||||
/*==============================================================*/
|
||||
// full screen 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// RESIZE 될때마다 함수적용 시작
|
||||
/*==============================================================*/
|
||||
function SetResizeContent() {
|
||||
SetMegamenuPosition();
|
||||
setPageTitleSpace();
|
||||
stellarParallax();
|
||||
fullScreenHeight();
|
||||
}
|
||||
/*==============================================================*/
|
||||
// RESIZE 될때마다 함수적용 시작
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// RESIZE 시작
|
||||
/*==============================================================*/
|
||||
$(window).resize(function (event) {
|
||||
setTimeout(function () {
|
||||
SetResizeContent();
|
||||
}, 500);
|
||||
event.preventDefault();
|
||||
});
|
||||
/*==============================================================*/
|
||||
// RESIZE 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// READY 시작
|
||||
/*==============================================================*/
|
||||
$(document).ready(function () {
|
||||
|
||||
SetResizeContent();
|
||||
|
||||
// HTML 전용 현재 메뉴에 대한 활성 클래스
|
||||
var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
|
||||
var $hash = window.location.hash.substring(1);
|
||||
|
||||
if ($hash) {
|
||||
$hash = "#" + $hash;
|
||||
pgurl = pgurl.replace($hash, "");
|
||||
} else {
|
||||
pgurl = pgurl.replace("#", "");
|
||||
if( obj.data.gmDistrict != null ) {
|
||||
document.getElementById('gm-district').value = obj.data.gmDistrict;
|
||||
lastTeamName = obj.data.gmDistrict;
|
||||
}
|
||||
if( obj.data.gsDistrict != null ) {
|
||||
document.getElementById('gs-district').value = obj.data.gsDistrict;
|
||||
lastTeamName = obj.data.gsDistrict;
|
||||
}
|
||||
if( obj.data.gfDistrict != null ) {
|
||||
document.getElementById('gf-district').value = obj.data.gfDistrict;
|
||||
lastTeamName = obj.data.gfDistrict;
|
||||
}
|
||||
|
||||
$(".nav li a").each(function () {
|
||||
if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') {
|
||||
$(this).parent().addClass("active");
|
||||
$(this).parents('li.dropdown').addClass("active");
|
||||
// 가장 마지막 이름을 알아내야 함.
|
||||
document.getElementById('last-team-name').value = lastTeamName;
|
||||
|
||||
if( typeof callbackDepartments !== 'undefined' ) {
|
||||
callbackDepartments();
|
||||
}
|
||||
});
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 150)
|
||||
$('.scroll-top-arrow').fadeIn('slow');
|
||||
else
|
||||
$('.scroll-top-arrow').fadeOut('slow');
|
||||
});
|
||||
// 페이지 스크롤 top 버튼
|
||||
$('.scroll-top-arrow').on('click', function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 800);
|
||||
return false;
|
||||
});
|
||||
|
||||
/*==============================================================
|
||||
// wow animation - on scroll 시작
|
||||
==============================================================*/
|
||||
var wow = new WOW({
|
||||
boxClass: 'wow',
|
||||
animateClass: 'animated',
|
||||
offset: 0,
|
||||
mobile: false,
|
||||
live: true
|
||||
});
|
||||
$(window).imagesLoaded(function () {
|
||||
wow.init();
|
||||
});
|
||||
/*==============================================================
|
||||
// wow animation - on scroll 끝
|
||||
==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// 오른쪽 sidebar 시작
|
||||
/*==============================================================*/
|
||||
var menuRight = document.getElementById('cbp-spmenu-s2'),
|
||||
showRightPush = document.getElementById('showRightPush'),
|
||||
body = document.body;
|
||||
if (showRightPush) {
|
||||
showRightPush.onclick = function () {
|
||||
classie.toggle(this, 'active');
|
||||
if (menuRight)
|
||||
classie.toggle(menuRight, 'cbp-spmenu-open');
|
||||
} else if (xhr.readyState === 4) {
|
||||
// 요청 실패 시 처리
|
||||
console.error('요청 실패:', xhr.status);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var test = document.getElementById('close-pushmenu');
|
||||
if (test) {
|
||||
test.onclick = function () {
|
||||
classie.toggle(this, 'active');
|
||||
if (menuRight)
|
||||
classie.toggle(menuRight, 'cbp-spmenu-open');
|
||||
};
|
||||
}
|
||||
/*==============================================================*/
|
||||
// 오른쪽 sidebar 끝
|
||||
/*==============================================================*/
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
/*==============================================================*/
|
||||
// magnificPopup 시작
|
||||
/*==============================================================*/
|
||||
function ScrollStop() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function ScrollStart() {
|
||||
return true;
|
||||
}
|
||||
|
||||
$('.header-search-form').magnificPopup({
|
||||
mainClass: 'mfp-fade',
|
||||
closeOnBgClick: true,
|
||||
preloader: false,
|
||||
|
||||
fixedContentPos: false,
|
||||
closeBtnInside: false,
|
||||
callbacks: {
|
||||
open: function () {
|
||||
setTimeout(function () {
|
||||
$('.search-input').focus();
|
||||
}, 500);
|
||||
$('#search-header').parent().addClass('search-popup');
|
||||
if (!isMobile) {
|
||||
$('body').addClass('overflow-hidden');
|
||||
function toggleClass(element, className) {
|
||||
if (element.className) {
|
||||
if (element.className.indexOf(className) >= 0) {
|
||||
element.className = element.className.replace(className, '').trim();
|
||||
} else {
|
||||
$('body, html').on('touchmove', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
element.className += ' ' + className;
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
if (!isMobile) {
|
||||
$('body').removeClass('overflow-hidden');
|
||||
$('#search-header input[type=text]').each(function (index) {
|
||||
if (index == 0) {
|
||||
$(this).val('');
|
||||
$("#search-header").find("input:eq(" + index + ")").css({ "border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)" });
|
||||
}
|
||||
});
|
||||
document.onmousewheel = ScrollStart;
|
||||
} else {
|
||||
$('body, html').unbind('touchmove');
|
||||
element.className = className;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.header-menu-all').magnificPopup({
|
||||
mainClass: 'mfp-fade',
|
||||
closeOnBgClick: true,
|
||||
preloader: false,
|
||||
|
||||
fixedContentPos: false,
|
||||
closeBtnInside: false,
|
||||
callbacks: {
|
||||
open: function () {
|
||||
$('#menu-all').parent().addClass('menu-all-popup-content');
|
||||
if (!isMobile) {
|
||||
$('body').addClass('overflow-hidden menu-all-popup-wrapper');
|
||||
} else {
|
||||
$('body, html').on('touchmove', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
if (!isMobile) {
|
||||
$('body').removeClass('overflow-hidden menu-all-popup-wrapper');
|
||||
document.onmousewheel = ScrollStart;
|
||||
} else {
|
||||
$('body, html').unbind('touchmove');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.login-btn').magnificPopup({
|
||||
mainClass: 'mfp-fade',
|
||||
closeOnBgClick: false,
|
||||
preloader: false,
|
||||
fixedContentPos: false,
|
||||
closeBtnInside: true,
|
||||
showCloseBtn: true,
|
||||
callbacks: {
|
||||
open: function () {
|
||||
var accountTypeWrapperEle = document.getElementById("account-type-wrapper");
|
||||
accountTypeWrapperEle.style.display="block";
|
||||
var signinWrapperEle = document.getElementById("signin-wrapper");
|
||||
signinWrapperEle.style.display="none";
|
||||
var signInPrefix = document.getElementById("sign-in-prefix");
|
||||
signInPrefix.innerHTML = '';
|
||||
|
||||
// 로그인 팝업 뒤로가기 버튼
|
||||
var mfpBackButton = document.getElementById("mfp-back");
|
||||
mfpBackButton.style.display = "none";
|
||||
|
||||
$('#login').parent().addClass('login-popup-content');
|
||||
if (!isMobile) {
|
||||
$('body').addClass('overflow-hidden login-popup-wrapper');
|
||||
} else {
|
||||
$('body, html').on('touchmove', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
if (!isMobile) {
|
||||
$('body').removeClass('overflow-hidden login-popup-wrapper');
|
||||
document.onmousewheel = ScrollStart;
|
||||
} else {
|
||||
$('body, html').unbind('touchmove');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.temp-password-btn').magnificPopup({
|
||||
mainClass: 'mfp-fade',
|
||||
closeOnBgClick: true,
|
||||
preloader: false,
|
||||
|
||||
fixedContentPos: false,
|
||||
closeBtnInside: false,
|
||||
callbacks: {
|
||||
open: function () {
|
||||
$('#tempPassword').parent().addClass('temp-password-popup-content');
|
||||
if (!isMobile) {
|
||||
$('body').addClass('overflow-hidden temp-password-popup-wrapper');
|
||||
} else {
|
||||
$('body, html').on('touchmove', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
if (!isMobile) {
|
||||
$('body').removeClass('overflow-hidden temp-password-popup-wrapper');
|
||||
document.onmousewheel = ScrollStart;
|
||||
} else {
|
||||
$('body, html').unbind('touchmove');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.status-btn').magnificPopup({
|
||||
mainClass: 'mfp-fade',
|
||||
closeOnBgClick: true,
|
||||
preloader: false,
|
||||
|
||||
fixedContentPos: false,
|
||||
closeBtnInside: false,
|
||||
callbacks: {
|
||||
open: function () {
|
||||
$('#status-id').parent().addClass('status-popup-content');
|
||||
if (!isMobile) {
|
||||
$('body').addClass('overflow-hidden status-popup-wrapper');
|
||||
} else {
|
||||
$('body, html').on('touchmove', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
if (!isMobile) {
|
||||
$('body').removeClass('overflow-hidden status-popup-wrapper');
|
||||
document.onmousewheel = ScrollStart;
|
||||
} else {
|
||||
$('body, html').unbind('touchmove');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.mfp-popup-close').click(function() {
|
||||
$.magnificPopup.close();
|
||||
});
|
||||
/*==============================================================*/
|
||||
// magnificPopup 끝
|
||||
/*==============================================================*/
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
departments();
|
||||
});
|
||||
/*==============================================================*/
|
||||
// READY 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// Page Load 시작
|
||||
/*==============================================================*/
|
||||
$(window).load(function () {
|
||||
var hash = window.location.hash.substr(1);
|
||||
if (hash != "") {
|
||||
setTimeout(function () {
|
||||
$(window).imagesLoaded(function () {
|
||||
var scrollAnimationTime = 1200,
|
||||
scrollAnimation = 'easeInOutExpo';
|
||||
var target = '#' + hash;
|
||||
if ($(target).length > 0) {
|
||||
|
||||
$('html, body').stop()
|
||||
.animate({
|
||||
'scrollTop': $(target).offset().top
|
||||
}, scrollAnimationTime, scrollAnimation, function () {
|
||||
window.location.hash = target;
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 메인에서만 카운트
|
||||
$('.main .timer').countTo({
|
||||
//from: 50,
|
||||
//to: 2500,
|
||||
//speed: 1000,
|
||||
refreshInterval: 50,
|
||||
formatter: function (value, options) {
|
||||
return value.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,'); // 숫자 3자리 마다 콤마
|
||||
},
|
||||
onUpdate: function (value) {
|
||||
console.debug(this);
|
||||
},
|
||||
onComplete: function (value) {
|
||||
console.debug(this);
|
||||
}
|
||||
});
|
||||
});
|
||||
/*==============================================================*/
|
||||
// Page Load 끝
|
||||
/*==============================================================*/
|
||||
|
||||
/*==============================================================*/
|
||||
// 커스텀 시작
|
||||
/*==============================================================*/
|
||||
// 메뉴 가로사이즈 제한시 position:fixed 가로 스크롤
|
||||
$(window).scroll(function() {
|
||||
$('.navbar-fixed-top').css({left: 0 - $(this).scrollLeft()});
|
||||
});
|
||||
/*==============================================================*/
|
||||
// 커스텀 끝
|
||||
/*==============================================================*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue