Opening series sidebar by default

This commit is contained in:
Bruno Alves de Faria committed 2016-08-20 10:09:31 -03:00
1 parent 0dfb3cc824
commit 479e420179
14 files changed
+68 -48

No files matched your search

@@ -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
View 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
View File
@@ -1,3 +1,4 @@
import './blaze.js';
import './string.js';
import './ui.js';
import './user.js';
+6
View 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 || {};
+6 -1
View File
@@ -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);
}
});
});