(function() {

var StatusDisplay;

StatusDisplay = (function() {
  StatusDisplay.prototype.status_history = [];

  StatusDisplay.prototype.waiting_statuses = [];

  StatusDisplay.prototype.max_statuses = 10;

  function StatusDisplay(ws, target) {
    this.ws = ws;
    this.target = target;
    this.target.click((function(_this) {
      return function() {
        return _this.show_history();
      };
    })(this));
  }

  StatusDisplay.prototype.show_status = function(data) {
    this.target.html(this.ws.escape(data.text, data));
    return this.status_history.push(data);
  };

  StatusDisplay.prototype.show_history = function() {
    var item, message;
    console.log(this.status_history);
    message = "<ul>" + (((function() {
      var i, len, ref, results;
      ref = this.status_history;
      results = [];
      for (i = 0, len = ref.length; i < len; i++) {
        item = ref[i];
        results.push("<li>" + (this.ws.escape(item.text, item)) + "</li>");
      }
      return results;
    }).call(this)).join("\n")) + "</ul>";
    $('#dialog > #content > #message').html(message);
    $('#dialog').show();
    return $('#dialog > #content > #ok').click(function() {
      return $('#dialog').hide();
    });
  };

  return StatusDisplay;

})();

window.StatusDisplay = StatusDisplay;

}).call(this);