Sha256: 24664aadf0581d62a0d319d74e39fbba785a898dde0203be0dec18ae0b83b55a

Contents?: true

Size: 717 Bytes

Versions: 82

Compression:

Stored size: 717 Bytes

Contents

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

    _.bindAll(this, 'updateRequestHeaders');

    this.vent.bind('app:loaded', function() {
      self.updateRequestHeaders();
    });
  },

  className: 'request-headers',

  events: {
    'blur textarea': 'updateRequestHeaders'
  },

  updateRequestHeaders: function(e) {
    var inputText = this.$('textarea').val() || '';
        headers = HAL.parseHeaders(inputText);
    HAL.client.updateHeaders(_.defaults(headers, HAL.client.defaultHeaders))
  },

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

  template: _.template($('#request-headers-template').html())
});

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
pact_broker-2.112.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.111.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.109.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.109.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.108.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.107.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.107.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.107.0.beta.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.106.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.105.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.104.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.103.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.102.2 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.102.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.102.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.101.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.100.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.99.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.98.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.97.0 vendor/hal-browser/js/hal/views/request_headers.js