2024-09-05 18:15 코드 관리
This commit is contained in:
parent
d3664c4b64
commit
5b14cfff36
@ -92,12 +92,24 @@ public class CodeController {
|
||||
}
|
||||
|
||||
log.warn(">>>>>>>>params2<<<<<<<<<"+params);
|
||||
if("ajax".equals(pageName)){
|
||||
if("Exam".equals(pageFolder)
|
||||
&& "ajax".equals(pageName)
|
||||
&& "BBsInfo".equals(pageAction)
|
||||
){
|
||||
EgovMap params1 = new EgovMap();
|
||||
params1.put("data", params.get("data"));
|
||||
|
||||
mavjson.addAllObjects(params1);
|
||||
//System.out.println(params);
|
||||
return mavjson;
|
||||
|
||||
}else if("ajax".equals(pageName)){
|
||||
log.warn("===================[[ ajax! ]]=================");
|
||||
|
||||
|
||||
params.remove("simpleCaptcha");
|
||||
mavjson.addAllObjects(params);
|
||||
//System.out.println(params);
|
||||
return mavjson;
|
||||
}else{
|
||||
mav.addAllObjects(params);
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
<script src="/js/jquery.form.js"></script>
|
||||
<script src="/js/commonFileUtil.js"></script>
|
||||
<script src="/js/common_XHR.js"></script>
|
||||
<script src="/js/common_XHR.js?3"></script>
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/DateTimePicker.js"></script>
|
||||
<script src="/js/jquery.selectboxes.js"></script>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
@ -11,6 +12,7 @@
|
||||
<link href='/site/ntcc/css/gtmCustom.css' rel='stylesheet' type='text/css'/>
|
||||
|
||||
<script src="/editor/webnote.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-title-wrap clear">
|
||||
@ -216,11 +218,14 @@
|
||||
|
||||
XHR2(url, param, function(r){
|
||||
var html2 = "";
|
||||
|
||||
if(r.data.length != 0){
|
||||
$("#examTypeSell").empty();
|
||||
|
||||
$.each(r.data, function(k,v){
|
||||
html2 += '<option name=search value='+v.value+'>'+v.value+'</option>';
|
||||
})
|
||||
|
||||
$("#examTypeSell").append(html2);
|
||||
}
|
||||
})
|
||||
|
||||
@ -2,6 +2,70 @@
|
||||
* jQuery AJAX
|
||||
*/
|
||||
function XHR(url, data, callbackFunc, exceptionFunc , localStartFunc , localEndFunc){
|
||||
$.blockUI({ message : '<h1><img src="/img/blockbusy.gif" /> 잠시만 기다려주세요.</h1>' });
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
//data: data + "&IS_AJAX_REQUEST=IS_AJAX_REQUEST",
|
||||
contentType: 'application/x-www-form-urlencoded; charset=utf-8',
|
||||
data: data,
|
||||
async: true,
|
||||
cache: false,
|
||||
success: function (data, textStatus) {
|
||||
var result;
|
||||
try{
|
||||
console.log(data);
|
||||
result = eval('(' + data + ')');
|
||||
}catch(ex){
|
||||
$.unblockUI();
|
||||
alert(ex);
|
||||
}
|
||||
if( typeof(result) == 'object' ){ // JSON 오프젝트로 받음(리턴값이 JSON이거나 Exception 발생시)
|
||||
|
||||
if(result._EXCEPTION_){
|
||||
if(exceptionFunc){ // 익셉션 처리 함수가 있으면
|
||||
$.unblockUI();
|
||||
exceptionFunc(result._EXCEPTION_);
|
||||
}else{
|
||||
$.unblockUI();
|
||||
_processException(result._EXCEPTION_);
|
||||
}
|
||||
}else if(result._SESSION_OUT_){ // 세션 아웃 처리
|
||||
alert(result._SESSION_OUT_.message);
|
||||
if(result._SESSION_OUT_.redirectUrl !=""){
|
||||
$.unblockUI();
|
||||
parent.location.href= redirectUrl;
|
||||
}
|
||||
}else{
|
||||
if(callbackFunc){ // 익셉션이 아니고 callback 펑션이 있을때.
|
||||
$.unblockUI();
|
||||
callbackFunc(result);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(callbackFunc){ // HTML 형식의 리턴이며 callback 펑션이 있을때.
|
||||
$.unblockUI();
|
||||
callbackFunc(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeSend : function(){ // 로컬 이벤트 , 시작
|
||||
if(localStartFunc){
|
||||
$.unblockUI();
|
||||
localStartFunc();
|
||||
}
|
||||
},
|
||||
complete: function(){ // 로컬 이벤트 , 끝
|
||||
if(localEndFunc){
|
||||
$.unblockUI();
|
||||
localEndFunc();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function XHR_OLD(url, data, callbackFunc, exceptionFunc , localStartFunc , localEndFunc){
|
||||
$.blockUI({ message : '<h1><img src="/img/blockbusy.gif" /> 잠시만 기다려주세요.</h1>' });
|
||||
jQuery.ajax({
|
||||
url: url,
|
||||
@ -67,6 +131,83 @@
|
||||
|
||||
//비동기 false
|
||||
function XHR2(url, data, callbackFunc, exceptionFunc , localStartFunc , localEndFunc){
|
||||
$.blockUI({ message : '<h1><img src="/img/blockbusy.gif" /> 잠시만 기다려주세요.</h1>' });
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
//data: data + "&IS_AJAX_REQUEST=IS_AJAX_REQUEST",
|
||||
contentType: 'application/x-www-form-urlencoded; charset=utf-8',
|
||||
data: data,
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function (data, textStatus) {
|
||||
var result;
|
||||
try{
|
||||
//시큐어코딩 관련 session이 들어가 있으면 신텍스 에러나기 떄문에 삭제
|
||||
/* data = data.replace('"SpringSecurityFiltersecurityinterceptorFilterapplied":true,','');
|
||||
data = data.replace('"SpringSecuritySessionMgmtFilterApplied":true,','');
|
||||
data = data.replace('"springSecurityContext":org.springframework.security.core.context.SecurityContextImpl@689a8480: Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@689a8480: Principal: soattorney; Credentials: [PROTECTED]; Authenticated: true; Details: seed.security.SecurityUserDetails@b15278a; Granted Authorities: ROLE_USER,','');
|
||||
data = data.replace('"springSecurityContext":org.springframework.security.core.context.SecurityContextImpl@7ef97b48: Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@7ef97b48: Principal: soattorney; Credentials: [PROTECTED]; Authenticated: true; Details: seed.security.SecurityUserDetails@1d76d842; Granted Authorities: ROLE_USER,','');
|
||||
data = data.replace('"SpringSecurityScpfApplied":true,','');
|
||||
data = data.replace('"springSecurityContext":org.springframework.security.core.context.SecurityContextImpl@e3239a3: Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@e3239a3: Principal: soattorney; Credentials: [PROTECTED]; Authenticated: true; Details: seed.security.SecurityUserDetails@6dbd9aa9; Granted Authorities: ROLE_USER,','');
|
||||
*/
|
||||
|
||||
//20191004 주석.
|
||||
//console.log(data);
|
||||
|
||||
result = eval('(' + data + ')');
|
||||
|
||||
}catch(ex){
|
||||
$.unblockUI();
|
||||
alert(ex);
|
||||
}
|
||||
if( typeof(result) == 'object' ){ // JSON 오프젝트로 받음(리턴값이 JSON이거나 Exception 발생시)
|
||||
|
||||
if(result._EXCEPTION_){
|
||||
if(exceptionFunc){ // 익셉션 처리 함수가 있으면
|
||||
exceptionFunc(result._EXCEPTION_);
|
||||
$.unblockUI();
|
||||
}else{
|
||||
_processException(result._EXCEPTION_);
|
||||
$.unblockUI();
|
||||
}
|
||||
}else if(result._SESSION_OUT_){ // 세션 아웃 처리
|
||||
alert(result._SESSION_OUT_.message);
|
||||
if(result._SESSION_OUT_.redirectUrl !=""){
|
||||
$.unblockUI();
|
||||
parent.location.href= redirectUrl;
|
||||
}
|
||||
}else{
|
||||
if(callbackFunc){ // 익셉션이 아니고 callback 펑션이 있을때.
|
||||
$.unblockUI();
|
||||
callbackFunc(result);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(callbackFunc){ // HTML 형식의 리턴이며 callback 펑션이 있을 때.
|
||||
$.unblockUI();
|
||||
callbackFunc(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeSend : function(){ // 로컬 이벤트, 시작
|
||||
if(localStartFunc){
|
||||
$.unblockUI();
|
||||
localStartFunc();
|
||||
}
|
||||
},
|
||||
complete: function(){ // 로컬 이벤트, 끝
|
||||
if(localEndFunc){
|
||||
$.unblockUI();
|
||||
localEndFunc();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//비동기 false
|
||||
function XHR2_OLD(url, data, callbackFunc, exceptionFunc , localStartFunc , localEndFunc){
|
||||
// $.blockUI({ message : '<h1><img src="/img/blockbusy.gif" /> 잠시만 기다려주세요.</h1>' });
|
||||
jQuery.ajax({
|
||||
url: url,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user