$(document).ready(function(){ var c_html = ''; c_html += ''; c_html += '
'; c_html += '
'; c_html += ''; c_html += ''; c_html += ''; c_html += '
'; c_html += ''; c_html += ''; c_html += '
'; c_html += '
'; $('#iModuleErrorForm').html(c_html); $('#iModuleErrorForm div[data-role=input]').inits(); $(document).on("Member.login",function(e,$form,result) { var $box = $form.closest("div[data-role=context]"); var $errorBox = $("div.errorBox",$form); if (result.success == true) { $errorBox.hide(); } else { $errorBox.html(result.message ? result.message : $errorBox.attr("data-error")); $errorBox.show(); $box.shake(); $form.status("default"); setTimeout(function($errorBox) { $errorBox.fadeOut(); },5000,$errorBox); e.stopImmediatePropagation(); return false; } }); Member.login = function($form,callback) { var university = $('select[name=university]',$form).val(); var userid = $('input[name=userid]',$form).val(); $('input[name=email]',$form).val('C'+university+'_'+userid); $form.send(ENV.getProcessUrl("member","login"),function(result) { /** * 이벤트를 발생시킨다. */ console.log("weffewwef"); if ($(document).triggerHandler("Member.login",[$form,result]) === false) return false; if (result.success == true) { if (typeof callback == "function") callback(); else location.replace('/'); } }); } });