rewrite broken edit_in_place functionality in coffeescript.