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
OnTap.TestCustomView = SC.View.extend({ | |
mouseDragged: function(evt) { | |
console.log("Dragged!"); | |
return YES; | |
} | |
}); |
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
hexValueChanged:function(){ | |
console.log("Value Changed"); | |
console.log(this.getPath("NumberConverter.mainPage.textValue")); | |
}.observes("NumberConverter.mainPage.textValue") |
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
DarkHorse.Inbox = SC.View.extend( | |
/** @scope DarkHorse.Inbox.prototype */ { | |
childViews: "inboxSplitView".w(), | |
// | |
inboxSplitView: SC.SplitView.design({ | |
layout: { top: 0, right: 0, bottom: 0, left: 0 }, | |
defaultThickness: 0.25, | |
layoutDirection: SC.LAYOUT_HORIZONTAL, |
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
MyApp.MyObject = SC.Object.extend({ | |
property: value; | |
computedProperty: function(){ | |
return value === "foo"; | |
}.observes('value').property(), | |
setProperty: function(value){ | |
this.set('value',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
MyApp.MyView = SC.View.extend({ | |
init:function(){ | |
sc_super(); | |
this.someInitFunction(); | |
}, | |
someInitFunction: function(){ | |
// can I call this? | |
} | |
}); |
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
if (active) { | |
if (this._currentDirection !== null) { | |
active.set("buildDirection", this._currentDirection); | |
this.buildOutChild(active); | |
} else { | |
this.removeChild(active); | |
} | |
} | |
if (replacement) { | |
if (this._currentDirection !== null) { |
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
topToolbarDidChange: function() { | |
var active = this.activeTopToolbar, replacement = this.get("topToolbar"); | |
// if we have an active toolbar, set the build direction and build out | |
if (active) { | |
if (this._currentDirection !== null) { | |
active.set("buildDirection", this._currentDirection); | |
this.buildOutChild(active); | |
} else { | |
this.removeChild(active); |
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
contentView: SC.TabView.design({ | |
layout: { | |
top: 10, | |
right: 10, | |
bottom: 10, | |
left: 10 | |
}, | |
items: [ | |
{ title: 'News', value: 'news' }, | |
{ title: 'Assignments', value: 'DarkHorse.CourseView.AssignmentsView' }, |
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
// ========================================================================== | |
// Project: DarkHorse.CourseView | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals DarkHorse SCUI*/ | |
/** @class | |
(Document Your View 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
contentView: SC.TabView.design({ | |
layout: { | |
top: 10, | |
right: 10, | |
bottom: 10, | |
left: 10 | |
}, | |
items: [ | |
{ title: 'News', value: '.parentView.NewsView' }, | |
{ title: 'Assignments', value: 'DarkHorse.AssignmentsSubView' }, |
OlderNewer