This file contains 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
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: [ |
This file contains 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 Twitapp*/ | |
Twitapp.String = { | |
stripTags: function() { | |
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, ''); | |
}, | |
unescapeHTML: function () { | |
return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&').replace(/"/g,'\"'); |
This file contains 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
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'); |
This file contains 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
/*#!/usr/bin/env node*/ | |
// .......................................................... | |
// REQUIRES | |
// | |
var Seed = require('seed'); | |
var Co = Seed.require('seed:co'); | |
// .......................................................... | |
// FUNCTIONS |
This file contains 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 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) | |
// }) |
This file contains 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
// .......................................................... | |
// 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(); |
This file contains 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
task 'build', 'build all of the source files', -> | |
sourceFiles: ['test.coffee'] | |
fs: require('fs'); sys: require('sys'); | |
seed: require('seed'); coffee: seed.require('coffee-script'); | |
for src in sourceFiles | |
fs.readFile src, (err, code) -> | |
compiled: coffee.compile code | |
fs.writeFile src.replace(/\.coffee/,'.js'), compiled, "utf8", (err) -> | |
throw err if err | |
puts "Compiled $src -> ${src.replace(/\.coffee/,'.js')}." |
This file contains 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
objectA = SC.Object.create({ | |
calledLocalObserver: false, | |
calledGlobalObserver: false, | |
calledMixedObserver: false, | |
locallyObservedProperty: 'beingWatched', | |
testLocalObserver: function() { | |
this.calledLocalObserver = true; | |
}.observes('locallyObservedProperty'), |
This file contains 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 global*/ | |
global.DEBUG = false; | |
var smartdown = require("smartdown"), fs = require("core_support:fs"), | |
spawn = require("spawn"), sys = require("sys"), | |
Path = require("core_support:path"); | |
var fixPath = function(opts) { | |
if (global.DEBUG) sys.puts("Entered fixPath:"); | |
var outputDirectory = opts.output; | |
if (outputDirectory[outputDirectory.length - 1] !== "/") outputDirectory += "/"; |
This file contains 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
task :add_other_combined do | |
if MANIFEST.target[:target_name] =~ /\/myapp/i | |
tmp_entries = [] | |
tmp_entries.push MANIFEST.entry_for('someframework:javascript.js') | |
tmp_entries.push MANIFEST.entry_for('anotherframework:javascript.js') | |
tmp_entries.each { |e| | |
e.clean! | |
} | |
MANIFEST.add_composite 'all_the_stuffs.js', | |
:source_entries => tmp_entries, |
OlderNewer