Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
/** @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
Cp2.mixin(
/** @scope Cp2 */ {
/** Landing page */
goStateA1: function() {
// do something...
},
/** Some other page */
goStateA2: function() {
recomputeClippingFrame: function() {
this.recacheFrames();
var parent = this.parentNode;
while (parent) {
parent.recacheFrames();
parent = parent.parentNode;
}
},
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
require('core') ;
/**
@class
//
// 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 */;
/* 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,
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
require('views/view') ;
/**
@class
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
require('views/view') ;
/**
@class
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
(function() {
var SC = SC.Deprecated;
require('foundation/object') ;
<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'],