projects
/
euphorik.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MOD présentation des css sous la forme d'une liste box.
[euphorik.git]
/
js
/
euphorik.js
diff --git
a/js/euphorik.js
b/js/euphorik.js
index
c37ee4c
..
7af2708
100755
(executable)
--- a/
js/euphorik.js
+++ b/
js/euphorik.js
@@
-106,8
+106,7
@@
var messageType = {informatif: 0, question: 1, erreur: 2}
*/
Util.prototype.jsonVersAction = function(json)
{
*/
Util.prototype.jsonVersAction = function(json)
{
- // FIXME : ne plus encapsuler json dans de l'xml (problème avec yaws)
- return {action: "<json>" + JSON.stringify(json) + "</json>" }
+ return {action : JSON.stringify(json) }
}
\r
Util.prototype.md5 = function(chaine)
\r
}
\r
Util.prototype.md5 = function(chaine)
\r
@@
-459,10
+458,10
@@
Client.prototype.ajouterConversation = function(racine)
{
// vérification s'il elle n'existe pas déjà
for (var i = 0; i < this.conversations.length; i++)
{
// vérification s'il elle n'existe pas déjà
for (var i = 0; i < this.conversations.length; i++)
- if (this.conversations[i].r
acine
== racine)
+ if (this.conversations[i].r
oot
== racine)
return false
return false
- this.conversations.push({r
acine
: racine, page : 1})
+ this.conversations.push({r
oot
: racine, page : 1})
return true
}
return true
}
@@
-514,7
+513,7
@@
Client.prototype.getJSONConversations = function()
{
var conversations = new Array()
for (var i = 0; i < this.conversations.length; i++)
{
var conversations = new Array()
for (var i = 0; i < this.conversations.length; i++)
- conversations.push({ "r
acine" : this.conversations[i].racine
, "page" : this.conversations[i].page})
+ conversations.push({ "r
oot" : this.conversations[i].root
, "page" : this.conversations[i].page})
return conversations
}
return conversations
}
@@
-569,7
+568,7
@@
Client.prototype.setStatut = function(statut)
if (typeof(statut) == "string")
\r
{
statut =
if (typeof(statut) == "string")
\r
{
statut =
- statut == "registered" ?
+ statut == "
auth_
registered" ?
statutType.auth_registered :
(statut == "auth_not_registered" ? statutType.auth_not_registered : statutType.deconnected)
\r
}
\r
statutType.auth_registered :
(statut == "auth_not_registered" ? statutType.auth_not_registered : statutType.deconnected)
\r
}
\r
@@
-735,6
+734,16
@@
Client.prototype.majMenu = function()
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
+function initialiserListeStyles(client)
+{
+ jQuery("#menuCss").change(
+ function()
+ {
+ client.setCss("css/" + jQuery("option:selected", this).attr("value") + "/euphorik.css")
+ }
+ )
+}
+
jQuery.noConflict()
// charge dynamiquement le script de debug
jQuery.noConflict()
// charge dynamiquement le script de debug
@@
-758,13
+767,7
@@
jQuery(document).ready(
// connexion vers le serveur (utilise un cookie qui traine)
\r
client.connexionCookie()
// connexion vers le serveur (utilise un cookie qui traine)
\r
client.connexionCookie()
- // les styles css
- for (var i = 1; i <= 3; i++)
- {
- jQuery("#css"+i).click(function(){
- client.setCss("css/" + jQuery(this).attr("id").charAt(3) + "/euphorik.css")
- })
- }
+ initialiserListeStyles(client)
// TODO : pourquoi jQuery(document).unload ne fonctionne pas ?
jQuery(window).unload(
// TODO : pourquoi jQuery(document).unload ne fonctionne pas ?
jQuery(window).unload(