Sha256: 0dc057d28e6f87baaab4b5c3a99c0c57bba36deedae28c63a9b9f9322d677b86

Contents?: true

Size: 1.37 KB

Versions: 9

Compression:

Stored size: 1.37 KB

Contents

(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);

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flammarion-1.0.1 lib/html/build/javascripts/status.js
flammarion-1.0.0 lib/html/build/javascripts/status.js
flammarion-0.3.0 lib/html/build/javascripts/status.js
flammarion-0.2.1 lib/html/build/javascripts/status.js
flammarion-0.2.0 lib/html/build/javascripts/status.js
flammarion-0.1.14 lib/html/build/javascripts/status.js
flammarion-0.1.13 lib/html/build/javascripts/status.js
flammarion-0.1.12 lib/html/build/javascripts/status.js
flammarion-0.1.11 lib/html/build/javascripts/status.js