Changeset 250
- Timestamp:
- 11/14/11 20:03:07 (13 years ago)
- Location:
- ether_megapoli/trunk/web
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/resources/jsp/megapoliHead.jsp
r249 r250 19 19 20 20 /** ************ CREATE ************ **/ 21 this.createTitleTools(); 21 this.createTitle(); 22 this.createTools(); 22 23 this.createLeftSlides(); 23 this.updateLogoEther();24 24 }, 25 25 26 26 // CREATES ******************************************************** 27 createTitle Tools: function()27 createTitle: function() 28 28 { 29 29 this.containerTitle.addClass( "containerTitle" ); 30 30 this.containerTitle.html( templateTexts["app.fulltitle"] ); 31 31 }, 32 33 createTools: function() 34 { 32 35 this.createLoginForm(); 33 36 this.createLogin(); … … 45 48 divSmallLogoEther.append( '<a href="http://ether.ipsl.jussieu.fr" target="help"><img src="resources/images/logo_Ether.jpg" width="40px" height="40px"/></a>' ); 46 49 this.containerTools.append( divSmallLogoEther ); 50 51 this.updateLogoEther(); 47 52 }, 48 53 … … 182 187 onHandleLogin: function( result ) 183 188 { 184 var errors = jQuery.parseJSON( result ).errors; 185 alert( errors ); 189 this.errors = jQuery.parseJSON( result ).errors; 190 this.jSONUser = jQuery.parseJSON( result ).jSONPeople != null ? jQuery.parseJSON( result ).jSONPeople : false; 191 if( this.errors == null ) 192 this.hideLogin(); 193 else 194 this.displayLoginErrors(); 186 195 }, 187 196 … … 211 220 }, 212 221 213 onClickLogin: function( result )214 {215 alert( "paf" );216 },217 218 onClickLoginError: function( resutl )219 {220 alert( "error" );221 },222 222 /** 223 223 * This method display a small Ether logo if the screen is too small to contain the big one … … 237 237 $( "#smallLogoEther" ).hide(); 238 238 } 239 }, 240 241 hideLogin: function() 242 { 243 this.containerTools.empty(); 244 this.createTools(); 245 }, 246 247 displayLoginErrors: function() 248 { 249 alert( "displayErrors" ); 239 250 } 240 251 } ); -
ether_megapoli/trunk/web/src/com/ether/ControllerEponge.java
r249 r250 51 51 { 52 52 final ActionErrors errors = new ActionErrors(); 53 final JSONObject jSONPeople = new JSONObject(); 53 54 54 55 if( login != null && pwd != null ) … … 61 62 errors.add( ActionErrors.GLOBAL_MESSAGE, new ActionError( "errors.logon.notFound", Context.getWebmaster( request ) ) ); 62 63 else 64 { 63 65 request.getSession().setAttribute( "SES_USER", people ); 66 jSONPeople.put( "name", people.getNom() ); 67 jSONPeople.put( "firstName", people.getPrenom() ); 68 jSONPeople.put( "role", people.getRoles() ); 69 } 64 70 } 65 71 catch( Exception e ) … … 74 80 result.put( "errors", errors ); 75 81 82 result.put("jSONPeople", jSONPeople); 76 83 return result; 77 84 }
Note: See TracChangeset
for help on using the changeset viewer.