Created
May 9, 2010 21:32
-
-
Save Panya/395433 to your computer and use it in GitHub Desktop.
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
// main_page.js | |
tasksList: SC.ScrollView.design({ | |
layout: { top: 30, bottom: 0, left: 0, width: 299 }, | |
hasHorizontalScroller: NO, | |
contentView: SC.ListView.design({ | |
contentBinding: 'MyApp.tasksController.arrangedObjects', | |
selectionBinding: 'MyApp.tasksController.selection', | |
rowHeight: 29, | |
contentValueKey: 'name', | |
canEditContent: YES | |
}) | |
}) | |
// controllers/tasks.js | |
MyApp.tasksController = SC.ArrayController.create({ | |
content: null, | |
selection: null | |
}); | |
// main.js | |
var firstProject = MyApp.store.find(MyApp.Project, 1), | |
firstProjectTasks = firstProject.get('tasks'); | |
MyApp.tasksController.set('content', firstProjectTasks); | |
// and sure i have some fixtures for tasks and projects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment