1/** 2 * Supported Browser : MSIE, Chrome , FireFox 3 * 4 * Object : common-user.js 5 * Description : ë¡ê·¸ì¸ ì ë³´ ê´ë ¨ 6 * Author : LaheeDad 7 * Since : 2013. 10. 31. 8 * Version : 1.0 9 * 10 * Modification Information 11 * since author description 12 * =========== ============= =========================== 13 * LaheeDad 2013. 10. 31. ìµì´ ìì± 14 */ 15 16/* 17 * ë¡ê·¸ì¸ ì ë³´ 18 */ 19var loginObj = { 20 /* 21 * íë¡ì í¸ ContextPath ì ë³´ 22 */ 23 contextPath : '', 24 /* 25 * ì ìíì´ì§ êµê° ì½ë 26 */ 27 localeCode : 'KR', 28 /* 29 * contextPath + localeCode 30 */ 31 pagePath : '', 32 /* 33 * ë¡ê·¸ì¸ì¬ë¶ 34 */ 35 isLogin : 'N', 36 /* 37 * 멤ë²ì½ ì¬ë¶ 38 */ 39 isMember : 'N', 40 /* 41 * ì ìDEVICE 42 * N : normal 43 * M : mobile 44 * T : tablet 45 */ 46 isDevice : 'N', 47 /* 48 * ì ì DIVICEê° ëª¨ë°ì¼ì¼ë ISOì¸ì§ íì¸ 49 * N : Android or Other 50 * Y : IOS 51 */ 52 isIos : 'N', 53 /** 54 * ì¤ì 55 * @param _isLogin ë¡ê·¸ì¸ì 무 56 * @param _isDevice ì ì DEVICEì¢ ë¥ 57 * @param _isIos ìì´í°ê³ì´ ì 무 58 */ 59 init : function(_isLogin, _isMember, _isDevice, _isIos){ 60 this.isLogin = _isLogin; 61 this.isMember = _isMember; 62 this.isDevice = _isDevice; 63 this.isIos = _isIos; 64 this.pagePath = this.contextPath; 65 //this.pagePath = this.contextPath + '/' + this.localeCode; 66 }, 67 /** 68 * ì¬ì©ì ë¡ê·¸ì¸ íì¸ 69 * 70 * @use - loginObj.loginCheck(); 71 * - loginObj.loginCheck(gotoUrl); 72 * @param gotoURL - ë¡ê·¸ì¸íì¸ ì¤í¨ì ë¡ê·¸ì¸íì ì´ëí íì´ì§ URL 73 * - ë¡ê·¸ì¸íì¸ ì¤í¨ì gotoURLì ì¤ì íì§ ììë¤ë©´ ë¡ê·¸ì¸í íì¬ íì´ì§ë¡ ì´ëíë¤. 74 * - ë¡ê·¸ì¸ì ì±ê³µíëë° gotoURLê° ìë¤ë©´ ë¡ê·¸ì¸ íì¸ ì±ê³µì¬ë¶ë§ 리í´íë¤. 75 * @returns {Boolean} 76 */ 77 loginCheck : function(gotoURL){ 78 var bRtn = false; 79 80 //ë¡ê·¸ì¸ ì¬ë¶ íì¸ 81 if(!this.isLoginCheck()){ 82 //ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë 83 bRtn = this.goLogin(gotoURL, true); 84 }else{ 85 if(gotoURL != undefined){ 86 location.href = gotoURL; 87 } 88 bRtn = true; 89 } 90 91 return bRtn; 92 }, 93 /** 94 * ë¡ê·¸ì¸ ì¬ë¶ íì¸ 95 * @returns {Boolean} true:ë¡ê·¸ì¸ì¤ 96 */ 97 isLoginCheck : function(){ 98 var bRtn = false; 99 100 //ë¡ê·¸ì¸ ì¬ë¶ íì¸ 101 //if(this.isLogin === 'Y' && this.isMember === 'S'){ 102 if(this.isLogin === 'Y'){ 103 bRtn = true; 104 } 105 106 return bRtn; 107 }, 108 isLoginCheck2 : function(){ 109 var bRtn = false; 110 111 //ë¡ê·¸ì¸ ì¬ë¶ íì¸ 112 if(this.isLogin === 'Y'){ 113 bRtn = true; 114 }else{ 115 alert("ë¡ê·¸ì¸ì´ íìí©ëë¤."); 116 } 117 118 return bRtn; 119 }, 120 /** 121 * ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë 122 * - loginCheckìì í¨ìëë ì´ë ì¬ë¶ íì¸ 123 * @param returnUrl 124 * @param bChecked ë¡ê·¸ì¸ì¬ë¶íì¸ ë¡ì§ì¬ë¶ 125 * @returns {Boolean} 126 */ 127 goLogin : function(returnUrl, bChecked){ 128 if(bChecked != undefined && bChecked){ 129 if(confirm("ë¡ê·¸ì¸ì´ íìí©ëë¤.")){ 130 this.moveLogin(returnUrl); 131 }else{ 132 return false; 133 } 134 }else{ 135 this.moveLogin(returnUrl); 136 } 137 }, 138 moveLogin : function(returnUrl){ 139 location.replace( loginObj.pagePath + (loginObj.isDevice != 'N' ? '/m' : '') + '/consultant/login.do?returnUrl='+ encodeURIComponent((returnUrl == undefined || returnUrl == '' ? location.href : returnUrl))); 140 } 141}; 142 143 144$(function() { 145 //Headerì ë¡ê·¸ì¸ ë²í¼ 146 $('.goLogin').on({ 147 click : function(event){ 148 event.preventDefault(); 149 loginObj.goLogin(); 150 } 151 }); 152 153 //Headerì ë¡ê·¸ìì ë²í¼ 154 $('.goLogout').on({ 155 click : function(event){ 156 event.preventDefault(); 157 location.replace($(this).attr('href')); 158 } 159 }); 160 161 162 $('a.memberOnly').on({ 163 click : function(event){ 164 event.preventDefault(); 165 loginObj.loginCheck($(this).attr('href')); 166 } 167 });
vendor: 3 bytes, line 168
168});
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.