mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Order /courses classrooms most recent first
This commit is contained in:
parent
dfdb57e18f
commit
527ba277ab
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ module.exports = class CoursesView extends RootView
|
||||||
@listenToOnce @courseInstances, 'sync', @onCourseInstancesLoaded
|
@listenToOnce @courseInstances, 'sync', @onCourseInstancesLoaded
|
||||||
@supermodel.loadCollection(@courseInstances, { cache: false })
|
@supermodel.loadCollection(@courseInstances, { cache: false })
|
||||||
@classrooms = new CocoCollection([], { url: "/db/classroom", model: Classroom})
|
@classrooms = new CocoCollection([], { url: "/db/classroom", model: Classroom})
|
||||||
|
@classrooms.comparator = (a, b) -> b.id.localeCompare(a.id)
|
||||||
@supermodel.loadCollection(@classrooms, { data: {memberID: me.id}, cache: false })
|
@supermodel.loadCollection(@classrooms, { data: {memberID: me.id}, cache: false })
|
||||||
@ownedClassrooms = new Classrooms()
|
@ownedClassrooms = new Classrooms()
|
||||||
@ownedClassrooms.fetchMine({data: {project: '_id'}})
|
@ownedClassrooms.fetchMine({data: {project: '_id'}})
|
||||||
|
|
Loading…
Reference in a new issue