Skip to content

Commit

Permalink
toggle highlighting on clicked row
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Oct 22, 2013
1 parent 86c2f5b commit 34ff4cb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion assets/js/apps/contacts/list/list_view.js
@@ -1,7 +1,15 @@
ContactManager.module("ContactsApp.List", function(List, ContactManager, Backbone, Marionette, $, _){
List.Contact = Marionette.ItemView.extend({
tagName: "tr",
template: "#contact-list-item"
template: "#contact-list-item",

events: {
"click": "highlightName"
},

highlightName: function(e){
this.$el.toggleClass("warning");
}
});

List.Contacts = Marionette.CompositeView.extend({
Expand Down

0 comments on commit 34ff4cb

Please sign in to comment.