This file contains hidden or 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
/** | |
* Imagine if you will that the content of this controller is set to a bunch of MyApp.Person records. For whatever reason | |
* we don't want to pass those records as is to the controller or view using peopleController objects. | |
*/ | |
MyApp.peopleController = SC.ArrayController.create({ | |
// Override to provide the proper object for our consumer of peopleController objects. | |
objectAt: function (idx) { | |
var content = this.get('content'), | |
person, |
This file contains hidden or 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: SC.CollectionColumnDelegate | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals SC */ | |
/** | |
@namespace | |
CollectionColumnDelegates are consulted by SC.HorizontalListView to |
This file contains hidden or 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
// ... | |
/** | |
A list of any attributes that are expected to be empty when the record | |
is initially loaded. | |
This property is very useful for working with partially loaded records in | |
order to efficiently bring in the full data only when necessary. | |
# What is a partially loaded record? |
This file contains hidden or 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
MyApp.statechart = SC.Statechart.create({ | |
// Root state | |
rootState: SC.State.design({ | |
// Properties | |
initialSubstate: 'loggedOutState', | |
// Actions & Events |
This file contains hidden or 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: SproutCore | |
// Copyright: ©2012 7x7 Software, Inc. | |
// License: Licensed under MIT license | |
// ========================================================================== | |
/** | |
@class |
This file contains hidden or 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
MyApp.Group = SC.Record.extend({ | |
name: SC.Record.attr(String), | |
people: function () { | |
var query, | |
ret; | |
query = SC.Query.local(MyApp.Person, { | |
conditions: 'group = {self}', |
This file contains hidden or 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
MyApp.SectionState = SC.State.extend({ | |
initialSubstate: 'noCategory', | |
noCategory: SC.State.extend({ | |
representRoute: 'sections/:section_id', | |
enterState: function (context) { | |
var section = context.section; |
This file contains hidden or 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: SproutCore | |
// Copyright: ©2013 7x7 Software, Inc. | |
// License: Licensed under MIT license | |
// ========================================================================== | |
/*global SC */ | |
/** @class | |
*/ |
This file contains hidden or 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
# ruby phonegap-sc.rb -a alfresco -o ../output/path | |
require 'fileutils' | |
require 'pathname' | |
require 'optparse' | |
config = {} | |
argparser = OptionParser.new {|opts| | |
opts.on('-a', '--application-name [name]', "The application name (required)"){|name| | |
config[:app_name] = name | |
} |
This file contains hidden or 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
SC.ArrayController.reopen({ | |
proxyItem: null, | |
indexOf: function (object, startAt) { | |
var content = this._scac_observableContent(); | |
if (this.proxyItem) { | |
object = object.get('content'); | |
} |