Port cilantro/ui level CoffeeScript file to JavaScript