projects
/
euphorik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
81b3e94
)
FIX correction concernant l'affichage de "admin" dans le menu en fonction du statut...
author
Greg Burri
<greg.burri@gmail.com>
Sun, 11 May 2008 23:45:16 +0000
(23:45 +0000)
committer
Greg Burri
<greg.burri@gmail.com>
Sun, 11 May 2008 23:45:16 +0000
(23:45 +0000)
js/euphorik.js
patch
|
blob
|
history
diff --git
a/js/euphorik.js
b/js/euphorik.js
index
b36fbbb
..
929a35c
100755
(executable)
--- a/
js/euphorik.js
+++ b/
js/euphorik.js
@@
-437,7
+437,7
@@
Client.prototype.resetDonneesPersonnelles = function()
Client.prototype.setCss = function(css)
{
Client.prototype.setCss = function(css)
{
- if (this.css == css)
+ if (this.css == css
|| css == ""
)
return
this.css = css
return
this.css = css
@@
-681,8
+681,10
@@
Client.prototype.deconnexion = function()
Client.prototype.chargerDonnees = function(data)
{
Client.prototype.chargerDonnees = function(data)
{
- var thisClient = this
-
+ // la modification du statut qui suit met à jour le menu, le menu dépend (page admin)
+ // de l'état ekMaster
+ this.ekMaster = data["ek_master"] != undefined ? data["ek_master"] : false
+
this.setStatut(data["status"])
if (this.authentifie())
this.setStatut(data["status"])
if (this.authentifie())
@@
-693,22
+695,14
@@
Client.prototype.chargerDonnees = function(data)
this.login = data["login"]
this.pseudo = data["nick"]
\r
this.email = data["email"]
\r
this.login = data["login"]
this.pseudo = data["nick"]
\r
this.email = data["email"]
\r
- this.
css = data["css"]
+ this.
setCss(data["css"])
this.nickFormat = data["nick_format"]
// la page de la conversation principale
this.pagePrincipale = data["main_page"] == undefined ? 1 : data["main_page"]
this.nickFormat = data["nick_format"]
// la page de la conversation principale
this.pagePrincipale = data["main_page"] == undefined ? 1 : data["main_page"]
- // met à jour la css
- if (this.css != "")
- {
- $("link#cssPrincipale").attr("href", this.css)
- this.majMenu()
- }
// les conversations
// les conversations
- thisClient.conversations = data["conversations"]
-
- thisClient.ekMaster = data["ek_master"]
+ this.conversations = data["conversations"]
}
this.dernierMessageErreur = data["error_message"]
}
}
this.dernierMessageErreur = data["error_message"]
}
@@
-751,7
+745,8
@@
Client.prototype.majMenu = function()
// TODO : à virer : ne plus changer de style de display ... spa beau .. ou trouver une autre méthode
var displayType = this.css == "css/3/euphorik.css" ? "block" : "inline" //this.client
// TODO : à virer : ne plus changer de style de display ... spa beau .. ou trouver une autre méthode
var displayType = this.css == "css/3/euphorik.css" ? "block" : "inline" //this.client
- $("#menu .admin").css("display", this.ekMaster ? "none" : "inline")
+ alert(this.ekMaster)
+ $("#menu .admin").css("display", this.ekMaster ? "inline" : "none")
// met à jour le menu
if (this.statut == statutType.auth_registered)
// met à jour le menu
if (this.statut == statutType.auth_registered)