Created
March 1, 2011 21:04
-
-
Save topherfangio/849887 to your computer and use it in GitHub Desktop.
Basic code for creating a TemplateCollectionView
This file contains 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
Pharos360.main = function main() { | |
Pharos360.getPath('mainPage.mainPane').append(); | |
Pharos360.studentsController.set('content', Pharos360.store.find(Pharos360.Student)); | |
}; | |
function main() { Pharos360.main(); } |
This file contains 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
... | |
detailView: SC.ScrollView.design({ | |
layout: { top: 10, bottom: 10, left: 251, right: 10 }, | |
hasHorizontalScroller: NO, | |
backgroundColor: 'white', | |
contentView: Pharos360.StudentsListView.design({ | |
layout: { top: 0, left: 0, right: 0, bottom: 0 } | |
}) | |
}) | |
... |
This file contains 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
Pharos360.studentsController = SC.ArrayController.create( | |
/** @scope Pharos360.studentsController.prototype */ { | |
// TODO: Add your own code here. | |
}) ; |
This file contains 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
Pharos360.StudentsListView = SC.TemplateCollectionView.extend( | |
/** @scope Pharos360.StudentListView.prototype */ { | |
templateName: 'students_list', | |
contentBinding: 'Pharos360.studentsController' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment