Sha256: 0232960ae98f9eaa2842b73c2ac67b69e5d7647599b486c72fe1c437ea0be93d

Contents?: true

Size: 722 Bytes

Versions: 11

Compression:

Stored size: 722 Bytes

Contents

Informant.SidebarView = Backbone.View.extend({
  el: $('#sidebar'),
  initialize: function(options) {
    _.bindAll(this, 'render');
    this.collection.bind('refresh', this.render);
    
    this.el.activity();
  },

  render: function() {
    this.el.activity();
    this.el.empty();
    this.el.html(Informant.JST.sidebar({collection: this.collection}));

    this.$('.current').removeClass('current');
    this.$('a[href="' + Informant.App._current_nav_link + '"]').parent().addClass('current');
    
    this.el.activity(false);
    
    $('.sitemap a').bind('click', function() {
      $('.sitemap .current').removeClass('current');
      $(this).parent().addClass('current');
    });  
    
    return this;
  }
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
c2-0.1.13 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.12 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.11 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.10 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.9 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.8 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.7 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.6 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.5 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.4 public/javascripts/c2/informant/views/sidebar.js
c2-0.1.3 public/javascripts/c2/informant/views/sidebar.js