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.labelsController = SC.ArrayController.create( | |
/** @scope Pharos360.labels.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
def create | |
if params[:member_id] and params[:title] | |
# Periods in a username will have been translated to underscores | |
member_id = params[:member_id].gsub('_', '.') | |
title = params[:title] | |
@member = Member.find(member_id) | |
@label = Label.new(:username => member_id, :title => title) | |
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
// Inside of Pharos360.studentsController, called whenever an element is clicked | |
this.set('content', Pharos360.store.find(Pharos360.Student)); | |
// Inside my statechart | |
Pharos360.store.loadRecords(Pharos360.Student, students); | |
var students = Pharos360.store.find(Pharos360.Student); | |
Pharos360.studentsController.set('content', students); |
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.Course = SC.Record.extend( | |
/** @scope Pharos360.Course.prototype */ { | |
primaryKey: 'number', | |
number: SC.Record.attr(Number), | |
title: SC.Record.attr(String), | |
faculty_uid: SC.Record.attr(String), | |
credit_hours: SC.Record.attr(String), | |
days: SC.Record.attr(String), |
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
// Run this in your console/code. | |
MyApp.mainPage.getPath('mainPane.containerView.testContainerView').set('nowShowing', "MyApp.testView"); |
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
You can also find all records of a certain type and all its subclasses: | |
<javascript> | |
allRecords = MyApp.store.find(SC.Record); | |
</javascript> |
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: Pharos360 | |
# Copyright: ©2011 My Company, Inc. | |
# =========================================================================== | |
# Add initial buildfile information here | |
config :core_360, :required => [ :sproutcore, :ki ] | |
config :pharos360, :required => [ | |
:core_360, | |
'endash/table', | |
'shared', |
OlderNewer