Changeset 278 for ether_megapoli/trunk/web/resources/js
- Timestamp:
- 12/01/11 21:10:05 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/resources/js/classesForJQuery/LoginButton.js
r269 r278 4 4 // 5 5 // use jQuery && librairies from TwitterLogin 6 // isNeededInscription : true if we need the part "inscription for a new user" 6 7 //******************************************************** 7 8 … … 18 19 this.urlLogout = param.urlLogout ? param.urlLogout : false; 19 20 this.classNameToAdd = param.classNameToAdd ? param.classNameToAdd : false; 21 this.isNeededInscription = param.isNeededInscription ? param.isNeededInscription : false; 22 this.callbackInscription = param.callbackInscription ? param.callbackInscription : false; 20 23 21 24 // Texts 22 25 this.connexionText = param.connexionText ? param.connexionText : loginTexts["app.connexion"]; 23 26 this.loginText = param.loginText ? param.loginText : loginTexts["data.authentification.login"]; 24 this.pwdText = param.pwdText ? param.pwdText : loginTexts["data.authentification.p wd"];27 this.pwdText = param.pwdText ? param.pwdText : loginTexts["data.authentification.password"]; 25 28 this.submitText = param.submitText ? param.submitText : loginTexts["data.authentification.sign"]; 26 29 this.forgotPText = param.forgotPText ? param.forgotPText : loginTexts["data.authentification.pwdForget"]; 27 30 this.forgotUNPHelpText = param.forgotUNPHelpText ? param.forgotUNPHelpText : loginTexts["data.authentification.loginForget.help"]; 28 31 this.forgotUNPText = param.forgotUNPText ? param.forgotUNPText : loginTexts["data.authentification.loginForget"]; 32 this.inscriptionText = param.inscriptionText ? param.inscriptionText : loginTexts["data.authentification.inscription"]; 29 33 this.text1 = param.text1 ? param.text1 : loginTexts["app.admin"]; 30 34 this.errorText = param.errorText ? param.errorText : loginTexts[this.errors]; … … 51 55 var labelLogin = $( document.createElement( "label" ) ); 52 56 labelLogin.attr( {for:"login"} ); 53 labelLogin. append( this.loginText );57 labelLogin.html( this.loginText ); 54 58 var inputLogin = $( document.createElement( "input" ) ); 55 59 inputLogin.attr( {id:"login", name:"login", tabIndex:"4", type:"text"} ); … … 59 63 var labelPwd = $( document.createElement( "label" ) ); 60 64 labelPwd.attr( {for:"pwd"} ); 61 labelPwd. append( this.pwdText );65 labelPwd.html( this.pwdText ); 62 66 var inputPwd = $( document.createElement( "input" ) ); 63 67 inputPwd.attr( {id:"pwd", name:"pwd", tabIndex:"5", type:"password"} ); … … 77 81 var aForgotP = $( document.createElement( "a" ) ); 78 82 aForgotP.attr( {id:"resend_password_link", href:"mailto:${webmaster}?subject=[MEGAPOLI] login"} ); 79 aForgotP. append( this.forgotPText );83 aForgotP.html( this.forgotPText ); 80 84 inputForgotP.append( aForgotP ); 81 85 containerLoginForm.append( inputForgotP ); … … 85 89 var aForgotUNP = $( document.createElement( "a" ) ); 86 90 aForgotUNP.attr( {id:"forgot_username_link", href:"mailto:${webmaster}?subject=[MEGAPOLI] password", title:this.forgotUNPHelpText} ); 87 aForgotUNP. append( this.forgotUNPText );91 aForgotUNP.html( this.forgotUNPText ); 88 92 inputForgotUNP.append( aForgotUNP ); 89 93 containerLoginForm.append( inputForgotUNP ); 94 95 if( this.isNeededInscription ) 96 { 97 var inputInscription = $( document.createElement( "p" ) ); 98 inputInscription.addClass( "inscription" ); 99 var aInscription = $( document.createElement( "a" ) ); 100 aInscription.attr( {id:"inscription_link", href:"#"} ); 101 aInscription.html( this.inscriptionText ); 102 aInscription.bind( "click", jQuery.proxy( this.onClickInscription, this ) ); 103 inputInscription.append( aInscription ); 104 containerLoginForm.append( inputInscription ); 105 } 90 106 91 107 var divErrors = $( document.createElement( "div" ) ); … … 236 252 { 237 253 this.requestLogout(); 254 }, 255 256 onClickInscription: function() 257 { 258 this.containerErrors.hide(); 259 if( this.callbackInscription ) 260 this.callbackInscription(); 238 261 } 239 262
Note: See TracChangeset
for help on using the changeset viewer.