MOD prepa en vue de la mise ne preproduction
authorGreg Burri <greg.burri@gmail.com>
Sat, 9 Aug 2008 10:05:23 +0000 (10:05 +0000)
committerGreg Burri <greg.burri@gmail.com>
Sat, 9 Aug 2008 10:05:23 +0000 (10:05 +0000)
js/comet.js
js/libs/jquery.js
js/pageMinichat/conversation.js
js/pageMinichat/conversations.js
js/pageMinichat/pageMinichat.js
styles/1/pageMinichat.css

index 3cd1b17..8c427c9 100644 (file)
@@ -106,7 +106,7 @@ Comet.prototype.waitEvent = function(funSend, funsReceive) {
          },\r
       error:\r
          function(XMLHttpRequest, textStatus, errorThrown) {\r
          },\r
       error:\r
          function(XMLHttpRequest, textStatus, errorThrown) {\r
-            ;; console.log("Connexion perdue dans PageEvent.prototype.waitEvent()");\r
+            ;; console.log("Connexion perdue dans Comet.prototype.waitEvent() : \n" + textStatus);\r
             setTimeout(function(){ thisComet.waitEvent2(funSend, funsReceive); }, 1000);\r
          }\r
    });\r
             setTimeout(function(){ thisComet.waitEvent2(funSend, funsReceive); }, 1000);\r
          }\r
    });\r
index 4228a57..88e661e 100755 (executable)
@@ -1,13 +1,13 @@
 (function(){
 /*
 (function(){
 /*
- * jQuery 1.2.7pre - New Wave Javascript
+ * jQuery 1.2.6 - New Wave Javascript
  *
  * Copyright (c) 2008 John Resig (jquery.com)
  * Dual licensed under the MIT (MIT-LICENSE.txt)
  * and GPL (GPL-LICENSE.txt) licenses.
  *
  *
  * Copyright (c) 2008 John Resig (jquery.com)
  * Dual licensed under the MIT (MIT-LICENSE.txt)
  * and GPL (GPL-LICENSE.txt) licenses.
  *
- * $Date: 2008-06-30 12:17:44 -0400 (Mon, 30 Jun 2008) $
- * $Rev: 5754 $
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
  */
 
 // Map over jQuery in case of overwrite
  */
 
 // Map over jQuery in case of overwrite
@@ -22,7 +22,7 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) {
 
 // A simple way to check for HTML strings or ID strings
 // (both of which we optimize for)
 
 // A simple way to check for HTML strings or ID strings
 // (both of which we optimize for)
-var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
+var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
 
 // Is it a simple selector
        isSimple = /^.[^:#\[\.]*$/,
 
 // Is it a simple selector
        isSimple = /^.[^:#\[\.]*$/,
@@ -84,7 +84,7 @@ jQuery.fn = jQuery.prototype = {
        },
 
        // The current version of jQuery being used
        },
 
        // The current version of jQuery being used
-       jquery: "1.2.7pre",
+       jquery: "1.2.6",
 
        // The number of elements contained in the matched element set
        size: function() {
 
        // The number of elements contained in the matched element set
        size: function() {
@@ -442,7 +442,7 @@ jQuery.fn = jQuery.prototype = {
        },
 
        eq: function( i ) {
        },
 
        eq: function( i ) {
-               return this.slice( i, +i + 1 );
+               return this.slice( i, i + 1 );
        },
 
        slice: function() {
        },
 
        slice: function() {
@@ -944,12 +944,12 @@ jQuery.extend({
                        context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
 
                jQuery.each(elems, function(i, elem){
                        context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
 
                jQuery.each(elems, function(i, elem){
-                       if ( typeof elem == 'number' )
-                               elem += '';
-
                        if ( !elem )
                                return;
 
                        if ( !elem )
                                return;
 
+                       if ( elem.constructor == Number )
+                               elem += '';
+
                        // Convert html string into DOM nodes
                        if ( typeof elem == "string" ) {
                                // Fix "XHTML"-style tags in all browsers
                        // Convert html string into DOM nodes
                        if ( typeof elem == "string" ) {
                                // Fix "XHTML"-style tags in all browsers
@@ -1245,8 +1245,7 @@ jQuery.extend({
                styleFloat: styleFloat,
                readonly: "readOnly",
                maxlength: "maxLength",
                styleFloat: styleFloat,
                readonly: "readOnly",
                maxlength: "maxLength",
-               cellspacing: "cellSpacing",
-               rowspan: "rowSpan"
+               cellspacing: "cellSpacing"
        }
 });
 
        }
 });
 
@@ -1369,8 +1368,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
 // Helper function used by the dimensions and offset modules
 function num(elem, prop) {
        return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
 // Helper function used by the dimensions and offset modules
 function num(elem, prop) {
        return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
-}
-var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
+}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
                "(?:[\\w*_-]|\\\\.)" :
                "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
        quickChild = new RegExp("^>\\s*(" + chars + "+)"),
                "(?:[\\w*_-]|\\\\.)" :
                "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
        quickChild = new RegExp("^>\\s*(" + chars + "+)"),
@@ -1816,7 +1814,7 @@ jQuery.extend({
 });
 /*
  * A number of helper functions used for managing events.
 });
 /*
  * A number of helper functions used for managing events.
- * Many of the ideas behind this code originated from
+ * Many of the ideas behind this code orignated from
  * Dean Edwards' addEvent library.
  */
 jQuery.event = {
  * Dean Edwards' addEvent library.
  */
 jQuery.event = {
@@ -1984,10 +1982,7 @@ jQuery.event = {
                if ( !elem ) {
                        // Only trigger if we've ever bound an event for it
                        if ( this.global[type] )
                if ( !elem ) {
                        // Only trigger if we've ever bound an event for it
                        if ( this.global[type] )
-                               jQuery.each( jQuery.cache, function(){
-                                       if ( this.events && this.events[type] )
-                                               jQuery.event.trigger( type, data, this.handle.elem );
-                               });
+                               jQuery("*").add([window, document]).trigger(type, data);
 
                // Handle triggering a single element
                } else {
 
                // Handle triggering a single element
                } else {
@@ -2093,8 +2088,6 @@ jQuery.event = {
                return val;
        },
 
                return val;
        },
 
-       props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" "),
-
        fix: function(event) {
                if ( event[expando] == true )
                        return event;
        fix: function(event) {
                if ( event[expando] == true )
                        return event;
@@ -2103,11 +2096,9 @@ jQuery.event = {
                // and "clone" to set read-only properties
                var originalEvent = event;
                event = { originalEvent: originalEvent };
                // and "clone" to set read-only properties
                var originalEvent = event;
                event = { originalEvent: originalEvent };
-
-               for ( var i = this.props.length, prop; i; ){
-                       prop = this.props[ --i ];
-                       event[ prop ] = originalEvent[ prop ];
-               }
+               var props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");
+               for ( var i=props.length; i; i-- )
+                       event[ props[i] ] = originalEvent[ props[i] ];
 
                // Mark it as fixed
                event[expando] = true;
 
                // Mark it as fixed
                event[expando] = true;
@@ -2419,12 +2410,9 @@ var withinElement = function(event, elem) {
 // Prevent memory leaks in IE
 // And prevent errors on refresh with events like mouseover in other browsers
 // Window isn't included so as not to unbind existing unload events
 // Prevent memory leaks in IE
 // And prevent errors on refresh with events like mouseover in other browsers
 // Window isn't included so as not to unbind existing unload events
-jQuery( window ).bind( 'unload', function(){ 
-       for ( var id in jQuery.cache )
-               // Skip the window
-               if ( id != 1 && jQuery.cache[ id ].handle )
-                       jQuery.event.remove( jQuery.cache[ id ].handle.elem );
-}); 
+jQuery(window).bind("unload", function() {
+       jQuery("*").add(document).unbind();
+});
 jQuery.fn.extend({
        // Keep a copy of the old load
        _load: jQuery.fn.load,
 jQuery.fn.extend({
        // Keep a copy of the old load
        _load: jQuery.fn.load,
@@ -2453,7 +2441,7 @@ jQuery.fn.extend({
                                params = null;
 
                        // Otherwise, build a param string
                                params = null;
 
                        // Otherwise, build a param string
-                       } else if( typeof params == 'object' ) {
+                       } else {
                                params = jQuery.param( params );
                                type = "POST";
                        }
                                params = jQuery.param( params );
                                type = "POST";
                        }
@@ -2663,13 +2651,12 @@ jQuery.extend({
                        jQuery.event.trigger( "ajaxStart" );
 
                // Matches an absolute URL, and saves the domain
                        jQuery.event.trigger( "ajaxStart" );
 
                // Matches an absolute URL, and saves the domain
-               var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
+               var remote = /^(?:\w+:)?\/\/([^\/?#]+)/;
 
                // If we're requesting a remote document
                // and trying to load JSON or Script with a GET
 
                // If we're requesting a remote document
                // and trying to load JSON or Script with a GET
-               if ( s.dataType == "script" && type == "GET" && parts
-                       && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
-
+               if ( s.dataType == "script" && type == "GET"
+                               && remote.test(s.url) && remote.exec(s.url)[1] != location.host ){
                        var head = document.getElementsByTagName("head")[0];
                        var script = document.createElement("script");
                        script.src = s.url;
                        var head = document.getElementsByTagName("head")[0];
                        var script = document.createElement("script");
                        script.src = s.url;
@@ -2755,16 +2742,16 @@ jQuery.extend({
                                        ival = null;
                                }
 
                                        ival = null;
                                }
 
-                               status = isTimeout == "timeout" ? "timeout" :
-                                       !jQuery.httpSuccess( xhr ) ? "error" :
-                                       s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
+                               status = isTimeout == "timeout" && "timeout" ||
+                                       !jQuery.httpSuccess( xhr ) && "error" ||
+                                       s.ifModified && jQuery.httpNotModified( xhr, s.url ) && "notmodified" ||
                                        "success";
 
                                if ( status == "success" ) {
                                        // Watch for, and catch, XML document parse errors
                                        try {
                                                // process the data (runs the xml through httpData regardless of callback)
                                        "success";
 
                                if ( status == "success" ) {
                                        // Watch for, and catch, XML document parse errors
                                        try {
                                                // process the data (runs the xml through httpData regardless of callback)
-                                               data = jQuery.httpData( xhr, s.dataType, s );
+                                               data = jQuery.httpData( xhr, s.dataType, s.dataFilter );
                                        } catch(e) {
                                                status = "parsererror";
                                        }
                                        } catch(e) {
                                                status = "parsererror";
                                        }
@@ -2888,7 +2875,7 @@ jQuery.extend({
                return false;
        },
 
                return false;
        },
 
-       httpData: function( xhr, type, s ) {
+       httpData: function( xhr, type, filter ) {
                var ct = xhr.getResponseHeader("content-type"),
                        xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
                        data = xml ? xhr.responseXML : xhr.responseText;
                var ct = xhr.getResponseHeader("content-type"),
                        xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
                        data = xml ? xhr.responseXML : xhr.responseText;
@@ -2897,9 +2884,8 @@ jQuery.extend({
                        throw "parsererror";
                        
                // Allow a pre-filtering function to sanitize the response
                        throw "parsererror";
                        
                // Allow a pre-filtering function to sanitize the response
-               // s != null is checked to keep backwards compatibility
-               if( s && s.dataFilter )
-                       data = s.dataFilter( data, type );
+               if( filter )
+                       data = filter( data, type );
 
                // If the type is "script", eval it in global context
                if ( type == "script" )
 
                // If the type is "script", eval it in global context
                if ( type == "script" )
@@ -2915,18 +2901,14 @@ jQuery.extend({
        // Serialize an array of form elements or a set of
        // key/values into a query string
        param: function( a ) {
        // Serialize an array of form elements or a set of
        // key/values into a query string
        param: function( a ) {
-               var s = [ ];
-
-               function add( key, value ){
-                       s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
-               };
+               var s = [];
 
                // If an array was passed in, assume that it is an array
                // of form elements
                if ( a.constructor == Array || a.jquery )
                        // Serialize the form elements
                        jQuery.each( a, function(){
 
                // If an array was passed in, assume that it is an array
                // of form elements
                if ( a.constructor == Array || a.jquery )
                        // Serialize the form elements
                        jQuery.each( a, function(){
-                               add( this.name, this.value );
+                               s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
                        });
 
                // Otherwise, assume that it's an object of key/value pairs
                        });
 
                // Otherwise, assume that it's an object of key/value pairs
@@ -2936,10 +2918,10 @@ jQuery.extend({
                                // If the value is an array then the key names need to be repeated
                                if ( a[j] && a[j].constructor == Array )
                                        jQuery.each( a[j], function(){
                                // If the value is an array then the key names need to be repeated
                                if ( a[j] && a[j].constructor == Array )
                                        jQuery.each( a[j], function(){
-                                               add( j, this );
+                                               s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
                                        });
                                else
                                        });
                                else
-                                       add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
+                                       s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );
 
                // Return the resulting serialization
                return s.join("&").replace(/%20/g, "+");
 
                // Return the resulting serialization
                return s.join("&").replace(/%20/g, "+");
@@ -2993,6 +2975,26 @@ jQuery.fn.extend({
                                });
        },
 
                                });
        },
 
+       slideDown: function(speed,callback){
+               return this.animate({height: "show"}, speed, callback);
+       },
+
+       slideUp: function(speed,callback){
+               return this.animate({height: "hide"}, speed, callback);
+       },
+
+       slideToggle: function(speed, callback){
+               return this.animate({height: "toggle"}, speed, callback);
+       },
+
+       fadeIn: function(speed, callback){
+               return this.animate({opacity: "show"}, speed, callback);
+       },
+
+       fadeOut: function(speed, callback){
+               return this.animate({opacity: "hide"}, speed, callback);
+       },
+
        fadeTo: function(speed,to,callback){
                return this.animate({opacity: to}, speed, callback);
        },
        fadeTo: function(speed,to,callback){
                return this.animate({opacity: to}, speed, callback);
        },
@@ -3001,16 +3003,17 @@ jQuery.fn.extend({
                var optall = jQuery.speed(speed, easing, callback);
 
                return this[ optall.queue === false ? "each" : "queue" ](function(){
                var optall = jQuery.speed(speed, easing, callback);
 
                return this[ optall.queue === false ? "each" : "queue" ](function(){
-               
+                       if ( this.nodeType != 1)
+                               return false;
+
                        var opt = jQuery.extend({}, optall), p,
                        var opt = jQuery.extend({}, optall), p,
-                               hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
-                               self = this;
-       
+                               hidden = jQuery(this).is(":hidden"), self = this;
+
                        for ( p in prop ) {
                                if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
                                        return opt.complete.call(this);
 
                        for ( p in prop ) {
                                if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
                                        return opt.complete.call(this);
 
-                               if ( ( p == "height" || p == "width" ) && this.style ) {
+                               if ( p == "height" || p == "width" ) {
                                        // Store display property
                                        opt.display = jQuery.css(this, "display");
 
                                        // Store display property
                                        opt.display = jQuery.css(this, "display");
 
@@ -3106,19 +3109,6 @@ jQuery.fn.extend({
 
 });
 
 
 });
 
-// Generate shortcuts for custom animations
-jQuery.each({
-       slideDown: { height:"show" },
-       slideUp: { height: "hide" },
-       slideToggle: { height: "toggle" },
-       fadeIn: { opacity: "show" },
-       fadeOut: { opacity: "hide" }
-}, function( name, props ){
-       jQuery.fn[ name ] = function( speed, callback ){
-               return this.animate( props, speed, callback );
-       };
-});
-
 var queue = function( elem, type, array ) {
        if ( elem ){
 
 var queue = function( elem, type, array ) {
        if ( elem ){
 
@@ -3158,7 +3148,7 @@ jQuery.extend({
 
                opt.duration = (opt.duration && opt.duration.constructor == Number ?
                        opt.duration :
 
                opt.duration = (opt.duration && opt.duration.constructor == Number ?
                        opt.duration :
-                       jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds._default;
+                       jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def;
 
                // Queueing
                opt.old = opt.complete;
 
                // Queueing
                opt.old = opt.complete;
@@ -3205,13 +3195,13 @@ jQuery.fx.prototype = {
                (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 
                // Set display property to block for height/width animations
                (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 
                // Set display property to block for height/width animations
-               if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
+               if ( this.prop == "height" || this.prop == "width" )
                        this.elem.style.display = "block";
        },
 
        // Get the current size
        cur: function(force){
                        this.elem.style.display = "block";
        },
 
        // Get the current size
        cur: function(force){
-               if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
+               if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
                        return this.elem[ this.prop ];
 
                var r = parseFloat(jQuery.css(this.elem, this.prop, force));
                        return this.elem[ this.prop ];
 
                var r = parseFloat(jQuery.css(this.elem, this.prop, force));
@@ -3345,19 +3335,23 @@ jQuery.extend( jQuery.fx, {
                slow: 600,
                fast: 200,
                // Default speed
                slow: 600,
                fast: 200,
                // Default speed
-               _default: 400
+               def: 400
        },
        step: {
        },
        step: {
+               scrollLeft: function(fx){
+                       fx.elem.scrollLeft = fx.now;
+               },
+
+               scrollTop: function(fx){
+                       fx.elem.scrollTop = fx.now;
+               },
 
                opacity: function(fx){
                        jQuery.attr(fx.elem.style, "opacity", fx.now);
                },
 
                _default: function(fx){
 
                opacity: function(fx){
                        jQuery.attr(fx.elem.style, "opacity", fx.now);
                },
 
                _default: function(fx){
-                       if( fx.prop in fx.elem ) 
-                               fx.elem[ fx.prop ] = fx.now;
-                       else if( fx.elem.style )
-                               fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+                       fx.elem.style[ fx.prop ] = fx.now + fx.unit;
                }
        }
 });
                }
        }
 });
@@ -3377,7 +3371,7 @@ jQuery.fn.offset = function() {
                    fixed        = css(elem, "position") == "fixed";
 
                // Use getBoundingClientRect if available
                    fixed        = css(elem, "position") == "fixed";
 
                // Use getBoundingClientRect if available
-               if ( !(mozilla && elem == document.body) && elem.getBoundingClientRect ) {
+               if ( elem.getBoundingClientRect ) {
                        var box = elem.getBoundingClientRect();
 
                        // Add the document scroll offsets
                        var box = elem.getBoundingClientRect();
 
                        // Add the document scroll offsets
@@ -3495,7 +3489,7 @@ jQuery.fn.extend({
        },
 
        offsetParent: function() {
        },
 
        offsetParent: function() {
-               var offsetParent = this[0].offsetParent || document.body;
+               var offsetParent = this[0].offsetParent;
                while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
                        offsetParent = offsetParent.offsetParent;
                return jQuery(offsetParent);
                while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
                        offsetParent = offsetParent.offsetParent;
                return jQuery(offsetParent);
index 70f8d2b..70be515 100644 (file)
@@ -56,17 +56,24 @@ euphorik.Conversation = function(conversations, num) {
          '<div class="titre">' +\r
             (reverse ? messageRacineXHTML : "") +\r
             '<div class="nav">' +\r
          '<div class="titre">' +\r
             (reverse ? messageRacineXHTML : "") +\r
             '<div class="nav">' +\r
-               (num === 0 ? '' : '<div class="fermer"></div><div class="lien"></div><div class="reduire"></div>') +\r
+               (this.num === 0 ? '' : '<div class="fermer"></div><div class="lien"></div>') + //</div><div class="reduire">\r
                '<span class="next">&lt;</span><span class="numPage">1</span><span class="prev">&gt;</span>' +\r
             '</div>' +\r
             (reverse ? "" : messageRacineXHTML) +\r
          '</div>' +\r
          (reverse ? "" : messagesXHTML) +\r
                '<span class="next">&lt;</span><span class="numPage">1</span><span class="prev">&gt;</span>' +\r
             '</div>' +\r
             (reverse ? "" : messageRacineXHTML) +\r
          '</div>' +\r
          (reverse ? "" : messagesXHTML) +\r
-         '<div class="messageReduit" style="height:200px; width:50px"></div>' +\r
+         //'<div class="messageReduit" style="height:200px; width:50px"></div>' +\r
       '</td>';\r
     \r
    $("#conversations tr").append(XHTML);\r
    \r
       '</td>';\r
     \r
    $("#conversations tr").append(XHTML);\r
    \r
+   // les infos bulles\r
+   this.util.infoBulle("Aller à la première page", $("#" + this.getId() + " .titre .numPage"), euphorik.Util.positionBulleType.haut);\r
+   if (this.num !== 0) {\r
+      this.util.infoBulle("Créer un lien vers la conversation", $("#" + this.getId() + " .titre .lien"));\r
+      this.util.infoBulle("Fermer la conversation", $("#" + this.getId() + " .titre .fermer"));\r
+   }\r
+   \r
     // les différents événements liés à la conversation\r
    var thisConversation = this;   \r
    $("#" + this.getId() + " .titre .lien").click(function() {\r
     // les différents événements liés à la conversation\r
    var thisConversation = this;   \r
    $("#" + this.getId() + " .titre .lien").click(function() {\r
@@ -76,21 +83,16 @@ euphorik.Conversation = function(conversations, num) {
         );\r
    });   \r
    $("#" + this.getId() + " .titre .fermer").click(function() {\r
         );\r
    });   \r
    $("#" + this.getId() + " .titre .fermer").click(function() {\r
-      thisConversation.conversations.supprimerConversation(num);\r
+      thisConversation.conversations.supprimerConversation(thisConversation.num);\r
    });\r
    });\r
+   /*\r
    $("#" + this.getId() + " .titre .reduire").click(function() {\r
       $("#" + thisConversation.getId() + " .titre, #" + thisConversation.getId() + " .messages").hide()\r
       var e = $("#" + thisConversation.getId() +  " .messageReduit");\r
       e.get()[0].innerHTML = thisConversation.getMessageReduit()\r
    $("#" + this.getId() + " .titre .reduire").click(function() {\r
       $("#" + thisConversation.getId() + " .titre, #" + thisConversation.getId() + " .messages").hide()\r
       var e = $("#" + thisConversation.getId() +  " .messageReduit");\r
       e.get()[0].innerHTML = thisConversation.getMessageReduit()\r
-   });\r
-\r
-   this.util.infoBulle("Aller à la première page", $("#" + this.getId() + " .numPage"), euphorik.Util.positionBulleType.haut);\r
-   if (num !== 0) {\r
-      this.util.infoBulle("Créer un lien vers la conversation", $("#" + this.getId() + " .lien"));\r
-      this.util.infoBulle("Fermer la conversation", $("#" + this.getId() + " .fermer"));\r
-   }\r
+   });*/\r
 };\r
 };\r
-\r
+/*\r
 euphorik.Conversation.prototype.getMessageReduit = function() {\r
    return '' +\r
       '<svg:svg version="1.1" baseProfile="full" width="100px" height="200px">' +\r
 euphorik.Conversation.prototype.getMessageReduit = function() {\r
    return '' +\r
       '<svg:svg version="1.1" baseProfile="full" width="100px" height="200px">' +\r
@@ -99,7 +101,7 @@ euphorik.Conversation.prototype.getMessageReduit = function() {
             'Blabla blablablabla bla blabla ..' +\r
          '</svg:text>' +\r
       '</svg:svg>';\r
             'Blabla blablablabla bla blabla ..' +\r
          '</svg:text>' +\r
       '</svg:svg>';\r
-}\r
+}*/\r
 \r
 /**\r
   * @racine un message représentant la racine de la conversation, vaut undefined pour la conversation générale\r
 \r
 /**\r
   * @racine un message représentant la racine de la conversation, vaut undefined pour la conversation générale\r
@@ -307,31 +309,27 @@ euphorik.Conversation.prototype.attacherEventsSurMessage = function(element) {
    $(element).click(function(event) {\r
       if ($(event.target).is("a") || $(event.target).parents("#outilsBan").length > 0) {\r
          return;\r
    $(element).click(function(event) {\r
       if ($(event.target).is("a") || $(event.target).parents("#outilsBan").length > 0) {\r
          return;\r
+      } else if ($(event.target).is(".extraire")) {\r
+         thisConversation.util.outilsMessage.hide();\r
+         thisConversation.conversations.ouvrirConversation(idMess);\r
+         return;\r
+      } else if ($(event.target).is(".extraireCompletement")) {\r
+         thisConversation.util.outilsMessage.hide();\r
+         thisConversation.conversations.ouvrirConversation(thisConversation.messagesParId[idMess].racineId);\r
+         return;\r
       }\r
 \r
       // met ou enlève la mise en evidence du message\r
       thisConversation.conversations.toggleMessageRepond(thisConversation.messagesParId[idMess]);\r
       }\r
 \r
       // met ou enlève la mise en evidence du message\r
       thisConversation.conversations.toggleMessageRepond(thisConversation.messagesParId[idMess]);\r
-         \r
+\r
       // donne le focus à la ligne de saisie\r
       $("form input.message").focus();\r
       // donne le focus à la ligne de saisie\r
       $("form input.message").focus();\r
-   }).hover(function(event) { // affiche les outils liées au message\r
+   }).hover(function() { // affiche les outils liées au message\r
       var top = $(this).offset().top\r
       var top = $(this).offset().top\r
-      var left = $(this).offset().left + $(this).width() - thisConversation.util.outilsMessage.width()\r
+      var left = $(this).offset().left + $(this).width() - thisConversation.util.outilsMessage.largeur\r
       thisConversation.util.outilsMessage.css("top", top + 1).css("left", left).prependTo(this).show();\r
       thisConversation.util.outilsMessage.css("top", top + 1).css("left", left).prependTo(this).show();\r
-      //TODO\r
-      //\r
-      // extraction d'une conversation\r
-      /*if ($(event.target).is(".extraire")) {\r
-         thisConversation.conversations.ouvrirConversation(idMess);\r
-         return;\r
-      }\r
-\r
-      if ($(event.target).is(".extraireCompletement")) {\r
-         thisConversation.conversations.ouvrirConversation(thisConversation.messagesParId[idMess].racineId);\r
-         return;\r
-      }*/\r
-   }, function(event) {\r
-      thisConversation.util.outilsMessage.hide();\r
+   }, function() {\r
+      thisConversation.util.outilsMessage.hide()\r
    });\r
 \r
    // mise en évidence de la conversation\r
    });\r
 \r
    // mise en évidence de la conversation\r
@@ -440,8 +438,7 @@ euphorik.Conversation.prototype.afficherConversation = function(id) {
 };\r
 \r
 /**\r
 };\r
 \r
 /**\r
-  * Supprime une conversation.\r
-  * Ne l'enlève pas du DOM.\r
+  * Supprime la conversation du DOM.\r
   */\r
 euphorik.Conversation.prototype.supprimer = function() {\r
    $("#" + this.getId()).remove();\r
   */\r
 euphorik.Conversation.prototype.supprimer = function() {\r
    $("#" + this.getId()).remove();\r
index 90e5943..b99e092 100644 (file)
@@ -298,7 +298,7 @@ euphorik.Conversations.prototype.supprimerConversation = function(num) {
    }\r
    this.conversations[num].supprimer();\r
    \r
    }\r
    this.conversations[num].supprimer();\r
    \r
-   // décalage TODO : supprimer le dernier élément \r
+   // les numéros sont réassigné\r
    for (var i = num; i < this.conversations.length - 1; i++) {\r
       this.conversations[i] = this.conversations[i+1];\r
       this.conversations[i].num -= 1;\r
    for (var i = num; i < this.conversations.length - 1; i++) {\r
       this.conversations[i] = this.conversations[i+1];\r
       this.conversations[i].num -= 1;\r
index e952281..64914b1 100755 (executable)
@@ -98,6 +98,7 @@ euphorik.PageMinichat.prototype.charger = function() {
    
    // la barre d'outils liée à chaque message
    this.util.outilsMessage = $('<div class="outilsMess"><div class="extraire"></div><div class="extraireCompletement"></div></div>').prependTo("#page.minichat")
    
    // la barre d'outils liée à chaque message
    this.util.outilsMessage = $('<div class="outilsMess"><div class="extraire"></div><div class="extraireCompletement"></div></div>').prependTo("#page.minichat")
+   this.util.outilsMessage.largeur = this.util.outilsMessage.width(); // TODO : gros cheat pas beau :O
    this.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", this.util.outilsMessage));
    this.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", this.util.outilsMessage));
    
    this.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", this.util.outilsMessage));
    this.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", this.util.outilsMessage));
    
@@ -285,10 +286,6 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(pseudo, message) {
       },
       true,
       {
       },
       true,
       {
-         beforeSend : function(xmlHttpRequest) {
-            // TODO : ça marche ça ??
-            xmlHttpRequest.setRequestHeader("X-Requested-With", "");
-         },
          error : function() {
             thisPageMinichat.envoieMessageEnCours = false;
          }
          error : function() {
             thisPageMinichat.envoieMessageEnCours = false;
          }
index 6804ed4..ea8ef3b 100755 (executable)
 #page.minichat .outilsMess {
    position: absolute;
        display: none;
 #page.minichat .outilsMess {
    position: absolute;
        display: none;
-       opacity: 0.6;
-       
-       /* Hack IE 7 */ 
-       filter: alpha(opacity = 60);
-       zoom: 1
 }
 #page.minichat .extraire {
        float: right;
 }
 #page.minichat .extraire {
        float: right;