X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat.js;h=abcb72bb7288e7880ba91f711418505767f7d200;hp=ed1a46c177875531e51cb39069f7e3f1e80a5bc0;hb=5dc140390551c133ac5525725a86854ca69679af;hpb=42445687d95289c3c3f70e1e8d76278107a8b125
diff --git a/js/pageMinichat.js b/js/pageMinichat.js
index ed1a46c..abcb72b 100755
--- a/js/pageMinichat.js
+++ b/js/pageMinichat.js
@@ -1,772 +1,294 @@
// coding: utf-8
+// Copyright 2008 Grégory Burri
+//
+// This file is part of Euphorik.
+//
+// Euphorik is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Euphorik is distributed in the hope that it will be useful,
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Euphorik. If not, see .
-function PageMinichat(client, formateur, util)
-{
- this.nom = "minichat"
-
- this.client = client
- this.formateur = formateur
- this.util = util
-
- this.regexMessageTagMatch = /\{.*?\}>/g
- this.regexMessageTagReplace = /^(.*?\{.*?\}>)*/
-}
-
-PageMinichat.prototype.contenu = function()
-{
-// \
- return '\
-
';
- thisPage.envoyerMessage(
- jQuery("form input.pseudo").val(),
- jQuery("form input.message").val()
- )
-
- jQuery("form input.message")[0].focus()
- }
- )
- // interdiction de submiter le formulaire
- jQuery("form").submit(function(){return false})
-
- jQuery("input.pseudo").click(
- function()
- {
- var input = jQuery("input.pseudo")[0]
- if (input.value == conf.pseudoDefaut)
- input.value = ""
- }
- )
-}
-
-PageMinichat.prototype.decharger = function()
-{
- if (this.attenteCourante != null)
- this.attenteCourante.abort()
-}
-
-PageMinichat.prototype.getXMLMessage = function(pseudo, message, repondA)
-{
- var XMLDocument = this.util.creerDocumentXMLAction()
- XMLDocument.documentElement.setAttribute("name", "message")
-
- var nodeCookie = XMLDocument.createElement("cookie")
- nodeCookie.appendChild(XMLDocument.createTextNode(this.client.cookie))
- XMLDocument.documentElement.appendChild(nodeCookie)
-
- var nodePseudo = XMLDocument.createElement("pseudo")
- nodePseudo.appendChild(XMLDocument.createTextNode(pseudo))
- XMLDocument.documentElement.appendChild(nodePseudo)
-
- var nodeContenu = XMLDocument.createElement("contenu")
- nodeContenu.appendChild(XMLDocument.createTextNode(message))
- XMLDocument.documentElement.appendChild(nodeContenu)
-
- if (repondA.length > 0)
- {
- var nodeReponses = XMLDocument.createElement("reponses")
- XMLDocument.documentElement.appendChild(nodeReponses)
- for (var i = 0; i < repondA.length; i++)
- {
- var nodeReponse = XMLDocument.createElement("reponse")
- nodeReponse.setAttribute("id", repondA[i])
- nodeReponses.appendChild(nodeReponse)
- }
+ var trollXHTML = '