Sha256: 7e95761011dc383280a668d4b110991cedf1062c98b908e1adc1af1d6b7853c8

Contents?: true

Size: 675 Bytes

Versions: 5

Compression:

Stored size: 675 Bytes

Contents

class StatusDisplay
  status_history: []
  waiting_statuses: []
  max_statuses: 10
  constructor: (@ws, @target) ->
    console.log("Setting up status bar at #{@target}")
    @target.click =>
      @show_history()

  show_status: (data) ->
    @target.html(@ws.escape(data.text, data))
    @status_history.push data
    console.log(@status_history)

  show_history: ->
    console.log(@status_history)
    message = "<ul>#{("<li>#{@ws.escape(item.text, item)}</li>" for item in @status_history).join("\n")}</ul>"
    $('#dialog > #message').html(message)
    $('#dialog').show()
    $('#dialog > #ok').click ->
      $('#dialog').hide()

window.StatusDisplay = StatusDisplay

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flammarion-0.0.10 lib/html/source/javascripts/status.coffee
flammarion-0.0.9 lib/html/source/javascripts/status.coffee
flammarion-0.0.8 lib/html/source/javascripts/status.coffee
flammarion-0.0.7 lib/html/source/javascripts/status.coffee
flammarion-0.0.6 lib/html/source/javascripts/status.coffee