Replacing switchToTab with routes

This commit is contained in:
Bruno Alves de Faria committed 2017-03-21 10:16:47 -03:00
1 parent 0cf4dbf13f
commit 7718d31a77
46 files changed
+358 -753

No files matched your search

@@ -5,13 +5,6 @@ import { OHIF } from 'meteor/ohif:core';
const studylistContentId = 'studylistTab';
let lastContentId;
// Define the ViewerData global object
// If there is currently any Session data for this object,
// use this to repopulate the variable
Template.ohifViewer.onCreated(() => {
ViewerData = Session.get('ViewerData') || {};
});
Template.ohifViewer.events({
'click .js-toggle-studyList'() {
const contentId = Session.get('activeContentId');
@@ -31,11 +24,10 @@ Template.ohifViewer.events({
Template.ohifViewer.helpers({
studyListToggleText() {
const contentId = Session.get('activeContentId');
Session.get('ViewerData');
// If the Viewer has not been opened yet, 'Back to viewer' should
// not be displayed
const viewerContentExists = !!Object.keys(ViewerData).length;
const viewerContentExists = !!Object.keys(OHIF.viewer.data).length;
if (!viewerContentExists) {
return;
}