Beginning of Add New Profile button

This commit is contained in:
Mark McDowall 2012-12-04 17:21:54 -08:00
commit ae8db51839
7 changed files with 81 additions and 20 deletions

View file

@ -72,5 +72,13 @@ QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({
this.collection = new QualityProfileCollection();
this.collection.fetch();
this.collection.bind('reset', this.render);
},
events: {
'click #add-profile': 'addProfile'
},
addProfile: function (e) {
//Add new profile to collection
this.collection.add(new QualityProfile());
e.preventDefault();
}
});