ADD trois mode d'affichage pour les pseudos
[euphorik.git] / js / pageProfile.js
index 4a86aee..f3ef3a8 100755 (executable)
@@ -11,6 +11,7 @@ function PageProfile(client, formateur, util)
 
 PageProfile.prototype.contenu = function()
 {
+   // pourquoi ?
    return ""
 }
 
@@ -33,13 +34,18 @@ PageProfile.prototype.chargerProfile = function()
    \r
    jQuery("form#profile input.login").val(this.client.login)\r
    jQuery("form#profile input.pseudo").val(this.client.pseudo)\r
-   jQuery("form#profile input.email").val(this.client.email)\r
+   jQuery("form#profile input.email").val(this.client.email)
+   
+   jQuery("form#profile select#affichagePseudo option").removeAttr("selected")
+   jQuery("form#profile select#affichagePseudo option[value=" + this.client.nickFormat + "]").attr("selected", "selected")
+   \r
 \r
-   jQuery("#page form#profile button").click(\r
+   jQuery("form#profile button").click(\r
       function()\r
       {\r
          thisPage.client.pseudo = thisPage.formateur.filtrerInputPseudo(jQuery("form#profile input.pseudo").val())\r
-         thisPage.client.email = jQuery("form#profile input.email").val()\r
+         thisPage.client.email = jQuery("form#profile input.email").val()
+         thisPage.client.nickFormat = jQuery("form#profile select#affichagePseudo option:selected").attr("value") 
          \r
          var password = jQuery("form#profile input.password").val()\r
          var passwordRe = jQuery("form#profile input.passwordRe").val()  \r
@@ -108,6 +114,16 @@ return '\
    <td>e-mail</td>\
    <td><input class="email" type="text" size="40" maxlength="100"/></td>\
   </tr>\
+  <tr>\
+   <td>Affichage des identifiants</td>\
+   <td>\
+    <select id="affichagePseudo">\
+     <option value="nick">Pseudo</option>\
+     <option value="login">Login</option>\
+     <option value="nick_login">Pseudo(Login)</option>\
+    </select>\
+   </td>\
+  </tr>\
   <tr>' : '') + '\
   <tr>\
   <td></td>\
@@ -115,4 +131,5 @@ return '\
   </tr>\
  </table>\
 </form>' 
-}
\ No newline at end of file
+}
+