From 351623b2a00432ae5b690476c68b8fb05cc8dd03 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Wed, 13 Aug 2008 20:57:20 +0000 Subject: [PATCH] FIX#64 --- index.yaws | 6 +++--- js/formateur.js | 13 ++++++++++++- js/pageMinichat/conversation.js | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/index.yaws b/index.yaws index 767a0b7..7d88a7c 100755 --- a/index.yaws +++ b/index.yaws @@ -5,7 +5,7 @@ out(A) -> {header, {content_type, case string:str((A#arg.headers)#headers.user_agent, "MSIE") of - 0 -> "application/xhtml+xml"; + 0 -> "text/html"; %"application/xhtml+xml"; % TODO : jquery.lightbox ne support pas application/xhtml+xml _ -> "text/html" end }}. @@ -33,7 +33,7 @@ ], []} }. - + @@ -110,4 +110,4 @@ - \ No newline at end of file + diff --git a/js/formateur.js b/js/formateur.js index 8fd8e0f..72ecfad 100644 --- a/js/formateur.js +++ b/js/formateur.js @@ -152,8 +152,19 @@ euphorik.Formateur.prototype.getShort = function(url) { return [versionShort ? versionShort : "url", estUneImage]; }; +euphorik.Formateur.prototype.supprimerSmiles = function(m) { + objectEach(this.smiles, function(nom, smiles) { + for (var i = 0; i < smiles.length; i++) { + m = m.replace(smiles[i], ""); + } + }); + return m; +} + /** * Traite les pseudo et messages à être affiché dans le titre d'une image visualisé avec lightbox. + * Supprime les smiles pour pas qu'ils puissent être remplacés par la fonction 'traiterSmiles'. + * TODO : trouver un moyen pour que les smiles puissent être conservés */ euphorik.Formateur.prototype.traiterPourFenetreLightBox = function(M, urlCourante) { var thisFormateur = this; @@ -161,5 +172,5 @@ euphorik.Formateur.prototype.traiterPourFenetreLightBox = function(M, urlCourant return "[" + thisFormateur.getShort(url)[0] + (urlCourante === url ? "*" : "") + "]"; }; - return this.remplacerBalisesHTML(M).replace(this.regexUrl, traitementUrl); + return this.remplacerBalisesHTML(this.supprimerSmiles(M)).replace(this.regexUrl, traitementUrl); }; diff --git a/js/pageMinichat/conversation.js b/js/pageMinichat/conversation.js index 73b8d3a..f821f9c 100644 --- a/js/pageMinichat/conversation.js +++ b/js/pageMinichat/conversation.js @@ -299,7 +299,7 @@ euphorik.Conversation.prototype.attacherEventsSurMessage = function(element) { var thisConversation = this; $(".lienConv", element).click( - function(event) { + function(event) { // FIXME : ya pas mieux ? var racine = $(event.target).text(); thisConversation.conversations.ouvrirConversation(parseInt(racine.substring(1, racine.length - 1), 36)); -- 2.43.0