Port cilantro/ui/controls/* to JavaScript

Signed-off-by: Don Naegely <naegelyd@gmail.com>
Move this down to line 90 since the following block is the only place it is used.