Merge branch 'jsp'
This commit is contained in:
commit
d4ec0065e7
@ -485,6 +485,43 @@ public class AddrController {
|
|||||||
return "/web/addr/AddrListPrint";
|
return "/web/addr/AddrListPrint";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주소록 상세정보 ajax
|
||||||
|
* @param addrCheck
|
||||||
|
* @param request
|
||||||
|
* @param addrVO
|
||||||
|
* @param model
|
||||||
|
* @param redirectAttributes
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping("/web/mjon/addr/selectAddrDetailAjax.do")
|
||||||
|
public ModelAndView selectAddrDetailAjax(HttpServletRequest request,
|
||||||
|
AddrVO addrVO, Model model) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
|
modelAndView.setViewName("jsonView");
|
||||||
|
|
||||||
|
boolean isSuccess = true;
|
||||||
|
String msg = "";
|
||||||
|
AddrVO addrInfo = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
addrInfo = addrService.selectAddrDetail(addrVO);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
isSuccess = false;
|
||||||
|
msg = e.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
modelAndView.addObject("isSuccess", isSuccess);
|
||||||
|
modelAndView.addObject("msg", msg);
|
||||||
|
modelAndView.addObject("addrInfo", addrInfo);
|
||||||
|
|
||||||
|
return modelAndView;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -214,12 +214,32 @@ function copyAddr() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//메모 레이어 열 때 메모 데이터 전달
|
//메모 레이어 열 때 메모 데이터 전달
|
||||||
function memoOpen(comment, id) {
|
function memoOpen(id) {
|
||||||
var form = document.addrMemoForm;
|
var form = document.addrMemoForm;
|
||||||
form.addrCheck.value=id;
|
form.addrCheck.value=id;
|
||||||
$('#textareaMemo').text(comment);
|
|
||||||
|
|
||||||
|
// 메모내용 가져오기
|
||||||
|
$.ajax({
|
||||||
|
url : "<c:url value='/web/mjon/addr/selectAddrDetailAjax.do'/>",
|
||||||
|
type : 'POST',
|
||||||
|
data : {"addrId" : id},
|
||||||
|
dataType:'json',
|
||||||
|
async: false,
|
||||||
|
success : function(data, status){
|
||||||
|
if(data.isSuccess == true) {
|
||||||
|
$('#textareaMemo').text(data.addrInfo.addrComment);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//alert("Message : " + msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
console.log("ERROR : ", e);
|
||||||
|
alert("에러가 발생했습니다.");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 메모 저장
|
// 메모 저장
|
||||||
function updateMemo() {
|
function updateMemo() {
|
||||||
var form = document.addrMemoForm;
|
var form = document.addrMemoForm;
|
||||||
@ -768,7 +788,7 @@ function setAddrDupliClose() {
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button type="button" onclick="memoOpen('<c:out value='${result.addrComment}' />','<c:out value='${result.addrId}' />'); return false;" data-tooltip="adr_popup13">
|
<button type="button" onclick="memoOpen('<c:out value="${result.addrId}" />'); return false;" data-tooltip="adr_popup13">
|
||||||
<img src="/publish/images/content/memo_img.png" alt="메모">
|
<img src="/publish/images/content/memo_img.png" alt="메모">
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user