Skip to content

Instantly share code, notes, and snippets.

View rklancer's full-sized avatar

Richard Klancer rklancer

View GitHub Profile
/*globals $ Raphael */
// make these accessible at the Firebug/Web Inspector console
var r, group, points;
$(function () {
var notHighlighted = {
stroke: "#999999",
fill: "#999999"
[submodule "sproutcore-examples"]
path = sproutcore-examples
url = git://github.com/rklancer/sproutcore-examples.git
// ==========================================================================
// Project: afterPropertyChange
// Copyright: ©2010 Concord Consortium
// @author: Richard Klancer <[email protected]>
// ==========================================================================
/*globals ok equals stop start pushStop popStart */
/*
afterPropertyChange:
// THIS DOESN'T WORK (TableController instances end up sharing the one binding object)
Smartgraphs.TableController = SC.ArrayController.extend({
// ...
dataset: null,
/**
Whether to display the table at all
*/
showTableBinding: SC.Binding.not('*dataset.isStreaming'),
@rklancer
rklancer / test_observer.js
Created November 22, 2010 02:23
This fails in the latest master commit
// Author: Richard Klancer <[email protected]>
/*globals module test ok equals same stop start */
module("Problematic SC.ObserverSet.getMethods() removal", {
setup: function () {
SC.LOG_OBSERVERS = YES;
},
teardown: function () {
SC.LOG_OBSERVERS = NO;
@rklancer
rklancer / observer_test.js
Created November 22, 2010 15:46
Simpler test of SC.ObserverSet problem
// Author: Richard Klancer <[email protected]>
/*globals module test ok equals same stop start */
module("SC.ObserverSet.getMethods() removal", {
setup: function () {
SC.LOG_OBSERVERS = YES;
},
teardown: function () {
SC.LOG_OBSERVERS = NO;
// the following is from an ArrayController whose content is a set of Pages; the TreeController's content property is bound to this property:
outline: function () {
var contentLength = this.getPath('content.length') || 0;
return contentLength === 0 ? null : SC.Object.create({
title: 'toplevel',
treeItemIsExpanded: YES,
pages: this.map( function (page) { return page; } ),
treeItemChildren: this.map( function (page) {
console.log('----------------- SANDBOX START -----------------')
var contentObjectController = SC.ObjectController.create()
var ContentView = SC.View.extend(SC.ContentDisplay, {
layout: function() {
var row = this.getPath('content.row') || 0,
column = this.getPath('content.column') || 0;
return { top: row * 100, left: column * 100, height: 100, width: 100 };
@rklancer
rklancer / gist:1189469
Created September 2, 2011 18:50
files named *.js*
./app/views/activities/create.js.rjs
./app/views/activities/delete_section.js.rjs
./app/views/activities/destroy.js.rjs
./app/views/embeddable/biologica/breed_offsprings/destroy.js.rjs
./app/views/embeddable/biologica/chromosome_zooms/destroy.js.rjs
./app/views/embeddable/biologica/chromosomes/destroy.js.rjs
./app/views/embeddable/biologica/meiosis_views/destroy.js.rjs
./app/views/embeddable/biologica/multiple_organisms/destroy.js.rjs
./app/views/embeddable/biologica/organisms/destroy.js.rjs
./app/views/embeddable/biologica/pedigrees/destroy.js.rjs
@rklancer
rklancer / gist:1189512
Created September 2, 2011 18:58
files containing :javascript
./app/views/embeddable/data_collectors/_show.html.haml
./app/views/embeddable/drawing_tools/_show.html.haml
./app/views/layouts/print.html.haml
./app/views/portal/schools/_form.html.haml
./app/views/resource_pages/_form.html.haml
./public/javascripts/active_scaffold/default/active_scaffold.js
./public/test-workgroup.haml
./themes/sglight/views/layouts/application.html.haml
./vendor/plugins_disabled/theme_support/lib/theme_controller.rb