Skip to content

Instantly share code, notes, and snippets.

@tbartelmess
Created April 9, 2011 17:45
Show Gist options
  • Save tbartelmess/911595 to your computer and use it in GitHub Desktop.
Save tbartelmess/911595 to your computer and use it in GitHub Desktop.
// ==========================================================================
// Project: DesktopTimecard
// Copyright: ©2011 My Company, Inc.
// ==========================================================================
/*globals DesktopTimecard */
/** @namespace
My cool new app. Describe your application.
@extends SC.Object
*/
DesktopTimecard = SC.Application.create(
/** @scope DesktopTimecard.prototype */
{
NAMESPACE: 'DesktopTimecard',
VERSION: '0.1.0'
// This is your application store. You will use this store to access all
// of your model data. You can also set a data source on this store to
// connect to a backend server. The default setup below connects the store
// to any fixtures you define.
//store: SC.Store.create().from(SC.Record.fixtures) //,
//authToken: SC.Cookie.find("BPuserToken") ? SC.Cookie.find("BPuserToken").value: ""
});
SC.ready(function() {
// Create store
DesktopTimecard.store = SC.Store.create().from(SC.Record.fixtures);
// Create nested store
DesktopTimecard.editingStore = DesktopTimecard.store.chain();
DesktopTimecard.store.set('commitRecordsAutomatically', YES);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment