Sha256: 56a600a813a531a0ff462b12d60cf962294e1144a16e0ee299c33380be2f9282

Contents?: true

Size: 685 Bytes

Versions: 129

Compression:

Stored size: 685 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.updateDefaultHeaders(headers)
  },

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

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

Version data entries

129 entries across 129 versions & 1 rubygems

Version Path
pact_broker-2.38.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.37.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.36.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.36.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.35.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.34.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.33.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.32.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.31.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.30.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.29.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.6 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.5 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.4 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.3 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.2 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.27.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.26.1 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.26.0 vendor/hal-browser/js/hal/views/request_headers.js
pact_broker-2.25.0 vendor/hal-browser/js/hal/views/request_headers.js