 #= require vendor/backbone
 $ ->
   source = new EventSource '/subscribe'
-  window.flatware = new Flatware
+  window.flatware = new FWF.Flatware
   source.onmessage = (e)->
     [event, data] = JSON.parse e.data
     flatware.trigger event, data


  title: -> @id.match(/\/(.*)\./)[1].replace /_/g, ' '

class Worker extends Backbone.Model
  defaults:
    status: 'waiting'
    dots: []

      @trigger 'assigned', worker, job if job
      @set dots: []

class FWF.Workers extends Backbone.Collection
  model: FWF.Worker
  initialize: ->
    @on 'add', @sort
  comparator: (model)-> model.id

View = FWF.View = {}

class View.Job extends Backbone.View
  tagName: 'li'
