팩스 주소록 메모 수정기능 보완
@b7208fb3e3fb346dba9723af57e97be935d249bd
--- src/main/java/itn/let/fax/addr/web/FaxAddrController.java
+++ src/main/java/itn/let/fax/addr/web/FaxAddrController.java
... | ... | @@ -317,7 +317,43 @@ |
| 317 | 317 |
return "/web/fax/addr/FaxAddrListPrint"; |
| 318 | 318 |
} |
| 319 | 319 |
|
| 320 |
- |
|
| 320 |
+ /** |
|
| 321 |
+ * 주소록 상세정보 ajax |
|
| 322 |
+ * @param addrCheck |
|
| 323 |
+ * @param request |
|
| 324 |
+ * @param addrVO |
|
| 325 |
+ * @param model |
|
| 326 |
+ * @param redirectAttributes |
|
| 327 |
+ * @return |
|
| 328 |
+ * @throws Exception |
|
| 329 |
+ */ |
|
| 330 |
+ @RequestMapping("/web/mjon/fax/addr/selectFaxAddrDetailAjax.do")
|
|
| 331 |
+ public ModelAndView selectAddrDetailAjax(HttpServletRequest request, |
|
| 332 |
+ FaxAddrVO addrVO, Model model) throws Exception {
|
|
| 333 |
+ |
|
| 334 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 335 |
+ modelAndView.setViewName("jsonView");
|
|
| 336 |
+ |
|
| 337 |
+ boolean isSuccess = true; |
|
| 338 |
+ String msg = ""; |
|
| 339 |
+ FaxAddrVO addrInfo = null; |
|
| 340 |
+ |
|
| 341 |
+ try {
|
|
| 342 |
+ |
|
| 343 |
+ addrInfo = faxAddrService.selectFaxAddrDetail(addrVO); |
|
| 344 |
+ |
|
| 345 |
+ } catch (Exception e) {
|
|
| 346 |
+ isSuccess = false; |
|
| 347 |
+ msg = e.getMessage(); |
|
| 348 |
+ } |
|
| 349 |
+ |
|
| 350 |
+ modelAndView.addObject("isSuccess", isSuccess);
|
|
| 351 |
+ modelAndView.addObject("msg", msg);
|
|
| 352 |
+ modelAndView.addObject("addrInfo", addrInfo);
|
|
| 353 |
+ |
|
| 354 |
+ return modelAndView; |
|
| 355 |
+ |
|
| 356 |
+ } |
|
| 321 | 357 |
|
| 322 | 358 |
/** |
| 323 | 359 |
* 주소록 그룹 삭제 로직 ajax |
--- src/main/webapp/WEB-INF/jsp/web/fax/addr/FaxAddrListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/fax/addr/FaxAddrListAjax.jsp
... | ... | @@ -214,12 +214,32 @@ |
| 214 | 214 |
} |
| 215 | 215 |
|
| 216 | 216 |
//메모 레이어 열 때 메모 데이터 전달 |
| 217 |
-function memoOpen(comment, id) {
|
|
| 217 |
+function memoOpen(id) {
|
|
| 218 | 218 |
var form = document.addrMemoForm; |
| 219 | 219 |
form.addrCheck.value=id; |
| 220 |
- $('#textareaMemo').text(comment);
|
|
| 221 |
- |
|
| 220 |
+ |
|
| 221 |
+ // 메모내용 가져오기 |
|
| 222 |
+ $.ajax({
|
|
| 223 |
+ url : "<c:url value='/web/mjon/fax/addr/selectFaxAddrDetailAjax.do'/>", |
|
| 224 |
+ type : 'POST', |
|
| 225 |
+ data : {"addrId" : id},
|
|
| 226 |
+ dataType:'json', |
|
| 227 |
+ async: false, |
|
| 228 |
+ success : function(data, status){
|
|
| 229 |
+ if(data.isSuccess == true) {
|
|
| 230 |
+ $('#textareaMemo').text(data.addrInfo.addrComment);
|
|
| 231 |
+ } |
|
| 232 |
+ else {
|
|
| 233 |
+ //alert("Message : " + msg);
|
|
| 234 |
+ } |
|
| 235 |
+ }, |
|
| 236 |
+ error: function (e) {
|
|
| 237 |
+ console.log("ERROR : ", e);
|
|
| 238 |
+ alert("에러가 발생했습니다.");
|
|
| 239 |
+ } |
|
| 240 |
+ }); |
|
| 222 | 241 |
} |
| 242 |
+ |
|
| 223 | 243 |
// 메모 저장 |
| 224 | 244 |
function updateMemo() {
|
| 225 | 245 |
var form = document.addrMemoForm; |
... | ... | @@ -672,7 +692,7 @@ |
| 672 | 692 |
</p> |
| 673 | 693 |
</td> |
| 674 | 694 |
<td> |
| 675 |
- <button type="button" onclick="memoOpen('<c:out value='${result.addrComment}' />','<c:out value='${result.addrId}' />'); return false;" data-tooltip="adr_popup13">
|
|
| 695 |
+ <button type="button" onclick="memoOpen('<c:out value='${result.addrId}' />'); return false;" data-tooltip="adr_popup13">
|
|
| 676 | 696 |
<img src="/publish/images/content/memo_img.png" alt="메모"> |
| 677 | 697 |
</button> |
| 678 | 698 |
</td> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?