migrate doc viewer modals to $modal service