You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
5.7 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. /**********************************************************************************************************************
  2. * 회원정보 팝업
  3. *********************************************************************************************************************/
  4. APP.MEMBER.POP_INFO_ADMIN = function(mem_idx) {
  5. if( typeof mem_idx == 'undefined' || ! mem_idx ) {
  6. alert('잘못된 접근입니다.');
  7. return false;
  8. }
  9. APP.MODAL.open({
  10. width: 800,
  11. height :600,
  12. header : {
  13. title : '회원 정보'
  14. },
  15. callback : function(){
  16. APP.MODAL.close();
  17. grid.refresh();
  18. },
  19. iframe : {
  20. method : 'get',
  21. url : '/admin/members/info/' + mem_idx,
  22. param : {}
  23. }
  24. });
  25. };
  26. /**********************************************************************************************************************
  27. * 회원 비밀번호 변경 팝업
  28. *********************************************************************************************************************/
  29. APP.MEMBER.POP_PASSWORD_ADMIN = function(mem_idx) {
  30. if( typeof mem_idx == 'undefined' || ! mem_idx ) {
  31. alert('잘못된 접근입니다.');
  32. return false;
  33. }
  34. APP.MODAL.open({
  35. width: 800,
  36. height :600,
  37. header : {
  38. title : '비밀번호 변경'
  39. },
  40. callback : function(){
  41. APP.MODAL.close();
  42. grid.refresh();
  43. },
  44. iframe : {
  45. method : 'get',
  46. url : '/admin/members/password/' + mem_idx,
  47. param : {}
  48. }
  49. });
  50. };
  51. /**********************************************************************************************************************
  52. * 회원 정보수정 팝업
  53. *********************************************************************************************************************/
  54. APP.MEMBER.POP_MODIFY_ADMIN = function(mem_idx) {
  55. if( typeof mem_idx == 'undefined' || ! mem_idx ) {
  56. alert('잘못된 접근입니다.');
  57. return false;
  58. }
  59. APP.MODAL.open({
  60. width: 800,
  61. height :600,
  62. header : {
  63. title : '회원 정보 수정'
  64. },
  65. callback : function(){
  66. APP.MODAL.close();
  67. grid.refresh();
  68. },
  69. iframe : {
  70. method : 'get',
  71. url : '/admin/members/modify/' + mem_idx,
  72. param : {}
  73. }
  74. });
  75. };
  76. /**********************************************************************************************************************
  77. * 회원 포인트 정보 팝업
  78. *********************************************************************************************************************/
  79. APP.MEMBER.POP_POINT_ADMIN = function(mem_idx) {
  80. if( typeof mem_idx == 'undefined' || ! mem_idx ) {
  81. alert('잘못된 접근입니다.');
  82. return false;
  83. }
  84. APP.MODAL.open({
  85. width: 800,
  86. height :600,
  87. header : {
  88. title : '회원 포인트 관리'
  89. },
  90. callback : function(){
  91. APP.MODAL.close();
  92. grid.refresh();
  93. },
  94. iframe : {
  95. method : 'get',
  96. url : '/admin/members/point/' + mem_idx,
  97. param : {}
  98. }
  99. });
  100. };
  101. /**********************************************************************************************************************
  102. * 회원 포인트 추가 팝업
  103. *********************************************************************************************************************/
  104. APP.MEMBER.POP_POINT_FORM_ADMIN = function(mem_idx) {
  105. var mem_idx = typeof mem_idx != 'undefined' && mem_idx ? mem_idx : null;
  106. if(! mem_idx) {
  107. alert('잘못된 접근입니다.');
  108. return;
  109. }
  110. APP.MODAL2.open({
  111. width: 410,
  112. height :200,
  113. header : {
  114. title : '회원 포인트 추가'
  115. },
  116. callback : function(){
  117. APP.MODAL2.close();
  118. grid.refresh();
  119. },
  120. iframe : {
  121. method : 'get',
  122. url : '/admin/members/point_form/' + mem_idx
  123. }
  124. });
  125. };
  126. /**********************************************************************************************************************
  127. * 회원 STATUS 변경
  128. *********************************************************************************************************************/
  129. APP.MEMBER.STATUS_CHANGE = function(mem_idx, current_status, change_status) {
  130. if( typeof mem_idx == 'undefined' || ! mem_idx || typeof current_status == 'undefined' || ! current_status || typeof change_status == 'undefined' || ! change_status ) {
  131. alert(LANG.common_msg_invalid_access);
  132. return false;
  133. }
  134. var change_status_msg = '';
  135. if( change_status == 'Y' ) change_status_msg = LANG.member_status_y;
  136. else if (change_status == 'N') change_status_msg = LANG.member_status_n;
  137. else if (change_status == 'D') change_status_msg = LANG.member_status_d;
  138. else if (change_status == 'H') change_status_msg = LANG.member_status_h;
  139. else {
  140. alert(LANG.common_msg_invalid_access);
  141. return false;
  142. }
  143. if( ! confirm('해당 회원의 상태를 [' + change_status_msg + '] 상태로 변경합니까?') ) return;
  144. $.ajax({
  145. url : base_url + '/admin/ajax/members/status',
  146. type : 'POST',
  147. async : false,
  148. cache : false,
  149. data : {
  150. mem_idx : mem_idx,
  151. current_status : current_status,
  152. change_status : change_status
  153. },
  154. success:function(){
  155. toastr.success('지정한 회원의 상태를 [' + change_status_msg + '] 상태로 변경하였습니다.');
  156. grid.refresh();
  157. }
  158. })
  159. };
  160. $(function(){
  161. });