Skip to content

Instantly share code, notes, and snippets.

View charlesjolley's full-sized avatar

Charles Jolley charlesjolley

View GitHub Profile
BlogMe.postController = SC.ObjectController.create({
contentBinding: 'BlogMe.postsController.selection'
});
@charlesjolley
charlesjolley / index.rhtml
Created January 23, 2011 22:33
In index.rhtml
<% if config.html5_history %>
<script>
SC.routes.baseURI = <% "#{config.index_root}/#{config.language}".to_json %>;
SC.routes.wantsHistory = true;
</script>
<% end %>
SC.Enumerable = SC.Mixin.create({
forEach: SC.Mixin.required(),
init: SC.Mixin.concat(),
destroy: SC.Mixin.concat(),
map: function(f, ctx) {
var ret = [];
if (!ctx) ctx = this;
this.forEach(function(x) { ret.push(f.call(ctx,x)); });
<div class="card">
{{view image}}
<h1>{{firstName}} {{lastName}}</h1>
</div>

SproutCore Committers and Reviewer Policy

SproutCore has three kinds of special status beyond being a contributor. Committers have direct read-write access to the Git repository, enabling them to commit changes by themselves or others once reviewed. Reviewers are permitted to review patches and may grant or deny approval for committing. SproutCore Core Team members set the overall direction of the project and manage long term plans. Details of the review and commit process are available on the contribution page.

New SproutCore Committers and Reviewers are selected by existing Reviewers. New Core Team members are selected by the existing Core Team

An up to date list of current SproutCore Committers, Reviewers and Core Team members is maintained at sproutcore.com.

Choosing Committers and Reviewers

<h1>Todos</h1>
{{#view "createTextField"}}
<input id="new-todo" type="text" placeholder="What needs to be done?">
{{/view}}
{{#view "list"}}
<div id="stats">
<span class='todo-count'>
<span class='number'>{{remainingTodosCount}}</span>
MyView = SC.View.design({
content: null,
fooBinding: 'this.content.foo',
barBinding: 'this.content.bar',
bazBinding: 'this.content.baz'
});
// ==========================================================================
// Project: Ux.ButtonView
// Copyright: ©2011 My Company, Inc.
// ==========================================================================
/*globals Ux Ki */
/** @class
(Document Your View Here)
// ==========================================================================
// Project: Ux.ButtonView
// Copyright: ©2011 My Company, Inc.
// ==========================================================================
/*globals Ux Ki */
/** @class
(Document Your View Here)
// add to the 'content' file
headerStyle: function() {
return [this.get('header_font'), this.get('header_size'), this.get('header_weight')].join(' ');
}.property('header_font', 'header_size', 'header_weight').cacheable()