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
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
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
// ======================================================================== | |
// 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
// | |
// A RackJS app is a Function that: responds to .call(), expects "this" as its environment, and returns | |
// an array with 3 objects: status (a Number), headers (a Hash), and body (an Object that responds to each() or toString()) | |
// | |
// simplest possible application: | |
RackJS.Handler.Mongrel.run( function app() { return [200, {}, 'Hello world']; }, { port: 3000 } ); | |
// RackJS will do: | |
// var env = /* set up the environment */; |
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
/* vim: set sw=4 ts=8 et tw=78: */ | |
/* ***** BEGIN LICENSE BLOCK ***** | |
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 | |
* | |
* The contents of this file are subject to the Mozilla Public License Version | |
* 1.1 (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* http://www.mozilla.org/MPL/ | |
* | |
* Software distributed under the License is distributed on an "AS IS" basis, |
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('views/view') ; | |
/** | |
@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
// ======================================================================== | |
// SproutCore | |
// copyright 2006-2008 Sprout Systems, Inc. | |
// ======================================================================== | |
require('views/view') ; | |
/** | |
@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
// ======================================================================== | |
// SproutCore | |
// copyright 2006-2008 Sprout Systems, Inc. | |
// ======================================================================== | |
(function() { | |
var SC = SC.Deprecated; | |
require('foundation/object') ; |
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
<script type="text/javascript"> | |
(function() { | |
var SC = SC.Deprecated; | |
SC.page = SC.Page.create({ | |
layoutSize: { width: 800, height: 600 }, // the size we used to position everything statically... | |
marginInset: SC.View.outlet({ | |
outlets: ['projectNameLabel','appProjectDirLabel','projectAppsScroller','appNameLabel','appDirLabel','appFilesScroller'], |