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
// ======================================================================== | |
// SproutCore | |
// copyright 2006-2008 Sprout Systems, Inc. | |
// ======================================================================== | |
require('core') ; | |
/** | |
@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
recomputeClippingFrame: function() { | |
this.recacheFrames(); | |
var parent = this.parentNode; | |
while (parent) { | |
parent.recacheFrames(); | |
parent = parent.parentNode; | |
} | |
}, |
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
Cp2.mixin( | |
/** @scope Cp2 */ { | |
/** Landing page */ | |
goStateA1: function() { | |
// do something... | |
}, | |
/** Some other page */ | |
goStateA2: function() { |
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
/** @namespace */ | |
Cp2 = SC.Object.create( SC.Statechart, | |
/** @scope Cp2 */ { | |
// This will create the server for your application. Add any namespaces | |
// your model objects are defined in to the prefix array. | |
//server: SC.Server.create({ prefix: ['Cp2'] }), | |
server: SC.RestServer.create({ prefix: ['Cp2'], postFormat: SC.JSON_FORMAT, escapeJSON: false}), | |
// This is the Current User of the System. This is where we get all the authentication tokens that get passed |
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
require('core') ; | |
/** | |
@mixin | |
This where we will put all of the State core to keep it centralized. | |
@extends Cp2 | |
@author Evin Grano | |
@version 0.1 |
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
// THIS: | |
successfulLoad:function(){ | |
console.log("Core#successfulLoad called..."); | |
var handled = NO; | |
switch(this.state.a){ | |
case 2: | |
if(SC.Store.findRecords({recordType: Cp2.LandingPage}).length > 0){ | |
this.goState('a','5'); | |
} | |
else if(SC.Store.findRecords({recordType: Cp2.LandingPage}).length){ |
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
// | |
// indentation should be two spaces, not tabs | |
// | |
// THIS (soft-tabs, two spaces): | |
var p = 12; | |
// NOT THIS (hard tabs): | |
var p = 12; // wrong: uses a tab, not two spaces | |
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
troy:private-abbot onitunes$ rake spec | |
(in /Users/onitunes/git/sproutit/private-abbot) | |
WARNING: Possible conflict with Rake extension: String#ext already exists | |
WARNING: Possible conflict with Rake extension: String#pathmap already exists | |
WARNING: Not testing markdown() because BlueCloth is not installed | |
...............................................................................................................................................................................F.....F......................FF..................................................................................FFFFFFF.................FF..............F.......FFF.FFFFFFFFFF...........F.......FF.................. | |
1) | |
NoMethodError in 'SproutCore::Builder::Html API for templates StaticHelper exposes stylesheets_for_client() does NOT add stylesheet for test if CONFIG.load_test' | |
undefined method `manifest_for' for nil:NilClass |
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
troy:private-abbot onitunes$ rake spec | |
(in /Users/onitunes/git/sproutit/private-abbot) | |
WARNING: Possible conflict with Rake extension: String#ext already exists | |
WARNING: Possible conflict with Rake extension: String#pathmap already exists | |
WARNING: Not testing markdown() because BlueCloth is not installed | |
...............................................................................................................................................................................F.....F......................FF..................................................................................FFFFFFF.................FF..............F.......FFF.FFFFFFFFFF...........F.......FF.................. | |
1) | |
NoMethodError in 'SproutCore::Builder::Html API for templates StaticHelper exposes stylesheets_for_client() does NOT add stylesheet for test if CONFIG.load_test' | |
undefined method `manifest_for' for nil:NilClass |
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
render: function(renderContext) { | |
renderContext.push('<div>'); | |
this.renderChildren(renderContext); | |
renderContext.push('</div>'); | |
} |