Replacing studyListContextMenu for dropdown

This commit is contained in:
Bruno Alves de Faria committed 2017-03-21 10:16:47 -03:00
1 parent 4daf7d8bf8
commit 485f82f64c
22 files changed
+250 -325

No files matched your search

@@ -0,0 +1,19 @@
import { OHIF } from 'meteor/ohif:core';
/**
* Exports all selected studies on the studylist
* @param event Event that triggered the export
*/
OHIF.studylist.exportSelectedStudies = event => {
const selectedStudies = OHIF.studylist.getSelectedStudies();
const studiesCount = selectedStudies.length;
const studyText = studiesCount > 1 ? 'Studies' : 'Study';
OHIF.ui.showDialog('dialogConfirm', {
element: event.element,
title: `Export ${studyText}`,
message: `Would you like to export ${studiesCount} ${studyText.toLowerCase()}?`
}).then(() => {
OHIF.studylist.exportStudies(selectedStudies);
});
};