Work on refactoring measurements out of Lesion Tracker package

- Removed AssociatedStudies Collection
- Measurement API is generated from configuration files
- Data exchange methods are defined in configuration
This commit is contained in:
Erik Ziegler committed 2016-11-15 08:21:46 +01:00
1 parent c511edd419
commit ab4d4c9008
537 files changed
+5122 -3545

No files matched your search

@@ -0,0 +1,31 @@
<template name="settingsTable">
<table class="settingsTable table">
<thead>
<tr>
<th>Setting</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{{ #each objectToPairs settings }}
{{#if value}}
<tr>
<td>
<i class="fa fa-pencil editSetting"></i>
<i class="fa fa-trash deleteSetting"></i>
{{getSettingText}}
</td>
<td>
{{prettyPrintStringify value}}
</td>
</tr>
{{/if}}
{{ /each }}
</tbody>
</table>
<div class="addSettingContainer">
<span class="addSetting">
Add Display Setting <i class="fa fa-plus-circle"></i>
</span>
</div>
</template>
@@ -0,0 +1,57 @@
Template.settingsTable.events({
/**
* Opens the Setting Entry dialog to allow the user to create a new setting
* Specifies attributes and setting level for the Setting Entry dialog
* based on the data given to this template.
*/
'click .addSetting': function() {
// Open the Setting Entry Dialog
openSettingEntryDialog();
},
/**
* Opens the Setting Entry dialog to allow the user to edit an existing
* setting. Passes setting details to the dialog so its current properties
* can be displayed.
*
* Specifies attributes for the Setting Entry dialog
* based on the data given to this template.
*/
'click .editSetting': function() {
// Get the properties of the current setting
var setting = this;
// Open the Setting Entry Dialog with the setting
openSettingEntryDialog(setting);
},
/**
* Removes a setting from the current Viewport
*/
'click .deleteSetting': function() {
// Get the properties of the current setting
var setting = this;
// Retrieve the current viewport model
var viewport = getActiveViewportModel();
// Remove the specified setting
delete viewport.viewportSettings[setting.key];
// Instruct the Protocol Engine to update the Layout Manager with new data
var viewportIndex = Session.get('activeViewport');
ProtocolEngine.updateViewports(viewportIndex);
}
});
Template.settingsTable.helpers({
getSettingText: function() {
var setting = this;
if (HP.CustomViewportSettings[setting.key]) {
return HP.CustomViewportSettings[setting.key].text;
} else if (HP.displaySettings[setting.key]) {
return HP.displaySettings[setting.key].text;
} else {
return Blaze._globalHelpers['prettyPrintStringify'](setting.key);
}
}
});
@@ -0,0 +1,48 @@
@import "{design}/app.styl"
table.settingsTable
thead
tr
th
theme('color', '$defaultColor')
text-align: center
th:first-child
text-align: left
tbody
background: #3e3e3e
tr
td
theme('color', '$defaultColor')
text-align: center
.editSetting
.deleteSetting
cursor: pointer
transition(all 0.1s ease)
&:hover
theme('color', '$hoverColor')
&:active
theme('color', '$activeColor')
td:first-child
text-align: left
.addSettingContainer
margin: 10px 0
text-align: center
theme('color', '$defaultColor')
.addSetting
cursor: pointer
transition(all 0.1s ease)
&:hover
theme('color', '$hoverColor')
&:active
theme('color', '$activeColor')