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
// Changeset v2 format | |
{ | |
"sc_version": 2, // I guess we should start versioning if I'm going to change it ;) | |
"sc_types": ["Foo", "Bar"], | |
// TODO: Should we include Namespace information as well? | |
"Foo": { | |
"created": [ | |
"<primaryKey>" | |
// ... more created record ids of type "Foo" | |
], |
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
/*globals SC MyApp */ | |
// Default CSS animations are defined in CSS files for these properties | |
MyApp.MyBehavior = SC.Behavior.extend({ | |
target: 'MyApp', | |
action: 'doSomething', | |
initialHandler: 'mouseUpNotOver', |
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
BasicApp.mainPage = SC.Page.design({ | |
mainPane: SC.MainPane.design({ | |
contentView: SC.CoreView.design({ | |
tagName: 'h1' | |
classNames: 'amber-label', | |
render: function(context) { | |
context.push("Hello world"); | |
} |
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
// | |
// Define our model class. | |
// | |
MyApp.Task = SC.Object.extend({ | |
toJSON: function() { | |
var hash = {}, key, val; | |
for (key in this) { | |
if (!this.hasOwnProperty(key)) continue ; |
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
.sc-theme .sc-button-view{text-decoration:none;border:none;padding:0;}.sc-theme .sc-button-view.icon img.icon{position:relative;vertical-align:middle;top:-2px;margin-right:2px;height:16px;width:16px;} | |
.sc-theme .sc-button-view.sc-regular-size.square{text-shadow:#fff 0 1px 0;color:black;} | |
.sc-theme .sc-button-view.sc-regular-size.square .sc-button-inner{display:block;} | |
.sc-theme .sc-button-view.sc-regular-size.square .sc-button-label{display:block;text-align:center;padding:0 0 7px 0;} | |
.sc-theme .sc-button-view.sc-regular-size.square.active .sc-button-label{text-shadow:black 0 -1px 0;color:white;} | |
.sc-theme .sc-button-view.square.disabled .sc-button-label{color:#999;text-shadow:none;} | |
.sc-theme .sc-button-view.sc-regular-size.square.def .sc-button-label,.sc-theme .sc-button-view.sc-regular-size.square.sel .sc-button-label{color:white;text-shadow:#2a569e 0 -1px 0;} | |
.sc-theme .sc-button-view.sc-regular-size.square.def.disabled .sc-button-label,.sc-theme .sc-button-view.sc-regular-size.square.sel.disabled .sc-butt |
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
.sc-button-view.sc-static-layout{margin:0 4px;}.sc-button-view{display:inline-block;vertical-align:middle;text-decoration:none;border:1px #555 solid;border-radius:3px;-moz-border-radius:3px;} | |
.sc-button-view .sc-button-inner{position:relative;display:block;height:100%;text-align:center;} | |
.sc-button-view label{position:relative;display:block;line-height:21px;text-align:center;} | |
.sc-button-view img{vertical-align:middle;margin-right:2px;position:relative;top:-2px;left:-2px;} | |
.ie7 .sc-button-view{display:inline;}.sc-view{font-family:"Lucida Sans","Lucida Grande",Verdana,Arial,sans-serif;font-size:12px;line-height:1.4;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);} | |
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;} | |
body{position:absolute;margin:0;top:0;bottom:0;left:0;right:0;}.sc-view body,.sc-view div,.sc-view dl,.sc-view dt,.sc-view dd,.sc-view ul,.sc-view ol,.sc-view li,.sc-view h1,.sc-view h2,.sc-view h3,.sc-view h |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=8" /> | |
<meta http-equiv="Content-Script-Type" content="text/javascript" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="default" /> | |
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<link rel="apple-touch-icon" href="images/sproutcore-logo.png" /> |
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
/* @license | |
========================================================================== | |
SproutCore Costello -- Property Observing Library | |
Copyright ©2006-2010, Sprout Systems, Inc. and contributors. | |
Portions copyright ©2008-2010 Apple Inc. All rights reserved. | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
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
SC.mixin(YourAppNamespace, { // YourAppNamespaces is defined in core.js | |
yourAction: function() { | |
// goes here | |
} | |
}); |
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
/** @private | |
Handle space key event. Do action | |
*/ | |
insertText: function(chr, evt) { | |
if (chr === ' ') { | |
var sel = this.get('selection'); | |
if (sel && sel.get('length')>0) { | |
this.invokeLater(this._cv_action, 0, null, evt); | |
} | |
return YES ; |