fixed cancel button index when building button list
exposed cancel and destructive button indexes in javascript event