var Channel = Backbone.Model.extend();

var Channels = Backbone.Collection.extend({
  model: Channel
});

var ActiveChannel = Backbone.View.extend({
  tagName: "div",
  className: "active-channel",
  template: '<div class="container">{{content}}</div>',

  render: function() {
    this.$el.html(this.template.replace("{{content}}", this.model.attributes["data"]));
    $("#main-data").first.html($this.$el.html);
  },

  initialize: function() {
    this.listenTo(this.model, "change", this.render);
    this.render();
  }

});

var ChannelTab = Backbone.View.extend({

  tagName: "li",

  className: "",

  template: '<a class="select" href="#">{{name}}</a>',

  render: function() {
    this.$el.html(this.template.replace("{{name}}", this.model.attributes["name"]));
    return this;
  },

  select: function() {
    // Callback to inspect this node goes here
  },

  events: {
    "click .select":          "select"
  },

  install: function() {
    $('#channels-content')[0].appendChild(this.el);
  },

  initialize: function() {
    this.listenTo(this.model, "change", this.render);
    this.render();
    this.install();
  }

});

groundstation_channels = new Channels();
groundstation_channels.url = '/channels';

@@ -103,432 +103,8 @@
 );%0A%0A
-var ActiveChannel = Backbone.View.extend(%7B%0A  tagName: %22div%22,%0A  className: %22active-channel%22,%0A  template: '%3Cdiv class=%22container%22%3E%7B%7Bcontent%7D%7D%3C/div%3E',%0A%0A  render: function() %7B%0A    this.$el.html(this.template.replace(%22%7B%7Bcontent%7D%7D%22, this.model.attributes%5B%22data%22%5D));%0A    $(%22#main-data%22).first.html($this.$el.html);%0A  %7D,%0A%0A  initialize: function() %7B%0A    this.listenTo(this.model, %22change%22, this.render);%0A    this.render();%0A  %7D%0A%0A%7D);%0A%0A
 var 

Delete unused view