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