Fix js to change dispaly modes according to selected content type.