Try to fix LT-273 in CSS. Change descriptionRequired for LT-252
This commit is contained in:
parent
738c118336
commit
f53ee8e030
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ docs/
|
||||
.meteor/local
|
||||
.meteor/meteorite
|
||||
.meteor/dev_bundle
|
||||
*/.meteor/dev_bundle
|
||||
node_modules
|
||||
Packages/active-entry/helloworld/
|
||||
LesionTracker/tests/nightwatch/reports/
|
||||
|
||||
@ -1 +0,0 @@
|
||||
C:\Users\bruno\AppData\Local\.meteor\packages\meteor-tool\1.3.4_4\mt-os.windows.x86_32\dev_bundle
|
||||
1
LesionTracker/.meteor/dev_bundle
Symbolic link
1
LesionTracker/.meteor/dev_bundle
Symbolic link
@ -0,0 +1 @@
|
||||
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle
|
||||
1
OHIFViewer/.meteor/dev_bundle
Symbolic link
1
OHIFViewer/.meteor/dev_bundle
Symbolic link
@ -0,0 +1 @@
|
||||
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle
|
||||
@ -2,7 +2,9 @@
|
||||
|
||||
html body
|
||||
font-family: 'Roboto', 'OpenSans', 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif
|
||||
|
||||
// Try to fix LT-273, need a monitor to test on though.
|
||||
text-rendering: optimizeLegibility
|
||||
|
||||
html hr
|
||||
border-top: 1px solid $uiBorderColor
|
||||
|
||||
|
||||
@ -3,9 +3,12 @@
|
||||
.group-radio
|
||||
label
|
||||
cursor: pointer
|
||||
|
||||
input
|
||||
height: 0
|
||||
width: 0
|
||||
visibility: hidden
|
||||
|
||||
span
|
||||
padding-left: 23px
|
||||
position: relative
|
||||
@ -20,10 +23,12 @@
|
||||
top: 50%
|
||||
transform(translateY(-50%))
|
||||
width: 16px
|
||||
|
||||
input:focus + span:before
|
||||
// TODO: [design] define a outline for the design
|
||||
outline: none
|
||||
box-shadow: 0 0 2px 2px $textSecondaryColor
|
||||
|
||||
input:checked + span:after
|
||||
background: $uiBorderColorDark
|
||||
border-radius: 5px
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<template name="lesionTableRow">
|
||||
<div class="lesionTableRow {{#if descriptionRequired}}warning{{/if}}{{#if responseStatus}}response-status{{/if}}" data-measurementid="{{_id}}">
|
||||
<div class="lesionTableRow {{#unless rowItem.location}}warning{{/unless}}{{#if responseStatus}}response-status{{/if}}" data-measurementid="{{_id}}">
|
||||
<div class='lesionRowSidebar'>
|
||||
<div class="lesionNumber">
|
||||
{{rowItem.lesionNumberAbsolute}}
|
||||
</div>
|
||||
{{#if rowItem.descriptionRequired}}
|
||||
{{#unless rowItem.location}}
|
||||
<div class="warning-icon">
|
||||
<svg>
|
||||
<use xlink:href=/packages/lesiontracker/assets/icons.svg#icon-ui-warning></use>
|
||||
</svg>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#if rowItem.responseStatus}}
|
||||
<div class="response-status-icon">
|
||||
CR
|
||||
{{ rowItem.responseStatus }}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
@ -1,39 +1,40 @@
|
||||
Template.lesionTableTimepointCell.helpers({
|
||||
hasDataAtThisTimepoint: function() {
|
||||
hasDataAtThisTimepoint() {
|
||||
// This simple function just checks whether or not timepoint data
|
||||
// exists for this Measurement at this Timepoint
|
||||
var lesionData = Template.parentData(1).rowItem;
|
||||
const lesionData = Template.parentData(1).rowItem;
|
||||
return (lesionData &&
|
||||
lesionData.timepoints &&
|
||||
lesionData.timepoints[this.timepointId]);
|
||||
},
|
||||
displayData: function() {
|
||||
displayData() {
|
||||
// Search Measurements by lesion and timepoint
|
||||
var lesionData = Template.parentData(1).rowItem;
|
||||
const lesionData = Template.parentData(1).rowItem;
|
||||
if (!lesionData ||
|
||||
!lesionData.timepoints ||
|
||||
!lesionData.timepoints[this.timepointId]) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = lesionData.timepoints[this.timepointId];
|
||||
const data = lesionData.timepoints[this.timepointId];
|
||||
|
||||
// Check whether this is a Nodal or Extranodal Measurement
|
||||
var targetType = lesionData.isTarget ? 'target' : 'nonTarget';
|
||||
var nodalType = lesionData.isNodal ? 'nodal' : 'extraNodal';
|
||||
const targetType = lesionData.isTarget ? 'target' : 'nonTarget';
|
||||
const nodalType = lesionData.isNodal ? 'nodal' : 'extraNodal';
|
||||
|
||||
// Get criteria types
|
||||
var criteriaTypes = TrialCriteriaTypes.find({
|
||||
const criteriaTypes = TrialCriteriaTypes.find({
|
||||
selected: true
|
||||
}).map(function(criteria) {
|
||||
}).map(criteria => {
|
||||
return criteria.id;
|
||||
});
|
||||
var currentConstraints = getTrialCriteriaConstraints(criteriaTypes, data.imageId);
|
||||
|
||||
const currentConstraints = getTrialCriteriaConstraints(criteriaTypes, data.imageId);
|
||||
|
||||
if (lesionData.toolType === 'bidirectional') {
|
||||
if (data.shortestDiameter) {
|
||||
if (currentConstraints) {
|
||||
var criteria = currentConstraints[targetType][nodalType];
|
||||
const criteria = currentConstraints[targetType][nodalType];
|
||||
if (criteria && Object.keys(criteria)[0] === 'shortestDiameter') {
|
||||
return data.shortestDiameter + ' x ' + data.longestDiameter;
|
||||
}
|
||||
@ -48,12 +49,9 @@ Template.lesionTableTimepointCell.helpers({
|
||||
}
|
||||
},
|
||||
|
||||
isBidirectional: function() {
|
||||
var lesionData = Template.parentData(1).rowItem;
|
||||
if (lesionData.toolType === 'bidirectional') {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
isBidirectional() {
|
||||
const lesionData = Template.parentData(1).rowItem;
|
||||
return lesionData.toolType === 'bidirectional';
|
||||
}
|
||||
});
|
||||
|
||||
@ -68,7 +66,7 @@ function doneCallback(measurementData, deleteTool) {
|
||||
}
|
||||
|
||||
// Delete a lesion if Ctrl+D or DELETE is pressed while a lesion is selected
|
||||
var keys = {
|
||||
const keys = {
|
||||
D: 68,
|
||||
DELETE: 46
|
||||
};
|
||||
@ -77,18 +75,17 @@ Template.lesionTableTimepointCell.events({
|
||||
'dblclick .lesionTableTimepointCell': function() {
|
||||
log.info('Double clicked on a timepoint cell');
|
||||
// Search Measurements by lesion and timepoint
|
||||
var currentMeasurement = Template.parentData(1).rowItem;
|
||||
const currentMeasurement = Template.parentData(1).rowItem;
|
||||
|
||||
// Create some fake measurement data
|
||||
var currentTimepointID = this.timepointId;
|
||||
|
||||
var timepointData = currentMeasurement.timepoints[currentTimepointID];
|
||||
const currentTimepointID = this.timepointId;
|
||||
|
||||
const timepointData = currentMeasurement.timepoints[currentTimepointID];
|
||||
if (!timepointData) {
|
||||
return;
|
||||
}
|
||||
|
||||
var measurementData = {
|
||||
let measurementData = {
|
||||
id: currentMeasurement._id,
|
||||
timepointId: currentTimepointID,
|
||||
response: timepointData.response,
|
||||
@ -107,11 +104,11 @@ Template.lesionTableTimepointCell.events({
|
||||
}
|
||||
},
|
||||
'keydown .lesionTableTimepointCell': function(e) {
|
||||
var keyCode = e.which;
|
||||
const keyCode = e.which;
|
||||
if (keyCode === keys.DELETE ||
|
||||
(keyCode === keys.D && e.ctrlKey === true)) {
|
||||
var currentMeasurement = Template.parentData(1).rowItem;
|
||||
var currentTimepointID = this.timepointId;
|
||||
const currentMeasurement = Template.parentData(1).rowItem;
|
||||
const currentTimepointID = this.timepointId;
|
||||
|
||||
showConfirmDialog(function() {
|
||||
clearMeasurementTimepointData(currentMeasurement._id, currentTimepointID);
|
||||
|
||||
@ -2,6 +2,10 @@
|
||||
|
||||
$expandedHeight = 160px
|
||||
|
||||
img.logoImage
|
||||
display: inline-block
|
||||
height: 100%
|
||||
|
||||
.topBar
|
||||
height: $topBarHeight
|
||||
color: $textPrimaryColor
|
||||
@ -14,8 +18,6 @@ $expandedHeight = 160px
|
||||
text-decoration: none
|
||||
|
||||
img.logoImage
|
||||
display: inline-block
|
||||
height: 100%
|
||||
max-height: 50px
|
||||
margin: 0 5px
|
||||
|
||||
|
||||
@ -23,7 +23,11 @@
|
||||
|
||||
<div class="toolbarSectionDrawerContainer">
|
||||
<!-- TODO: [design] check which group of tools shall be shown -->
|
||||
<div class="toolbarSectionDrawer">More tools coming soon</div>
|
||||
<div class="toolbarSectionDrawer">
|
||||
{{#each toolbarButton in extraToolbarButtons}}
|
||||
{{>toolbarSectionButton toolbarButton}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Template.toolbarSection.helpers({
|
||||
};
|
||||
},
|
||||
|
||||
toolbarButtons: function() {
|
||||
toolbarButtons() {
|
||||
var buttonData = [];
|
||||
buttonData.push({
|
||||
id: 'zoom',
|
||||
@ -104,7 +104,36 @@ Template.toolbarSection.helpers({
|
||||
});
|
||||
|
||||
return buttonData;
|
||||
},
|
||||
|
||||
extraToolbarButtons() {
|
||||
let buttonData = [];
|
||||
|
||||
// TODO: Get real icons for CR / UN / EX
|
||||
buttonData.push({
|
||||
id: 'crTool',
|
||||
title: 'CR Tool',
|
||||
classes: 'imageViewerTool toolbarSectionButton',
|
||||
svgLink: '/packages/lesiontracker/assets/icons.svg#icon-tools-measure-temp'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'unTool',
|
||||
title: 'UN Tool',
|
||||
classes: 'imageViewerTool toolbarSectionButton',
|
||||
svgLink: '/packages/lesiontracker/assets/icons.svg#icon-tools-measure-temp'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'exTool',
|
||||
title: 'EX Tool',
|
||||
classes: 'imageViewerTool toolbarSectionButton',
|
||||
svgLink: '/packages/lesiontracker/assets/icons.svg#icon-tools-measure-temp'
|
||||
});
|
||||
|
||||
return buttonData;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Template.toolbarSection.events({
|
||||
@ -121,22 +150,24 @@ Template.toolbarSection.events({
|
||||
});
|
||||
|
||||
Template.toolbarSection.onRendered(function() {
|
||||
var tooltipButtons = $('[data-toggle="tooltip"]');
|
||||
const instance = Template.instance();
|
||||
const tooltipButtons = instance.$('[data-toggle="tooltip"]');
|
||||
tooltipButtons.tooltip(OHIF.viewer.tooltipConfig);
|
||||
|
||||
// Enable tooltips for the layout button
|
||||
var extraTooltipButtons = $('[rel="tooltip"]');
|
||||
const extraTooltipButtons = instance.$('[rel="tooltip"]');
|
||||
extraTooltipButtons.tooltip(OHIF.viewer.tooltipConfig);
|
||||
|
||||
// Set disabled/enabled tool buttons that are set in toolManager
|
||||
var states = toolManager.getToolDefaultStates();
|
||||
var disabledToolButtons = states.disabledToolButtons;
|
||||
var allToolbarButtons = $('#toolbar').find('button');
|
||||
const states = toolManager.getToolDefaultStates();
|
||||
const disabledToolButtons = states.disabledToolButtons;
|
||||
const allToolbarButtons = $('#toolbar').find('button');
|
||||
if (disabledToolButtons && disabledToolButtons.length > 0) {
|
||||
for (var i = 0; i < allToolbarButtons.length; i++) {
|
||||
var toolbarButton = allToolbarButtons[i];
|
||||
const toolbarButton = allToolbarButtons[i];
|
||||
$(toolbarButton).prop('disabled', false);
|
||||
var index = disabledToolButtons.indexOf($(toolbarButton).attr('id'));
|
||||
|
||||
const index = disabledToolButtons.indexOf($(toolbarButton).attr('id'));
|
||||
if (index !== -1) {
|
||||
$(toolbarButton).prop('disabled', true);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user