flowerbox/lib/assets/javascripts/flowerbox.js.coffee

21 lines
380 B
CoffeeScript
Raw Normal View History

2012-03-13 17:21:32 +00:00
#= require_self
#= require flowerbox/result
#= require flowerbox/exception
#
2012-03-02 18:28:52 +00:00
Flowerbox =
debug: false
2012-03-13 17:21:32 +00:00
ping: ->
Flowerbox.contact('ping')
2012-03-15 15:57:35 +00:00
2012-03-02 18:28:52 +00:00
contact: (url, data...) ->
Flowerbox.started = true
if !Flowerbox.debug
Flowerbox.socket.send(JSON.stringify([ url, data ]))
Flowerbox.done = true if url == 'results'
2012-03-13 17:21:32 +00:00
2012-03-15 15:57:35 +00:00
started: false
done: false
2012-03-03 16:28:03 +00:00
fail: ->
2012-03-13 17:21:32 +00:00