Skip to content

Instantly share code, notes, and snippets.

@jtaby
jtaby / gist:190040
Created September 21, 2009 02:46 — forked from anonymous/gist:190022
menuView: SC.MenuPane.design({
layout: { top: 63, left: 0, right: 0, height: 36 },
items: [SC.Object.create({
title: 'Foo',
isEnabled: YES
}),
SC.Object.create({
title: 'Bar',
isEnabled: YES
})]
@jtaby
jtaby / gist:238259
Created November 18, 2009 21:15 — forked from lsiden/gist:237321
// ==========================================================================
// Project: EccapCalc.LedgerView
// Copyright: ©2009 Westside Consulting LLC
// ==========================================================================
/*globals EccapCalc */
/** @class
This is a reusable view that is meant to be instantiated from the function
EccapCalc.createLedgerView(x, y, w, h, title, arrayController).
var q = SC.Query.local(YouTube.Video, "playlist_id="+playlist_id,{ parameters: opts });
// var q = SC.Query.local(YouTube.Video,{ params: opts });
var entries = UQ.store.find(q);
UQ.queueController.set('content',entries);
NPR.ArticleListItem = SC.View.extend({
content: null,
displayProperties: 'content'.w(),
render: function(context,firstTime) {
context.push("HERE!!");
return sc_super();
}
image: function(){
var c = this.get('content');
if(!c) return;
return c.image[0].src;
}.property('image').cacheable(),
teaser: function(){
var c = this.readAttribute('teaser');
if(!c) return;
return c.$text;
}.property('teaser').cacheable(),
NPR.HTMLView = SC.View.extend({
childViews: 'article'.w(),
article: SC.View.extend(SC.StaticLayout, {
useStaticLayout: YES,
classNames: 'content-box'.w(),
htmlContent: '',
htmlContentBinding: '.owner.htmlContent',
displayProperties: 'htmlContent'.w(),
NPR.HTMLView = SC.View.extend({
childViews: 'article'.w(),
htmlContent: '',
article: SC.View.extend(SC.StaticLayout, {
useStaticLayout: YES,
classNames: 'content-box'.w(),
htmlContent: '',
htmlContentBinding: '*owner.htmlContent',
var _cv = this.get('contentView');
view = _cv;
var outerCV = this.get('outerContentView');
outerCV.adjust('width',len * objectWidth);
var v = null;
for (var i = len - 1; i >= 0; i--){
// console.log("stories.objectAt(i) = "+stories.objectAt(i));
// ==========================================================================
// Project: VideoApp - mainPage
// Copyright: ©2009 Apple Inc.
// ==========================================================================
/*globals VideoApp */
sc_require('views/controls');
sc_require('views/videoProperties');
VideoApp.videoURL = 'http://mirror.cessen.com/blender.org/peach/trailer/trailer_iphone.m4v';