Skip to content

Instantly share code, notes, and snippets.

// ..........................................................
// TEST SETUP
//
NRDEBUG = true;
process.mixin(GLOBAL, require('ntest'));
var sys = require('sys'),
redisclient = require('./lib/redisclient'),
queue = require('./node_resque').create(0,"resque"),
assert = require('assert'),
redis = new redisclient.Client();
var sys = require('sys');
// starts a new TestCase with the given description.
//
// var assert = require('assert')
// describe("An array")
// it("tracks length", function() {
// var a = [1]
// assert.equal(1, a.length)
// })
/*#!/usr/bin/env node*/
// ..........................................................
// REQUIRES
//
var Seed = require('seed');
var Co = Seed.require('seed:co');
// ..........................................................
// FUNCTIONS
rowHeight: 21,
customRowHeight: 32,
useCustomRowHeight: YES,
customRowHeightIndexes: function(){
if(!this.get('useCustomRowHeight')) return null;
var ret = SC.IndexSet.create(), idx, len, nextHeaderIdx = 0;
var content = this.getPath('content.treeItemChildren');
if (content) {
len = content.get('length');
/*globals Twitapp*/
Twitapp.String = {
stripTags: function() {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
},
unescapeHTML: function () {
return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&').replace(/&quot;/g,'\"');
collectionViewDragViewFor: function(view, dragContent) {
// TODO [JH2] Make this an imageView
var content = view.getPath('selection.firstObject');
var size = content.get('naturalSize');
var dragLayer = view.get('layer').cloneNode(false);
return SC.View.design({
parentView: view,
layer: dragLayer,
layout: { top: 0, left: 0, height: size.height, width: size.width },
childViews: [