X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=5ce9357c9785eeb6ada2bbbe98537fc8242ebe97;hb=ffea71492c07cbf81430883c894b34e1c9408699;hp=4b76b93a5fff367cc39989334bcf9d5fe123fa2d;hpb=42445687d95289c3c3f70e1e8d76278107a8b125;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index 4b76b93..5ce9357 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -299,7 +299,24 @@ Formateur.prototype.getSmilesHTML = function() Formateur.prototype.traitementComplet = function(M, pseudo) { - return this.traiterSmiles(this.traiterURL(this.remplacerBalisesHTML(M), pseudo)) + return this.traiterLiensConv(this.traiterSmiles(this.traiterURL(this.remplacerBalisesHTML(M), pseudo))) +} + +/** + * Transforme les liens en entités clickables. + * Un lien vers une conversation permet d'ouvrire celle ci, elle se marque comme ceci dans un message : + * "{5F}" ou 5F est la racine de la conversation. + * Ce lien sera transformer en {5F} pouvant être clické pour créer la conv 5F. + */ +Formateur.prototype.traiterLiensConv = function(M) +{ + return M.replace( + /\{\w+\}/g, + function(lien) + { + return "" + lien + "" + } + ) } /** @@ -396,9 +413,6 @@ function Client(util) this.cookie = null this.regexCookie = new RegExp("^cookie=([^;]*)") - - // Obsolète - //this.captchaCrypt = null // données personnels this.resetDonneesPersonnelles() @@ -535,32 +549,6 @@ Client.prototype.getXMLloginCookie = function() return XMLDocument } - -/* Obsolète -Client.prototype.getXMLloginCaptcha = function(captchaCrypt, captchaInput) -{ - var XMLDocument = this.util.creerDocumentXMLAction() - XMLDocument.documentElement.setAttribute("name", "loginCaptcha") - - var nodecaptchaCrypt = XMLDocument.createElement("captchaCrypt") - nodecaptchaCrypt.appendChild(XMLDocument.createTextNode(captchaCrypt)) - XMLDocument.documentElement.appendChild(nodecaptchaCrypt) - - var nodecaptchaInput = XMLDocument.createElement("captchaInput") - nodecaptchaInput.appendChild(XMLDocument.createTextNode(captchaInput)) - XMLDocument.documentElement.appendChild(nodecaptchaInput) - - return XMLDocument -}*/ - -/* Obsolète -Client.prototype.getXMLgenerationCaptcha = function() -{ - var XMLDocument = this.util.creerDocumentXMLAction() - XMLDocument.documentElement.setAttribute("name", "generationCaptcha") - - return XMLDocument -}*/ Client.prototype.getXMLEnregistrement = function(login, password) { @@ -676,33 +664,7 @@ Client.prototype.setStatut = function(statut) this.statut = statut this.majMenu() -} - -/** - * Demande la génération d'un captcha au serveur et l'affiche. - */ - /* Obsolète -Client.prototype.afficherCaptcha = function(query) -{ - var thisClient = this - - $.post("request", this.util.xmlVersAction(this.getXMLgenerationCaptcha()), - function(data, textStatus) - { - var chemin = jQuery("chemin", data.documentElement).text() - thisClient.captchaCrypt = jQuery("captchaCrypt", data.documentElement).text() - jQuery(query).prepend( - "

Es-tu un bot ? " + - "

" - ) - } - ) } - -Client.prototype.cacherCaptcha = function() -{ - jQuery("#captcha").remove() -}*/ /** * Effectue la connexion vers le serveur. @@ -720,13 +682,7 @@ Client.prototype.connexionCookie = function() Client.prototype.connexionLogin = function(login, password) { return this.connexion(this.util.xmlVersAction(this.getXMLlogin(login, password))) -} - -/* Obsolète -Client.prototype.connexionCaptcha = function() -{ - return this.connexion(this.util.xmlVersAction(this.getXMLloginCaptcha(this.captchaCrypt, jQuery("#captcha input").val()))) -}*/ +} Client.prototype.enregistrement = function(login, password) {