Final adjustments to routing behaviors
This commit is contained in:
1 parent
9ccebb76bd
commit
e12fb0de35
24 files changed
+226
-362
No files matched your search
@@ -1,41 +1,27 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
import { Router } from 'meteor/iron:router';
|
||||
|
||||
// Classes
|
||||
import { OHIFStudyMetadataSource } from './OHIFStudyMetadataSource';
|
||||
import { OHIFStudySummary } from './OHIFStudySummary';
|
||||
|
||||
// Functions
|
||||
import { getStudyPriors } from './getStudyPriors';
|
||||
import { getStudyPriorsMap } from './getStudyPriorsMap';
|
||||
|
||||
StudyList = {
|
||||
functions: {
|
||||
getStudyPriors,
|
||||
getStudyPriorsMap
|
||||
},
|
||||
classes: {
|
||||
OHIFStudyMetadataSource,
|
||||
OHIFStudySummary
|
||||
}
|
||||
OHIF.studylist.functions = {
|
||||
getStudyPriors,
|
||||
getStudyPriorsMap
|
||||
};
|
||||
|
||||
OHIF.studylist.classes = {
|
||||
OHIFStudyMetadataSource,
|
||||
OHIFStudySummary
|
||||
};
|
||||
|
||||
const dblClickOnStudy = data => {
|
||||
Router.go('viewerStudies', { studyInstanceUids: data.studyInstanceUid });
|
||||
};
|
||||
|
||||
OHIF.studylist.callbacks.dblClickOnStudy = dblClickOnStudy;
|
||||
OHIF.studylist.callbacks.middleClickOnStudy = dblClickOnStudy;
|
||||
|
||||
function dblClickOnStudy(data) {
|
||||
openNewTab(data.studyInstanceUid);
|
||||
}
|
||||
|
||||
let currentServerChangeHandlerFirstRun = true;
|
||||
const currentServerChangeHandler = () => {
|
||||
if (currentServerChangeHandlerFirstRun) {
|
||||
currentServerChangeHandlerFirstRun = false;
|
||||
return;
|
||||
}
|
||||
|
||||
switchToTab('studylistTab');
|
||||
};
|
||||
|
||||
CurrentServer.find().observe({
|
||||
added: currentServerChangeHandler,
|
||||
changed: currentServerChangeHandler
|
||||
});
|
||||
Reference in new issue
Block a user