Changeset 45 for web

Show
Ignore:
Timestamp:
02/08/08 19:24:35 (4 years ago)
Author:
mike
Message:

Got ucommet working

Location:
web/js
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • web/js/jquery.comet.js

    r42 r45  
    1818                this.connectionType = (this._bXD) ? 'callback-polling' : 'long-polling'; 
    1919 
    20                 this.startup = function(oReturn, fCallback) 
     20                this.startup = function(oReturn) 
    2121                { 
    2222                        if(this._comet._bConnected) return; 
    23                         this.tunnelInit(fCallback); 
     23                        this.tunnelInit(); 
    2424                }; 
    2525 
     
    3434                        }; 
    3535 
    36                         this.openTunnel(msgConnect,fCallback); 
    37                 }; 
    38  
    39                 this.openTunnel = function(oMsg, fCallback) 
     36                        this.openTunnel(msgConnect); 
     37                }; 
     38 
     39                this.openTunnel = function(oMsg) 
    4040                { 
    4141                        $.comet._bPolling = true; 
    42                         var fc = fCallback; 
    4342                        this._send($.comet._sUrl, [oMsg], function(sReturn) 
    4443                        { 
    45                                 if( fc ) { fc(); } 
    4644                                var oReturn = (typeof sReturn != "object") ? (eval('(' + sReturn + ')')) : sReturn; 
    4745                                $.comet._bPolling = false; 
     
    209207                                // pick transport ? 
    210208                                // ...... 
    211  
     209                                fCallback() 
    212210                                $.comet._oTransport._comet = $.comet; 
    213211                                $.comet._oTransport.version = $.comet.version; 
    214212                                $.comet.clientId = oReturn.clientId; 
    215                                 $.comet._oTransport.startup(oReturn,fCallback); 
     213                                $.comet._oTransport.startup(oReturn); 
    216214                                $.comet.endBatch(); 
    217215                        } 
  • web/js/poker-client.js

    r42 r45  
    173173$(document).ready(function() { 
    174174        //$("form#connect_form").hide(); 
    175                 // 
    176175                $.comet.init("/cometd", function() { 
    177                         $.comet.subscribe("/poker", processStatus);}) 
     176                        $.comet.subscribe("/poker",processStatus);}) 
     177 
    178178 
    179179                sel = $('selector');