X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=2d64fe2333857cfffc0e26943296ad3a7ab92016;hb=13bf850da2316cde3ad2ff8d5c26fb32928bf7b4;hp=d7ef712c120ce6cf9ed55a3839cdc2fbd7c0a0c0;hpb=8875fb445d47bb0925ef46a131a9bc4dec004b49;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index d7ef712..2d64fe2 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -21,19 +21,27 @@ var conf = { "bigsmile" : [/:D/g, /:-D/g], "clin" : [/;\)/g, /;-\)/g], "cool" : [/8\)/g, /8-\)/g], - "eheheh" : [/:P/g, /:-P/g], - "oh" : [/:o/g, /:O/g], + "eheheh" : [/:P/g, /:-P/g], + "lol" : [/\[-lol\]/g], + "spliff" : [/\[-spliff\]/g], + "oh" : [/:o/g, /:O/g], + "heink" : [/\[-heink\]/g], + "hum" : [/\[-hum\]/g], + "boh" : [/\[-boh\]/g], + "sniff" : [/:\(/g, /:-\(/g], + "triste" : [/\[-triste\]/g], "pascontent" : [/>\(/g, />\(/g], - "sniff" : [/:\(/g, /:-\(/g], - "argn" : [/\[:argn\]/g], - "bunny" : [/\[:lapin\]/g], - "chat" : [/\[:chat\]/g], - "renne" : [/\[:renne\]/g], - "lol" : [/\[:lol\]/g], - "spliff" : [/\[:spliff\]/g], - "star" : [/\[:star\]/g], - "triste" : [/\[:triste\]/g], - "kirby" : [/\[:kirby\]/g] + "argn" : [/\[-argn\]/g], + "redface" : [/\[-redface\]/g], + "bunny" : [/\[-lapin\]/g], + "chat" : [/\[-chat\]/g], + "renne" : [/\[-renne\]/g], + "star" : [/\[-star\]/g], + "kirby" : [/\[-kirby\]/g], + "slurp" : [/\[-slurp\]/g], + "agreed" : [/\[-agreed\]/g], + "dodo" : [/\[-dodo\]/g], + "bn" : [/\[-bn\]/g] } } @@ -297,7 +305,8 @@ Formateur.prototype.traiterLiensConv = function(M) } /** - * FIXME : Cette méthode est attrocement lourde ! A optimiser. + * FIXME : Cette méthode est attrocement lourde ! A optimiser. + * moyenne su échantillon : 234ms */ Formateur.prototype.traiterSmiles = function(M) { @@ -415,8 +424,10 @@ Client.prototype.resetDonneesPersonnelles = function() this.password = "" this.email = "" this.css = jQuery("link#cssPrincipale").attr("href") + this.nickFormat = "nick" this.pagePrincipale = 1 + this.ekMaster = false // les conversations, une conversation est un objet possédant les attributs suivants : // - racine (entier) @@ -550,6 +561,7 @@ Client.prototype.getJSONProfile = function() "nick" : this.pseudo, "email" : this.email, "css" : this.css, + "nick_format" : this.nickFormat, "main_page" : this.pagePrincipale < 1 ? 1 : this.pagePrincipale, "conversations" : this.getJSONConversations() } @@ -660,7 +672,8 @@ Client.prototype.connexion = function(messageJson) } Client.prototype.deconnexion = function() -{ +{ + this.flush() this.setStatut(statutType.deconnected) // deconnexion this.resetDonneesPersonnelles() this.delCookie () @@ -681,6 +694,7 @@ Client.prototype.chargerDonnees = function(data) this.pseudo = data["nick"] this.email = data["email"] this.css = data["css"] + this.nickFormat = data["nick_format"] // la page de la conversation principale this.pagePrincipale = data["main_page"] == undefined ? 1 : data["main_page"] @@ -694,6 +708,7 @@ Client.prototype.chargerDonnees = function(data) // les conversations thisClient.conversations = data["conversations"] + thisClient.ekMaster = data["ek_master"] } this.dernierMessageErreur = data["error_message"] } @@ -777,12 +792,6 @@ jQuery.noConflict() jQuery(document).ready( function() { - /* FIXME : ce code pose problème sur konqueror, voir : http://www.kde-forum.org/thread.php?threadid=17993 - var p = new DOMParser(); - var doc = p.parseFromString("\n", "text/xml") - var s = new XMLSerializer() - alert(s.serializeToString(doc)) */ - var util = new Util() var client = new Client(util) var pages = new Pages() @@ -794,12 +803,7 @@ jQuery(document).ready( initialiserListeStyles(client) // TODO : pourquoi jQuery(document).unload ne fonctionne pas ? - jQuery(window).unload( - function() - { - client.flush(false) - } - ) + jQuery(window).unload(function(){client.flush(false)}) jQuery("#menu .minichat").click(function(){ pages.afficherPage("minichat") }) jQuery("#menu .profile").click(function(){ pages.afficherPage("profile") })