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);
});
};
@@ -1,5 +1,6 @@
import './third-party/jquery.twbsPagination.min.js';
import './exportSelectedStudies.js';
import './exportStudies.js';
import './getSelectedStudies.js';
import './getStudyMetadata.js';
@@ -10,3 +11,4 @@ import './queryStudies.js';
import './retrieveStudyMetadata.js';
import './studylist.js';
import './switchToTab.js';
import './viewSeriesDetails.js';
@@ -0,0 +1,10 @@
import { OHIF } from 'meteor/ohif:core';
/**
* Display series details of study in a modal
*/
OHIF.studylist.viewSeriesDetails = () => {
const selectedStudies = OHIF.studylist.getSelectedStudies();
if (!selectedStudies) return;
OHIF.ui.showDialog('seriesDetailsModal', { selectedStudies });
};