Port cilantro/ui level CoffeeScript file to JavaScript

Declare in `cilantro.constants` and reference here.