Opening series sidebar by default
This commit is contained in:
parent
0dfb3cc824
commit
479e420179
@ -4,14 +4,14 @@
|
||||
<div class="pull-left m-t-1">
|
||||
{{>roundedButtonGroup leftSidebarToggleButtonData}}
|
||||
</div>
|
||||
{{> toolbarSectionTools
|
||||
{{>toolbarSectionTools
|
||||
toolbarButtons=toolbarButtons
|
||||
extraToolbarButtons=extraToolbarButtons}}
|
||||
<div class="pull-right m-t-1 rm-x-1">
|
||||
{{> roundedButtonGroup rightSidebarToggleButtonData}}
|
||||
{{>roundedButtonGroup rightSidebarToggleButtonData}}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{{> toolbarSectionTools toolbarButtons=hangingProtocolButtons}}
|
||||
{{>toolbarSectionTools toolbarButtons=hangingProtocolButtons}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,14 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { $ } from 'meteor/jquery';
|
||||
|
||||
Template.toolbarSection.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
if (OHIF.uiSettings.leftSidebarOpen) {
|
||||
instance.data.state.set('leftSidebar', 'studies');
|
||||
}
|
||||
});
|
||||
|
||||
Template.toolbarSection.helpers({
|
||||
leftSidebarToggleButtonData() {
|
||||
@ -122,7 +132,7 @@ Template.toolbarSection.helpers({
|
||||
classes: 'imageViewerTool toolbarSectionButton',
|
||||
iconClasses: 'fa fa-circle'
|
||||
});
|
||||
|
||||
|
||||
buttonData.push({
|
||||
id: 'wwwcRegion',
|
||||
title: 'ROI Window',
|
||||
@ -165,7 +175,7 @@ Template.toolbarSection.helpers({
|
||||
iconClasses: 'fa fa-trash'
|
||||
});
|
||||
|
||||
return buttonData;
|
||||
return buttonData;
|
||||
},
|
||||
|
||||
hangingProtocolButtons() {
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<template name="viewer">
|
||||
{{#if Template.subscriptionsReady}}
|
||||
<div class="viewerDialogs">
|
||||
{{> cineDialog}}
|
||||
{{> layoutChooser }}
|
||||
{{> annotationDialogs }}
|
||||
{{>cineDialog}}
|
||||
{{>layoutChooser}}
|
||||
{{>annotationDialogs}}
|
||||
|
||||
<!-- Hanging Protocol dialogs -->
|
||||
{{ >ruleEntryDialog }}
|
||||
{{ >settingEntryDialog }}
|
||||
{{ >textEntryDialog }}
|
||||
{{>ruleEntryDialog}}
|
||||
{{>settingEntryDialog}}
|
||||
{{>textEntryDialog}}
|
||||
</div>
|
||||
<div id="viewer">
|
||||
{{> toolbarSection (clone this)}}
|
||||
{{> flexboxLayout (clone this)}}
|
||||
{{>toolbarSection (clone this)}}
|
||||
{{>flexboxLayout (clone this)}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{> loadingText}}
|
||||
{{>loadingText}}
|
||||
{{/if}}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template name="lesionTrackerWorklistContextMenu">
|
||||
{{#if studyListFunctionsEnabled}}
|
||||
{{#if uiSettings.studyListFunctionsEnabled}}
|
||||
<div id="studyContextMenu" class="studyContextMenu noselect"
|
||||
oncontextmenu='return false;'
|
||||
unselectable='on'
|
||||
@ -37,4 +37,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@ -173,11 +173,3 @@ function viewStudies() {
|
||||
// Switch to the new tab
|
||||
switchToTab(contentid);
|
||||
}
|
||||
|
||||
Template.studyContextMenu.helpers({
|
||||
'studyListFunctionsEnabled': function() {
|
||||
var studyListFunctionsEnabled = Meteor.settings && Meteor.settings.public && Meteor.settings.public.ui &&
|
||||
Meteor.settings.public.ui.studyListFunctionsEnabled || false;
|
||||
return studyListFunctionsEnabled;
|
||||
}
|
||||
});
|
||||
@ -5,3 +5,4 @@ import './logical.js';
|
||||
import './number.js';
|
||||
import './string.js';
|
||||
import './typing.js';
|
||||
import './ui.js';
|
||||
|
||||
11
Packages/ohif-core/client/helpers/ui.js
Normal file
11
Packages/ohif-core/client/helpers/ui.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
/**
|
||||
* Global Blaze UI helpers
|
||||
*/
|
||||
|
||||
// Access OHIF.uiSettings object
|
||||
Template.registerHelper('uiSettings', () => {
|
||||
return OHIF.uiSettings;
|
||||
});
|
||||
@ -1,3 +1,4 @@
|
||||
import './blaze.js';
|
||||
import './string.js';
|
||||
import './ui.js';
|
||||
import './user.js';
|
||||
|
||||
6
Packages/ohif-core/client/lib/ui.js
Normal file
6
Packages/ohif-core/client/lib/ui.js
Normal file
@ -0,0 +1,6 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
// Get the UI settings
|
||||
const ui = Meteor.settings && Meteor.settings.public && Meteor.settings.public.ui;
|
||||
OHIF.uiSettings = ui || {};
|
||||
@ -14,7 +14,7 @@ export const DICOMWebRequestOptions = new SimpleSchema({
|
||||
logResponses: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
label: 'Log Responses?',
|
||||
label: 'Log Responses?',
|
||||
},
|
||||
logTiming: {
|
||||
type: Boolean,
|
||||
@ -116,6 +116,11 @@ export const UISettings = new SimpleSchema({
|
||||
type: Boolean,
|
||||
label: 'Study List Functions Enabled?',
|
||||
defaultValue: true
|
||||
},
|
||||
leftSidebarOpen: {
|
||||
type: Boolean,
|
||||
label: 'Left sidebar open by default?',
|
||||
defaultValue: false
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template name="studyContextMenu">
|
||||
{{#if studyListFunctionsEnabled}}
|
||||
{{#if uiSettings.studyListFunctionsEnabled}}
|
||||
<div id="studyContextMenu" class="studyContextMenu noselect"
|
||||
oncontextmenu='return false;'
|
||||
unselectable='on'
|
||||
@ -18,4 +18,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@ -82,10 +82,3 @@ Template.studyContextMenu.events({
|
||||
closeHandler(dialog);
|
||||
}
|
||||
});
|
||||
|
||||
Template.studyContextMenu.helpers({
|
||||
'studyListFunctionsEnabled': function() {
|
||||
var studyListFunctionsEnabled = Meteor.settings && Meteor.settings.public && Meteor.settings.public.ui &&
|
||||
Meteor.settings.public.ui.studyListFunctionsEnabled || false; return studyListFunctionsEnabled;
|
||||
}
|
||||
});
|
||||
@ -1,3 +1,9 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Session } from 'meteor/session';
|
||||
import { $ } from 'meteor/jquery';
|
||||
|
||||
Template.worklistToolbar.onCreated(() => {
|
||||
Meteor.call('importSupported', (error, result) => {
|
||||
if (error || !result) {
|
||||
@ -11,26 +17,20 @@ Template.worklistToolbar.onCreated(() => {
|
||||
Template.worklistToolbar.events({
|
||||
'change .js-import-files'(event) {
|
||||
// Get selected files located in the client machine
|
||||
var selectedFiles = $.map(event.currentTarget.files, (value) => {
|
||||
return value;
|
||||
});
|
||||
|
||||
const selectedFiles = $.map(event.currentTarget.files, value => value);
|
||||
|
||||
importStudies(selectedFiles);
|
||||
},
|
||||
|
||||
'click .js-import-files'(event) {
|
||||
// Reset file input
|
||||
var fileInput = event.currentTarget;
|
||||
$(fileInput).val('');
|
||||
$(event.currentTarget).val('');
|
||||
}
|
||||
});
|
||||
|
||||
Template.worklistToolbar.helpers({
|
||||
importSupported() {
|
||||
var importSupported = Session.get('importSupported');
|
||||
var studyListFunctionsEnabled = Meteor.settings && Meteor.settings.public && Meteor.settings.public.ui &&
|
||||
Meteor.settings.public.ui.studyListFunctionsEnabled || false;
|
||||
|
||||
return (importSupported && studyListFunctionsEnabled);
|
||||
const importSupported = Session.get('importSupported');
|
||||
return (importSupported && OHIF.uiSettings.studyListFunctionsEnabled);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
"public": {
|
||||
"verifyEmail": false,
|
||||
"ui": {
|
||||
"studyListFunctionsEnabled": true
|
||||
"studyListFunctionsEnabled": true,
|
||||
"leftSidebarOpen": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user