Disabled web socket stuff.

This commit is contained in:
Martin Edenhofer 2012-05-06 22:46:41 +02:00
parent e6eaad4316
commit b026113a34

View file

@ -61,6 +61,7 @@ class App.Ajax
processData: false processData: false
headers: {'X-Requested-With': 'XMLHttpRequest'} headers: {'X-Requested-With': 'XMLHttpRequest'}
cache: false cache: false
async: true
ajax: (params, defaults) -> ajax: (params, defaults) ->
$.ajax($.extend({}, @defaults, defaults, params)) $.ajax($.extend({}, @defaults, defaults, params))
@ -203,26 +204,26 @@ class App.Run extends Spine.Controller
window.Session['UISeletion'] = @getSelected() + '' window.Session['UISeletion'] = @getSelected() + ''
) )
@ws = new WebSocket("ws://localhost:3001/"); # @ws = new WebSocket("ws://localhost:3001/");
# Set event handlers. # Set event handlers.
@ws.onopen = -> # @ws.onopen = ->
console.log("onopen") # console.log("onopen")
@ws.onmessage = (e) -> # @ws.onmessage = (e) ->
# e.data contains received string. # e.data contains received string.
console.log("onmessage: " + e.data) # console.log("onmessage: " + e.data)
eval e.data # eval e.data
Spine.bind 'ws:send', (data) => # Spine.bind 'ws:send', (data) =>
@log 'ws:send', data # @log 'ws:send', data
@ws.send(data); # @ws.send(data);
@ws.onclose = -> # @ws.onclose = ->
console.log("onclose") # console.log("onclose")
@ws.onerror = -> # @ws.onerror = ->
console.log("onerror") # console.log("onerror")
getSelected: -> getSelected: ->
text = ''; text = '';