wip, moving js to ftl for occurrence-preview