Adjusting OHIF Viewer to the new structure
This commit is contained in:
1 parent
374dab5ef4
commit
718fd30feb
18 files changed
+156
-459
No files matched your search
@@ -7,6 +7,7 @@
|
||||
# OHIF Packages
|
||||
ohif:design
|
||||
ohif:core
|
||||
ohif:header
|
||||
ohif:cornerstone
|
||||
ohif:viewerbase
|
||||
ohif:study-list
|
||||
@@ -44,6 +45,7 @@ fastclick@1.0.13
|
||||
standard-minifier-css@1.3.2
|
||||
standard-minifier-js@1.2.1
|
||||
johdirr:meteor-git-rev
|
||||
u2622:persistent-session@0.4.4
|
||||
aldeed:template-extension
|
||||
peppelg:bootstrap-3-modal
|
||||
shell-server@0.2.1
|
||||
@@ -6,6 +6,7 @@ aldeed:schema-index@1.1.1
|
||||
aldeed:simple-schema@1.5.3
|
||||
aldeed:template-extension@4.0.0
|
||||
allow-deny@1.0.5
|
||||
amplify@1.0.0
|
||||
arsnebula:reactive-promise@0.9.1
|
||||
autoupdate@1.3.12
|
||||
babel-compiler@6.13.0
|
||||
@@ -76,9 +77,12 @@ ohif:cornerstone@0.0.1
|
||||
ohif:design@0.0.1
|
||||
ohif:dicom-services@0.0.1
|
||||
ohif:hanging-protocols@0.0.1
|
||||
ohif:header@0.0.1
|
||||
ohif:log@0.0.1
|
||||
ohif:metadata@0.0.1
|
||||
ohif:study-list@0.0.1
|
||||
ohif:themes@0.0.1
|
||||
ohif:themes-common@0.0.1
|
||||
ohif:viewerbase@0.0.1
|
||||
ohif:wadoproxy@0.0.1
|
||||
ordered-dict@1.0.9
|
||||
@@ -110,6 +114,7 @@ templating-runtime@1.2.15
|
||||
templating-tools@1.0.5
|
||||
tracker@1.1.1
|
||||
twbs:bootstrap@3.3.6
|
||||
u2622:persistent-session@0.4.4
|
||||
ui@1.0.12
|
||||
underscore@1.0.10
|
||||
url@1.0.11
|
||||
|
||||
@@ -1,44 +1,25 @@
|
||||
<template name="ohifViewer">
|
||||
<div class="topBar noselect {{#if onStudyList}}studyList{{/if}}">
|
||||
<div class="clearfix">
|
||||
<a target='_blank'
|
||||
class="brandSection pull-left"
|
||||
href="http://ohif.org">
|
||||
<svg class="logoImage">
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"}}></use>
|
||||
</svg>
|
||||
<div class="logoText">
|
||||
Open Health Imaging Foundation
|
||||
</div>
|
||||
</a>
|
||||
{{#header brandHref='http://ohif.org' headerClasses=instance.headerClasses}}
|
||||
{{#section 'brand'}}
|
||||
<svg class="logo-image">
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"}}></use>
|
||||
</svg>
|
||||
<div class="logo-text">Open Health Imaging Foundation</div>
|
||||
{{/section}}
|
||||
{{#section 'headerAfterBrand'}}
|
||||
{{#if studyListToggleText}}
|
||||
<a class="btn studyListLinkSection pull-left js-toggle-studyList">
|
||||
<a href="#" class="btn studyListLinkSection pull-left js-toggle-studyList">
|
||||
{{studyListToggleText}}
|
||||
</a>
|
||||
{{/if}}
|
||||
<span class="pull-right">
|
||||
<div class="dropdown">
|
||||
<div class="dropdown-toggle noselect clearfix" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="pull-left m-r-1">Options</span>
|
||||
<div class="menuButton pull-right"><span class="caret-down"></span></div>
|
||||
</div>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li>
|
||||
<a id="serverInformation">
|
||||
<i class="fa fa-server fa-lg"></i> Server Information
|
||||
</a>
|
||||
</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li>
|
||||
<a data-toggle="modal" data-target="#aboutModal">
|
||||
<i class="fa fa-info"></i> About
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{>studylist}}
|
||||
{{>aboutModal}}
|
||||
{{/section}}
|
||||
{{#section 'headerMenu'}}
|
||||
<span class="header-options pull-left m-r-1">Options</span>
|
||||
<div class="menu-toggle pull-right">
|
||||
<span class="caret-down"></span>
|
||||
</div>
|
||||
{{/section}}
|
||||
{{/header}}
|
||||
|
||||
{{>Template.dynamic template=(choose this.template 'studylist') data=this}}
|
||||
</template>
|
||||
@@ -14,7 +14,7 @@ Template.ohifViewer.onCreated(() => {
|
||||
icon: 'fa fa-server fa-lg',
|
||||
separatorAfter: true
|
||||
}, {
|
||||
action: () => $('#aboutModal').show(),
|
||||
action: () => OHIF.ui.showDialog('aboutModal'),
|
||||
text: 'About',
|
||||
icon: 'fa fa-info'
|
||||
}]);
|
||||
@@ -55,7 +55,7 @@ Template.ohifViewer.helpers({
|
||||
const isViewer = Session.get('ViewerOpened');
|
||||
|
||||
// Return empty if viewer was not opened yet
|
||||
if (!OHIF.viewer.data.studyInstanceUids) return;
|
||||
if (!OHIF.utils.ObjectPath.get(OHIF, 'viewer.data.studyInstanceUids')) return;
|
||||
|
||||
return isViewer ? 'Study list' : 'Back to viewer';
|
||||
}
|
||||
|
||||
@@ -1,42 +1,37 @@
|
||||
@import "{ohif:design}/app"
|
||||
|
||||
$expandedHeight = 160px
|
||||
body>.header
|
||||
|
||||
.logoImage
|
||||
display: inline-block
|
||||
height: 100%
|
||||
float: left
|
||||
|
||||
.topBar
|
||||
height: $topBarHeight
|
||||
padding: 10px 10px 0
|
||||
theme('color', '$textPrimaryColor')
|
||||
theme('background-color', '$primaryBackgroundColor')
|
||||
transition(all 0.5s ease)
|
||||
|
||||
&>.clearfix
|
||||
position: relative
|
||||
|
||||
.brandSection
|
||||
.brand
|
||||
height: 30px
|
||||
display: inline-block
|
||||
text-decoration: none
|
||||
|
||||
.logoImage
|
||||
.logo-image
|
||||
display: inline-block
|
||||
fill: transparent
|
||||
float: left
|
||||
height: 100%
|
||||
margin: 0 8px 0 0
|
||||
width: 30px
|
||||
|
||||
.logoText
|
||||
.logo-text
|
||||
display: inline-block
|
||||
font-family: $logoFontFamily
|
||||
font-size: 14px
|
||||
font-weight: $logoFontWeight
|
||||
theme('color', '$textPrimaryColor')
|
||||
line-height: 30px
|
||||
|
||||
.studyListLinkSection
|
||||
theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
margin: 3px 0 0 10px
|
||||
padding: 0 0 0 10px
|
||||
a.header-menu
|
||||
theme('color', '$textPrimaryColor')
|
||||
|
||||
.header-options
|
||||
font-size: 13px
|
||||
|
||||
.menu-toggle
|
||||
display: inline-block
|
||||
height: 18px
|
||||
|
||||
.btn
|
||||
theme('color', '$textSecondaryColor')
|
||||
@@ -51,22 +46,25 @@ $expandedHeight = 160px
|
||||
&:active
|
||||
theme('color', '$activeColor')
|
||||
|
||||
&.studyList
|
||||
background-color: rgba(21, 25, 30, 0.7)
|
||||
height: $expandedHeight
|
||||
.studyListLinkSection
|
||||
theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
margin: 3px 0 0 10px
|
||||
padding: 0 0 0 10px
|
||||
|
||||
&.header-big
|
||||
padding-left: $studyListPadding
|
||||
padding-right: $studyListPadding
|
||||
|
||||
.brandSection
|
||||
.brand
|
||||
height: 100%
|
||||
width: 80%
|
||||
line-height: $expandedHeight - 10px
|
||||
line-height: $topBarExpandedHeight - 10px
|
||||
|
||||
.logoImage
|
||||
width: 50px
|
||||
.logo-image
|
||||
margin: 0 20px 0 0
|
||||
width: 50px
|
||||
|
||||
.logoText
|
||||
.logo-text
|
||||
font-size: 30px
|
||||
|
||||
.studyListLinkSection
|
||||
|
||||
@@ -93,7 +93,6 @@ Template.viewer.onCreated(() => {
|
||||
} else {
|
||||
OHIF.log.info('Setting default viewer data');
|
||||
OHIF.viewer.loadedSeriesData = {};
|
||||
OHIF.viewer.data = {};
|
||||
OHIF.viewer.data.loadedSeriesData = OHIF.viewer.loadedSeriesData;
|
||||
|
||||
// Update the viewer data object
|
||||
|
||||
+10
-20
@@ -1,5 +1,5 @@
|
||||
import { Session } from 'meteor/session';
|
||||
import { Router } from 'meteor/iron:router';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Router.configure({
|
||||
layoutTemplate: 'layout',
|
||||
@@ -7,26 +7,16 @@ Router.configure({
|
||||
});
|
||||
|
||||
Router.onBeforeAction('loading');
|
||||
Router.onBeforeAction(function() {
|
||||
this.next();
|
||||
});
|
||||
|
||||
Router.route('/', function() {
|
||||
this.render('ohifViewer');
|
||||
});
|
||||
Router.go('studylist', {}, { replaceState: true });
|
||||
}, { name: 'home' });
|
||||
|
||||
Router.route('/viewer/:_id', {
|
||||
layoutTemplate: 'layout',
|
||||
name: 'viewer',
|
||||
onBeforeAction: function() {
|
||||
var studyInstanceUid = this.params._id;
|
||||
Router.route('/studylist', function() {
|
||||
this.render('ohifViewer', { data: { template: 'studylist' } });
|
||||
}, { name: 'studylist' });
|
||||
|
||||
this.render('ohifViewer', {
|
||||
data: function() {
|
||||
return {
|
||||
studyInstanceUid: studyInstanceUid
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Router.route('/viewer/:studyInstanceUids', function() {
|
||||
const studyInstanceUids = this.params.studyInstanceUids.split(';');
|
||||
OHIF.viewerbase.renderViewer(this, { studyInstanceUids }, 'ohifViewer');
|
||||
}, { name: 'viewerStudies' });
|
||||
Reference in new issue
Block a user