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
app.statechart.addState('marketing', { | |
enterState: function(){ | |
// TODO: Super Sexy splash screen code... | |
// Showing marketing material and the login form | |
}, | |
login: function(){ | |
$.ajax({ |
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
Yi = Stativus.createStatechart() | |
Yi.addState "StateA1", | |
globalConcurrentState:'default_states', | |
states: [ | |
name: "StateA1B1", | |
substatesAreConcurrent: true, | |
states: [ | |
name: "StateA1C1" | |
, | |
name: "StateA1C2" |
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 Yi Statechart */ | |
window.Yi = Statechart.create(); | |
Yi.addState("Store", { | |
initialSubstate: "store.Loading" | |
}); | |
Yi.addState("store.Loading", { | |
parentState: "Store", | |
enterState: function() { | |
this.sendEvent("loadLargeStore"); | |
}, |
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 Yi Statechart */ | |
window.Yi = Statechart.create(); | |
Yi.addState("Store", { | |
initialSubstate: "store.Loading" | |
}); | |
Yi.addState("store.Loading", { | |
parentState: "Store", | |
enterState: function() { | |
this.sendEvent("loadLargeStore"); | |
}, |
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
var myStatechart = Statechart.create(); | |
myStatechart.addState("#application", { | |
initialSubstate: "#subapplication", | |
enterState: function() { | |
}, | |
exitState: function() { | |
}, | |
ready: 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
Ext.create("Ext.form.field.Text", { | |
id: "seller", | |
emptyText: "Seller", | |
renderTo: Ext.getBody() | |
}); | |
Ext.create("Ext.form.field.Text", { | |
id: "item", | |
emptyText: "Item", | |
renderTo: Ext.getBody() |
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
/** | |
One-way boolean transform binding that returns YES if the 'from' end of the binding equals | |
'testValue', and NO otherwise. | |
*/ | |
SC.Binding.equals = function(testValue) { | |
return this.oneWay().transform(function(value) { | |
value = (value === testValue) ? YES : NO; | |
return value; | |
}); | |
}; |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<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" /> | |
<title>Family Tree</title> | |
<script type="text/javascript"> | |
var SC=SC||{BUNDLE_INFO:{},LAZY_INSTANTIATION:{}};SC.browser=(function(){var c=navigator.userAgent.toLowerCase(); |
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
// Create this in you view folder for fun | |
ResortContracts.TestView = SC.View.extend({ | |
createChildViews: function(){ | |
var childViews = [], view; | |
view = this.createChildView( | |
SC.SelectButtonView.design({ | |
valueBinding: '.parentView.content.item' | |
}) | |
); |
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
// ========================================================================== | |
// SCUI.WidgetView | |
// ========================================================================== | |
sc_require('core'); | |
/** @class | |
This is a management view that handles a widget. Implements the Widget Mixin |
NewerOlder