Sha256: 03dac9dcd2933e84cb0c0ea280ff90c56f8a95ad7d728acd2f8e59fc880fba66

Contents?: true

Size: 868 Bytes

Versions: 185

Compression:

Stored size: 868 Bytes

Contents

HAL.Views.Inspector = Backbone.View.extend({
  initialize: function(opts) {
    this.vent = opts.vent;

    _.bindAll(this, 'renderDocumentation');
    _.bindAll(this, 'renderResponse');

    this.vent.bind('show-docs', this.renderDocumentation);
    this.vent.bind('response', this.renderResponse);
  },

  className: 'inspector span6',

  render: function() {
    this.$el.html(this.template());
  },

  renderResponse: function(response) {
    var responseView = new HAL.Views.Response({ vent: this.vent });

    this.render();
    responseView.render(response);

    this.$el.append(responseView.el);
  },

  renderDocumentation: function(e) {
    var docView = new HAL.Views.Documenation({ vent: this.vent });

    this.render();
    docView.render(e.url);

    this.$el.append(docView.el);
  },

  template: function() {
    return '<h1>Inspector</h1>';
  }
});

Version data entries

185 entries across 185 versions & 1 rubygems

Version Path
pact_broker-2.93.2 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.93.1 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.93.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.92.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.91.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.90.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.89.1 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.89.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.88.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.87.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.86.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.85.1 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.85.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.84.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.83.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.82.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.81.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.80.0 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.79.1 vendor/hal-browser/js/hal/views/inspector.js
pact_broker-2.79.0 vendor/hal-browser/js/hal/views/inspector.js