Sha256: 7c944fd96f8fe5f431a2282b11fcdbe6953b4ec5aafe37a5f2cff78fd2a0bad7
Contents?: true
Size: 781 Bytes
Versions: 23
Compression:
Stored size: 781 Bytes
Contents
define(["view/base"],function(e){var t=e.extend({subscriptions:{"view:dashboard:save":"render","view:adddashboard:save":"render","view:addcategory:save":"render"},initialize:function(e){_.bindAll(this),this.templar=e.templar,this.user=e.user,Backbone.history.bind("all",function(){this.setNav()}.bind(this))},render:function(){this.$el.empty(),this.collection.fetch({success:function(){this.collection.sort(),this.templar.render({path:"primarynav",el:this.$el,data:{nav:this.collection.toJSON(),user:this.user.toJSON()}})}.bind(this)}),this.$el.find(".user").tooltip({placement:"bottom"})},setNav:function(){var e=Backbone.history.fragment;switch(this.$el.find("li").removeClass("active"),e){case"ecosystem":this.$el.find(".nav > li:first-child").addClass("active")}}});return t});
Version data entries
23 entries across 23 versions & 1 rubygems