PageSourceSearch

https://havanaclubfoundation.com/wp-content/cache/min/1/wp-content…/site/assets/js/loginUtil.js?ver=1770716415

js havanaclubfoundation.com collected 2026-10-06 21:02:10 UTC 3,854 bytes, 19 lines download raw bytes

1;(function(w,$){w.LOGIN={url:"/account/_ssologin/",ssoValidaUrl:"/sso/validatesso/",ssoAvataUrl:"/sso/ssologinjs/",containerid:'login_modal',ssoHost:'',dowork:null,quitAction:null,funcArgs:null,QueryMsg:_locModel.T.T_QueryToLogin||"Your must sign to continue, sign in now?"};LOGIN.show=function(dowork,funcArgs,opt){LOGIN.onquit();this.dowork=dowork;this.funcArgs=funcArgs;$.get(this.url,function(data){var me=LOGIN;if(!me.$container){$container=$("<div id='"+me.containerid+"'></div>");$container.append("<div class='login_model_mask' {0}></div>".format(opt&&opt.disableShadeClose?"":"onclick='LOGIN.hide()'"));$("body").append($container)}
2$container.append(data);if(!me.$container)me.$container=$container}.bind(opt))};LOGIN.hide=function(){this.onquit()};LOGIN.submit=function(formId){$form=$('#'+formId);this.ssoHost=$form[0].getAttribute("data-host");if(!$form.find("#Email")[0].value.trim()){LOGIN.callback({Code:-1,Message:_locModel.T.T_LOGIN_ERR_AccountRequired||"Account is required."});return}
3if(!$form.find("#Password")[0].value.trim()){LOGIN.callback({Code:-1,Message:_locModel.T.T_LOGIN_ERR_PasswordRequired||"Password is required."});return}
4var options={url:$form[0].action,datatype:"application/json",headers:{},success:function(data){if(data.Status==0){LOGIN.callback(data);LOGIN.hide()}else{LOGIN.callback({Code:-1,Message:data.Message})}}};$form.ajaxSubmit(options)};LOGIN.callback=function(data){console.log(data);if(data.Code===0){addScript(document.head,this.ssoHost+this.ssoValidaUrl+"?key="+data.Key)}else if(data.Code==6){addScript(document.head,this.ssoHost+this.ssoValidaUrl+"?key={0}&opr=2".format(data.Key))}if(data.Code==-1){var msg="<ul class='alert--error'><li>"+_locModel.T.T_LOGIN_ERR_AccountRequire+"</li></ul>";$("#"+LOGIN.containerid+" .mgs_login").html(msg)}else{var msg="<ul class='alert--error'><li>"+data.Message+"</li></ul>";$("#"+LOGIN.containerid+" .mgs_login").html(msg)}};LOGIN.refreshIcon=function(){if(window.ssoContent){$("#login_icon").html(ssoContent)}
5return this};LOGIN.failed=function(){this.hide()};LOGIN.success=function(){if(this.dowork){if(this.funcArgs){if(this.funcArgs instanceof Array)
6this.dowork.apply(null,this.funcArgs);else this.dowork(this.funcArgs)}else this.dowork()}
7this.refreshIcon().hide()};LOGIN.showIcon=function(){this.refreshIcon().hide()}
8LOGIN.opReqEmail=function(data){if(data&&data.emailRequired){LOGIN.emailrequires();return!0}
9return!1}
10LOGIN.emailrequires=function(){InfoUI.show(3)}
11LOGIN.cancel=function(){this.hide()}
12LOGIN.onquit=function(){var c=_$(LOGIN.containerid);if(c)c.parentNode.removeChild(c);LOGIN.$container=null;if(this.quitAction){if(this.funcArgs){if(this.funcArgs instanceof Array)
13this.quitAction.apply(null,this.funcArgs);else this.quitAction(this.funcArgs)}else this.quitAction()}}
14LOGIN.check=function(dowork,funcArgs,opt){var ret=this.isLogin(opt);if(ret==-1){this.show(function(){location.reload()},funcArgs,opt);return!1}else if(ret==2){return!1}
15return!0}
16LOGIN.checkAndQuary=function(dowork,funcArgs,quitAction){var ret=this.isLogin();if(ret==-1){this.dowork=dowork;this.quitAction=quitAction;if(typeof(popUtil)!="undefined"){LOGIN.show(function(){location.reload()},funcArgs)}else{this.show()}
17return!1}else if(ret==2){return!1}
18return!0}
19LOGIN.isLogin=function(opt){var ret=-1;$.ajax({url:"/account/checklogin?"+Date.parse(new Date()),type:"post",async:!1,dataType:"json",success:function(data){if(data&&((data.Code==1)||(this.opt&&this.opt.ignoreMail&&data.emailRequired))){ret=1}else if(LOGIN.opReqEmail(data)){ret=2}}.bind({opt:opt})});return ret};LOGIN.getAvatar=function(ssoHost){this.ssoHost=ssoHost;addScript(document.head,ssoHost+this.ssoAvataUrl)};LOGIN.onSignOut=function(){if(popUtil){popUtil.open(popUtil.option(0,"<h2>"+_locModel.T.T_MSG_SureToSignOut+"</h2>",5,function(){location.href="/logoutt/"},0))}}})(window,jQuery)

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.