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
{ | |
"_rev": "123", | |
"content": [ | |
{ | |
"_id": "abc", | |
"_rev": "123", | |
"title": "Foo does bar", | |
"body": "def" | |
}, | |
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
Strobe.Node = Sc.Record.extend({ | |
parentNode: SC.Record.toOne('Strobe.Node'), | |
nextNode: SC.Record.toOne('Strobe.Node'), | |
previousNode: SC.Record.toOne('Strobe.Node') | |
}); | |
Strobe.SectionNode = Strobe.Node.extend({ | |
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.Exposure = SC.Record.extend({ | |
comments: function() { | |
var q = SC.Query.local(MyApp.Comments, 'exposure = %@', { exposure: this }); | |
return this.get('store').find(MyApp.Comments, q); | |
} | |
}); |
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
mainView: SC.WorkspaceView.design({ | |
topToolbarView: SC.ToolbarView.design({ | |
... | |
}), | |
contentView: SC.MasterDetailView.design({ | |
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
page: SC.MasterDetailView.design({ | |
popupMasterInPortraitMode: YES, | |
masterView: SC.WorkspaceView.design({ | |
topToolbarView: SC.ToolbarView.design({ ... | |
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
CORE.fs.open(path, 'r', 0, function(err, fd) { | |
if (err) return done(err); | |
var client = HTTP.createClient(remote.port, remote.hostname); | |
if (!headers) headers = []; | |
headers.push(['Transfer-Encoding', 'chunked']); | |
headers.push(['Content-Length', len]); | |
var hostHeader = remote.hostname; |
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: Todos - mainPage | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals Todos */ | |
// AFTER | |
@import <SproutCore/SproutCore> |
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
// BEFORE | |
Todos.tasksController = SC.ArrayController.create( | |
SC.CollectionViewDelegate, | |
/** @scope Todos.tasksController.prototype */ { | |
summary: function() { | |
var len = this.get('length'), ret ; | |
if (len && len > 0) { |
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.mainPage = SC.Page.design({ | |
mainPane: SC.Pane.design({ | |
//... | |
rightView: SC.TabView.design({ | |
//... | |
nowShowingBinding: 'MyApp.someController.nowShowing' |
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
// TODO Probably don't need to start this each time. | |
// Avoids failing on test/mjsunit/test-eio-race3.js though | |
ev_idle_start(EV_DEFAULT_UC_ &eio_poller); |
NewerOlder