1$(document).ready(function () { 2 3 // ì½ê´ 보기 4 $('.btn-show-layer').on('click', function(){ 5 var key = $(this).data('key'); 6 showCenterLayer(".agree-pop-layer[data-key='"+key+"']"); 7 }); 8 9 // ì ì²´ ì²´í¬ 10 var allAgree = new AllChk('.join_check_all .check_all', '.join_check_all .check_item'); 11 12 /** 13 * Blur ì ì í¨ì± ì²´í¬ê° íìí íëª©ë¤ ì²ë¦¬ 14 */ 15 $("form#join-form [name='member_id']").on('blur', function () { 16 chkValidate('member_id', $(this)); 17 }); 18 19 $("form#join-form [name='member_email']").on('blur', function () { 20 chkValidate('member_email', $(this)); 21 }); 22 23 $("form#join-form [name='member_name']").on('blur', function () { 24 chkValidate('member_name', $(this)); 25 }); 26 27 $("form#join-form [name='member_phone']").on('blur', function () { 28 chkValidate('member_phone', $(this)); 29 }); 30 31 $("form#join-form [name='member_address[zipcode]'], [name='member_address[base]']").on('blur', function () { 32 chkValidate('member_address', $("form#join-form [name='member_address[base]']")); 33 }); 34 35 $("form#join-form [name='member_address[detail]']").on('blur', function () { 36 chkValidate('member_address', $(this)); 37 }); 38 39 $("form#join-form [name^='member_add[input][']").on('blur', function () { 40 chkValidate('member_add', $(this)); 41 }); 42 43 // 주ì ê²ì 44 $(document).on('click', '#btn-search-address, #input-zipcode, #input-street', function() { 45 var daumPostElement = $('#daum_post_element').get(0); 46 new daum.Postcode({ 47 width: '100%', 48 oncomplete: function(data) { 49 var address = getAddress(data); 50 $("input[name='member_address[state]']").val(address.state || ''); 51 $("input[name='member_address[city]']").val(address.city || ''); 52 $("input[name='member_address[zipcode]']").val(address.zipcode || ''); 53 $("input[name='member_address[street]']").val(address.street || ''); 54 $("#input-street").val(address.streetFull || ''); 55 hideCenterLayer(); 56 } 57 }).embed(daumPostElement, { 58 q: "", 59 autoClose: false, 60 }); 61 62 // embed를 íµí´ 먼ì ë ì´ì´ íì ì 그린 ë¤, show íëë¡ í¨ 63 showCenterLayer("#daumPostWrapElement[data-key='daum_post']"); 64 }); 65 66}); 67 68/** 69 * ê°ì í목 ì í¨ì± ì²´í¬ ( ë기í Ajax ) 70 */ 71function chkValidate(type, obj, focus) 72{ 73 let params = {}; 74 let name = $(obj).attr("name"); 75 let value = $(obj).val(); 76 params[name] = value; 77 if (type === 'member_pw_confirm'){ 78 name = $("form#join-form [name='member_pw']").attr("name"); 79 value = $("form#join-form [name='member_pw']").val(); 80 params[name] = value; 81 } 82 $.ajaxSetup({'async':false}); 83 var result = false;
84 var url = '/members/check'; 85 $.post(url, params, function (res) { 86 if (res.result) { 87 result = true; 88 showMsg($(obj), res.result_msg, 'success'); 89 } else{ 90 showMsg($(obj), res.error, 'warn'); 91 if(typeof focus === 'boolean' && focus === true) { 92 $(obj).focus(); 93 } 94 } 95 }); 96 $.ajaxSetup({'async':true}); 97 98 return result; 99} 100 101/** 102 * ì¤ë¥ ë©ìì§ íì 103 * @param {object} $obj 104 * @param {string|null} message 105 * @param {'warn'|'success'} type 106 */ 107function showMsg($obj, message, type) { 108 var notify = $obj.closest('.form_items').find('p.form_msg'); 109 if(type === 'success') { 110 notify.removeClass('warn'); 111 notify.addClass('success'); 112 } else { 113 notify.removeClass('success'); 114 notify.addClass('warn'); 115 } 116 if(typeof message === 'string') { 117 notify.find('span').text(message); 118 notify.show(); 119 } else { 120 notify.hide(); 121 } 122} 123 124/** 125 ì ì²´ ì²´í¬ 126 í¨ì í¸ì¶ : var variable = new AllChk('모ë ì²´í¬ í´ëì¤ëª ', 'ì²´í¬ë í´ëì¤ëª '); 127*/ 128function AllChk(all, chk){ 129 this.allCtrl(all, chk); 130 this.chkCtrl(all, chk); 131} 132AllChk.prototype.allCtrl = function (all, chk) { 133 $(all).off().on('click', function () { 134 $(chk).prop('checked', $(this).prop('checked')); 135 }); 136}; 137AllChk.prototype.chkCtrl = function (all, chk) { 138 $(chk).off().on('click', function(){ 139 140 if ( $(chk).filter(':checked').length === $(chk).length ) { 141 $(all).prop('checked', true); 142 } else { 143 $(all).prop('checked', false); 144 } 145 }); 146}; 147 148 149/** 150 * ì¸ì¦ ê´ë ¨ ì½ë°± í¨ì 151 */ 152var certifiedCallbackFunction = { 153 "owner_cert": { 154 "after_send": function () { 155 $("input[name='member_phone']").prop('readonly', true); 156 }, 157 "reset": function () { 158 $("input[name='member_phone']").prop('readonly', false); 159 }, 160 "after_confirm": function (data) { 161 hideCenterLayer(); 162 $("input[name='member_phone']").val(data.owner_cert.certified_target); 163 $("input[name='member_phone']").prop('readonly', true); 164 $("input[name='member_phone']").prop('disabled', false); 165 }, 166 }, 167 "sms_kcp": { 168 "after_receive": function (frm) { 169 hideCenterLayer(); 170 let objForm = $(frm); 171 172 let userName = objForm.find('input[name="user_name"]').val(); 173 let phoneNo = objForm.find('input[name="phone_no"]').val(); 174 175 $("input[name='member_name']").val(userName); 176 $("input[name='member_name']").prop('readonly', true); 177 $("input[name='member_name']").prop('disabled', false); 178 179 $("input[name='member_phone']").val(phoneNo); 180 $("input[name='member_phone']").prop('readonly', true); 181 $("input[name='member_phone']").prop('disabled', false); 182 } 183 }, 184};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.