Created
June 14, 2010 23:01
-
-
Save joegaudet/438454 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
// ========================================================================== | |
// Project: DarkHorse.CourseView | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals DarkHorse SCUI*/ | |
/** @class | |
(Document Your View Here) | |
@extends SC.View | |
*/ | |
DarkHorse.CourseView = SC.View.extend(DarkHorse.MatygoView, SC.NavigationBuilder, | |
/** @scope DarkHorse.CourseView.prototype */ | |
{ | |
childViews: ["contentView"], | |
course: null, | |
trayName: null, | |
init: function() { | |
if (this.course) { | |
var name = this.course.get('name'); | |
this.trayName = name; | |
this.topToolbar = DarkHorse.MatygoToolBar.design({ | |
hasMinimize: true, | |
hasBack: true, | |
hasClose: true, | |
titleText: name | |
}); | |
} | |
sc_super(); | |
}, | |
contentView: SC.TabView.design({ | |
layout: { | |
top: 10, | |
right: 10, | |
bottom: 10, | |
left: 10 | |
}, | |
items: [ | |
{ title: 'News', value: 'news' }, | |
{ title: 'Assignments', value: 'DarkHorse.CourseView.AssignmentsView' }, | |
{ title: 'Grades', value: 'grades' }, | |
{ title: 'Discussion', value: 'discuss' }, | |
{ title: 'Resources', value: 'resources' } | |
], | |
itemTitleKey: 'title', | |
itemValueKey: 'value', | |
value: 'news' | |
}), | |
AssignmentsView: SC.View.design({ | |
layout: { top: 0, right: 0, bottom: 0, left: 0 }, | |
childViews: 'viewName'.w(), | |
backgroundColor: 'red' | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment