Sha256: 80843fb00b64a1fc95dfddc41f145c3893f09823f1a3654f1975b24a5f1120d1

Contents?: true

Size: 458 Bytes

Versions: 20

Compression:

Stored size: 458 Bytes

Contents

/* FIXME: Later on this should be a class */
JsChat.Request = {
  get: function(url, callback) {
    new Ajax.Request(url, {
      method: 'get',
      parameters: { time: new Date().getTime(), room: PageHelper.currentRoom() },
      onFailure: function() {
        Display.add_message("Server error: couldn't access: #{url}".interpolate({ url: url }), 'server');
      },
      onComplete: function(transport) { return callback(transport); }
    });
  }
};

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
jschat-0.3.7 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.6 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.5 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.3 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.2 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.1 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.3.0 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.9 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.8 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.7 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.6 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.5 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.4 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.3 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.2 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.1 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.2.0 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.1.5 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.1.2 lib/jschat/http/public/javascripts/app/protocol/chat_request.js
jschat-0.1.1 lib/jschat/http/public/javascripts/app/protocol/chat_request.js