use javascript to delete images in post edit view