1var joinObject = { 2 3 email: null, 4 certTimer: {}, 5 selecter: {}, 6 certCode: null, 7 8 init: function(options) 9 { 10 var _this = this; 11 var settings = $.extend({}, options); 12 this.certTimer = {timer: null, runtime: 0, countOfSmsSending: 0}; 13 this.selecter = { 14 certificationWrap: settings.certificationWrap, 15 agreeWrap: settings.agreeWrap, 16 joinWrap: settings.joinWrap, 17 completeWrap: settings.completeWrap, 18 certNumberInput: settings.certNumberInput, 19 requestButton: settings.requestButton 20 }; 21 this.selecter.certNumberInput.keyup(function(){ 22 if($(this).val().length == 6){ 23 _this.selecter.requestButton.prop("disabled", false).css({'background-color':'#515360'}).html("ì¸ì¦"); 24 } 25 else if(!$(this).val() || $(this).val().length == 0){ 26 if(_this.certTimer.runtime < 90){ 27 _this.selecter.requestButton.html("ì¸ì¦ë²í¸ ì¬ì ì¡"); 28 } 29 else{ 30 _this.selecter.requestButton.html("ë²í¸ ë°ê¸°").prop("disabled", true).css({'background-color':'#ccc'}); 31 } 32 } 33 }); 34 this.selecter.requestButton.click(function(){ 35 _this.getCertificationCode(); 36 }); 37 $("#certification_btn").click(function(){ 38 _this.chkCertification(); 39 }); 40 $("#agreement_btn").click(function(){ 41 _this.chkAgreement(); 42 }); 43 /* 44 $("input[name='id']").blur(function(){ 45 _this.chkId($(this).val()); 46 }); 47 */ 48 $("input[name='pw2']").blur(function(){ 49 _this.chkPasswd(this.form); 50 }); 51 /* 52 this.certNumberInput.focus(function(){ 53 if($(this).val() && _this.certTimer.timer){ 54 clearTimeout(_this.certTimer.timer); 55 } 56 }).blur(function(){ 57 if(!$(this).val()){ 58 _this.startTimer(); 59 } 60 }); 61 */ 62 }, 63 chkValidateJoinForm: function(F) 64 { 65 var _this = this; 66 if(!F.name.value){ 67 alert('íê¸ì´ë¦ì ì ë ¥í´ì£¼ì¸ì'); 68 F.name.focus(); 69 return false; 70 } 71 if(!F.email1.value){ 72 alert('ì´ë©ì¼(ID)ì ì ë ¥í´ì£¼ì¸ì'); 73 F.email1.focus(); 74 return false; 75 } 76 if(!F.email2.value){ 77 alert('ì´ë©ì¼(ëë©ì¸)ì ì ë ¥í´ì£¼ì¸ì'); 78 F.email2.focus(); 79 return false; 80 } 81 /* 82 if(!F.id.value){ 83 alert('ì´ë©ì¼(ID)ì ì ë ¥í´ì£¼ì¸ì'); 84 F.id.focus(); 85 return false; 86 } 87 */ 88 var id = F.email1.value + '@' + F.email2.value; 89 // ì´ë©ì¼ ì í¨ì± ê²ì¬ 90 if(!REGEX_OF_EMAIL.test(id)){ 91 alert("ì´ë©ì¼ì´ íìì´ ì¬ë°ë¥´ì§ ììµëë¤. ë¤ì ì ë ¥í´ì£¼ì¸ì."); 92 F.id.focus(); 93 return false; 94 } 95 if(!this.chkId(id)){ 96 return false; 97 } 98 if(!F.pw.value){ 99 alert('ë¹ë°ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì'); 100 F.pw.focus(); 101 return false; 102 } 103 if(!F.pw2.value){ 104 alert('ë¹ë°ë²í¸ë¥¼ ë¤ì ì ë ¥í´ì£¼ì¸ì'); 105 F.pw2.focus(); 106 return false; 107 } 108 if(!this.chkPasswd(F)){ 109 return false; 110 } 111 if(F.sex.selectedIndex < 1){ 112 alert('ì±ë³ì ì íí´ì£¼ì¸ì'); 113 F.sex.focus(); 114 return false; 115 } 116 if(F.start_area.selectedIndex < 1){ 117 alert('ì¶ë°ì§ìì ì íí´ì£¼ì¸ì'); 118 F.start_area.focus(); 119 return false; 120 } 121 if($(".passfort").css("display") != "none"){ 122 if(!F.last_name.value){ 123 alert('ì문ì´ë¦[ì±]ì ì ë ¥í´ì£¼ì¸ì'); 124 F.last_name.focus(); 125 return false; 126 } 127 if(!F.first_name.value){ 128 alert('ì문ì´ë¦ì ì ë ¥í´ì£¼ì¸ì'); 129 F.first_name.focus(); 130 return false; 131 } 132 if(!F.birthday.value){ 133 alert('ìë ìì¼ì ì ë ¥í´ì£¼ì¸ì'); 134 F.birthday.focus(); 135 return false; 136 } 137 if(!F.passport_no.value){ 138 alert('ì¬ê¶ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì'); 139 F.passport_no.focus(); 140 return false; 141 } 142 if(!F.passport_expire_date.value){ 143 alert('ì¬ê¶ë§ë£ì¼ì ì ë ¥í´ì£¼ì¸ì'); 144 F.passport_expire_date.focus(); 145 return false; 146 } 147 if(!F.passport_country.value){ 148 alert('êµì ì ì ë ¥í´ì£¼ì¸ì'); 149 F.passport_country.focus(); 150 return false; 151 } 152 if(!F.passport_issue_country.value){ 153 alert('ë°íêµì ì ë ¥í´ì£¼ì¸ì'); 154 F.passport_issue_country.focus(); 155 return false; 156 } 157 if($("input[name='agree1']:checked").val() != "Y"){ 158 alert("íì¹ì ê°ì¸ì ë³´ìì§/ì´ì©ì ëì íì ì¼ í©ëë¤."); 159 $("input[name='agree1']").focus(); 160 return false; 161 } 162 if($("input[name='agree2']:checked").val() != "Y"){ 163 alert("íì¹ì ê³ ì ìë³ì ë³´ìì§/ì´ì©ì ëì íì ì¼ í©ëë¤."); 164 $("input[name='agree2']").focus(); 165 return false; 166 } 167 } 168 $("#join_frm").ajaxSubmit({ 169 dataType: "JSON", 170 success: function(response){ 171 //console.log(response);
172 if(response.result_code == 1){ 173 $(".steps").hide(); 174 $("#member_name").text(F.name.value + "ë"); 175 _this.selecter.joinWrap.hide(); 176 _this.selecter.completeWrap.show(); 177 } 178 else{ 179 console.log(response); 180 alert(response.result_message); 181 } 182 } 183 }); 184 return false; 185 }, 186 getCertificationCode: function() 187 { 188 var _this = this; 189 //ì¸ì¦ìì² 190 if(this.selecter.certNumberInput.val().length == 6){ 191 this.chkCertification(); 192 } 193 else{ 194 if(this.certTimer.timer){ 195 clearTimeout(this.certTimer.timer); 196 } 197 var phoneNumber = $("input[name='phone_number']").val(); 198 if(!phoneNumber){ 199 alert('í´ëí° ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì'); 200 $("input[name='phone_number']").focus(); 201 return; 202 } 203 if(!REGEX_OF_PHONE_NUMBER.test(phoneNumber)){ 204 alert('í´ëí° ë²í¸ê° ì¬ë°ë¥´ì§ ììµëë¤.'); 205 $("input[name='phone_number']").focus(); 206 return; 207 } 208 $.ajax({ 209 url: "/member/get_cert_code", 210 type: "POST", 211 data: {email: _this.email, handphone: phoneNumber, country_number: $("select[name='phone_country_number'] option:selected").val()}, 212 dataType: "JSON", 213 success: function(response){ 214 //console.log(response); 215 if(response.result_code == 1){ 216 _this.selecter.certNumberInput.prop("disabled", false); 217 _this.selecter.requestButton.prop("disabled", true).css({'background-color':'#ccc'}); 218 _this.certCode = response.result_data; 219 220 _this.selecter.certNumberInput.val(response.result_data); //í ì¤í¸ë¥¼ ìí´ ì¤ìë² ë°ìì 주ìì²ë¦¬ 221 222 _this.certTimer.runtime = 120; 223 _this.certTimer.countOfSmsSending++; 224 _this.startTimer(); 225 } 226 else{ 227 alert(response.result_message); 228 } 229 }, 230 error: function(jqXHR, textError, thrown){ 231 console.log(jqXHR, textError, thrown); 232 } 233 }); 234 } 235 }, 236 startTimer: function() 237 { 238 var _this = this; 239 this.certTimer.timer = setTimeout(function(){ 240 var remainMinutes = Math.floor(_this.certTimer.runtime / 60); 241 var remainSeconds = Math.floor(_this.certTimer.runtime - (remainMinutes * 60)); 242 var remainString = "(" + remainMinutes + ":" + remainSeconds + ")"; 243 if(_this.certTimer.runtime > 0){ 244 if(_this.selecter.requestButton.prop("disabled") == true && _this.certTimer.runtime == 90){ 245 _this.selecter.requestButton.html("ì¸ì¦ë²í¸ ì¬ì ì¡"); 246 _this.selecter.requestButton.prop("disabled", false).css({'background-color':'#515360'}); 247 } 248 _this.selecter.certNumberInput.prop("placeholder", "ì¸ì¦ë²í¸ë¥¼ ì ë ¥íì¸ì. " + remainString); 249 _this.certTimer.runtime--; 250 _this.startTimer(); 251 } 252 else{ 253 _this.selecter.certNumberInput.prop("placeholder", "ì¸ì¦ë²í¸ ë°ê¸°ë¥¼ í´ë¦íì¸ì."); 254 _this.selecter.certNumberInput.prop("disabled", true); 255 _this.selecter.certNumberInput.val(""); 256 _this.selecter.requestButton.html("ì¸ì¦ë²í¸ ë°ê¸°"); 257 alert("ì¸ì¦ ë²í¸ ì ë ¥ ìê°ì´ ì´ê³¼ëììµëë¤. ë¤ì ì¸ì¦ë²í¸ ë°ê¸°ë¥¼ í´ë¦íì¸ì."); 258 } 259 }, 1000); 260 }, 261 chkCertification: function() 262 { 263 var _this = this; 264 if(this.certCode == null){ 265 alert('ì¸ì¦ë²í¸ê° ìì±ëì§ ìììµëë¤. ì¸ì¦ë²í¸ ë°ê¸°ë¥¼ í´ë¦íì¸ì'); 266 this.selectercertNumberInput.focus(); 267 return; 268 } 269 if(!this.selecter.certNumberInput.val()){ 270 alert('ì¸ì¦ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì'); 271 this.selectercertNumberInput.focus(); 272 return; 273 } 274 if(this.certCode == this.selecter.certNumberInput.val()){ 275 alert("ì íë²í¸ ì¸ì¦ì´ ìë£ëììµëë¤."); 276 this.selecter.certificationWrap.hide(); 277 this.selecter.agreeWrap.show(); 278 $(".steps li").removeClass("on"); 279 $(".steps li:eq(1)").addClass("on"); 280 clearTimeout(this.certTimer.timer) 281 } 282 else{ 283 alert('ì¸ì¦ë²í¸ê° ì¼ì¹íì§ ììµëë¤.'); 284 this.selectercertNumberInput.focus(); 285 } 286 }, 287 chkAgreement: function() 288 { 289 if($("input[name='agreement_terms']:checked").val() != "Y"){ 290 alert("ì´ì©ì½ê´ì ëìí´ì£¼ì¸ì."); 291 $("input[name='agreement_terms']").focus(); 292 return; 293 } 294 if($("input[name='agreement_private']:checked").val() != "Y"){ 295 alert("ê°ì¸ì ë³´ì·¨ê¸ë°©ì¹¨ì ëìí´ì£¼ì¸ì."); 296 $("input[name='agreement_private']").focus(); 297 return; 298 } 299 this.selecter.agreeWrap.hide(); 300 this.selecter.joinWrap.show(); 301 $(".steps li").removeClass("on"); 302 $(".steps li:eq(2)").addClass("on"); 303 }, 304 chkId: function(id) 305 { 306 var result = false; 307 if(id){ 308 $.ajax({
309 url: "/member/check_id", 310 type: "POST", 311 data: {id: id}, 312 //dataType: "JSON", 313 success: function(response){ 314 if(response){ 315 alert(response); 316 } 317 else{ 318 result = true; 319 } 320 }, 321 async: false 322 }); 323 } 324 return result; 325 }, 326 chkPasswd: function(F) 327 { 328 if(F.pw.value && F.pw2.value){ 329 if((F.pw.value.length < 6) || (F.pw.value.length > 12)){ 330 alert('ë¹ë°ë²í¸ë 6ì ~ 12ì ì¬ì´ë¡ ì ë ¥í´ì£¼ì¸ì'); 331 F.pw.value = ""; 332 F.pw2.value = ""; 333 F.pw.focus(); 334 return false; 335 } 336 if(F.pw.value != F.pw2.value){ 337 alert('ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤.'); 338 F.pw2.value = ""; 339 F.pw.focus(); 340 F.pw.value = F.pw.value; 341 return false; 342 } 343 return true; 344 } 345 return false; 346 } 347};
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.