Created
June 4, 2011 20:19
-
-
Save drnic/1008311 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.noticesListController = SC.ArrayController.create({ | |
// Initialize the array controller with an empty array. | |
content: [] | |
}); | |
App.NoticeCollectionView = SC.TemplateCollectionView.extend({ | |
contentBinding: 'App.noticesListController', | |
tagName: 'div', | |
classNames: ['message', 'notices'], | |
itemView: SC.TemplateView.extend({ | |
tagName: 'p', | |
classNames: ['notice'], | |
mouseDown: function(evt) { | |
var notice = this.get('content'); | |
notice.destroy(); | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment