PWV-15: Creating routing branch

This commit is contained in:
Bruno Alves de Faria committed 2017-03-21 10:16:46 -03:00
1 parent e618e32341
commit efb4ca23b5
24 files changed
+158 -437

No files matched your search

@@ -146,22 +146,23 @@ Template.studyTimepointBrowser.helpers({
// Get the current study
const currentStudy = instance.getCurrentStudy();
// Declare the timepoints
const { timepointApi } = instance.data;
let timepoints;
if (currentStudy && !instance.showAdditionalTimepoints.get()) {
// Show only the current study's timepoint
timepoints = instance.data.timepointApi.study(currentStudy.studyInstanceUid);
timepoints = timepointApi.study(currentStudy.studyInstanceUid);
} else {
if (!instance.data.timepointApi) {
if (!timepointApi) {
// If there is no timepoint API defined whatsoever, this means that there is no
// current timepoint ID, so we can just display all of the currently loaded studies
// in the study sidebar
timepoints = [];
} else if (instance.timepointViewType.get() === 'all') {
// Show all timepoints
timepoints = instance.data.timepointApi.all();
timepoints = timepointApi.all();
} else {
// Show only key timepoints
timepoints = instance.data.timepointApi.key();
timepoints = timepointApi.key();
}
}
// Returns the timepoints
@@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { Session } from 'meteor/session';
import { Random } from 'meteor/random';
import { OHIF } from 'meteor/ohif:core';
// Local Modules
import { toolManager } from '../../../lib/toolManager';
import { unloadHandlers } from '../../../lib/unloadHandlers';
import { hotkeyUtils } from '../../../lib/hotkeyUtils';
import { ResizeViewportManager } from '../../../lib/classes/ResizeViewportManager';
@@ -13,7 +13,7 @@ import { StudyPrefetcher } from '../../../lib/classes/StudyPrefetcher';
Meteor.startup(() => {
window.ResizeViewportManager = window.ResizeViewportManager || new ResizeViewportManager();
// Set initial value for OHIFViewerMainRendered
// Set initial value for OHIFViewerMainRendered
// session variable. This can used in viewer main template
Session.set('OHIFViewerMainRendered', false);
});
@@ -22,7 +22,7 @@ Template.viewerMain.onCreated(() => {
// Attach the Window resize listener
// Don't use jQuery here. "window.onresize" will always be null
// If its necessary, check all the code for window.onresize getter
// and change it to jQuery._data(window, 'events')['resize'].
// and change it to jQuery._data(window, 'events')['resize'].
// Otherwise this function will be probably overrided.
// See cineDialog instance.setResizeHandler function
window.addEventListener('resize', window.ResizeViewportManager.getResizeHandler());
@@ -59,7 +59,7 @@ Template.viewerMain.onDestroyed(() => {
OHIF.viewer.updateImageSynchronizer.destroy();
delete OHIF.viewerbase.layoutManager;
delete ProtocolEngine;
ProtocolEngine = null;
Session.set('OHIFViewerMainRendered', false);
});