Updated with Aysel's LesionTracker changes

This commit is contained in:
Erik Ziegler committed 2015-10-20 16:23:32 +02:00
1 parent f7e6bee94f
commit 3e483cb7a9
13 files changed
+193 -40

No files matched your search

@@ -1,5 +1,15 @@
<template name="lesionMeasurementContainer">
<div class="lesionMeasurementContainer">
Table of lesion locations goes here
<table class="lesionTable" id="tblLesion">
<thead>
<tr class="headRow">
<th>#</th>
<th>Location</th>
<th>LD</th>
<th style="text-align: center;"><i class="fa fa-times fa-lg"></i></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</template>
@@ -0,0 +1,28 @@
var lesionTableData;
setLesionTableData = function (data) {
lesionTableData = data;
};
getLesionTableData = function () {
return lesionTableData;
};
returnTblStr = function (obj) {
return '<tr id="' + obj.lineIndex + '" toolType="' + obj.toolType + '"><td class="tblRow">1</td><td class="tblRow">' + obj.lesionLocationObj.location + '</td><td class="tblRow">' + obj.lesions + '</td><td id="' + obj.lineIndex + '" toolType="' + obj.toolType + '"><button type="button" class="btnRemove fa fa-times fa-lg" title="Remove"></button></td></tr>';
};
Template.lesionMeasurementContainer.onRendered( function () {
console.log("rendered lesion");
//Link lesionLocationSelected event
$(document).on("lesionLocationSelected",function(event,data ){
var lesionData = getLesionTableData();
lesionData.lesionLocationObj = data;
var tabId = lesionData.tabId;
var el_index = lesionData.viewportIndex;
var lesionTables = $(".lesionTable");
var tableEl = lesionTables.get(el_index);
var tblStr = returnTblStr(lesionData);
$(tableEl).append(tblStr);
});
});
@@ -3,5 +3,19 @@
float: left
height: 100%
background-color: white
border: 8px solid lightblue
#tblLesion {
overflow: auto;
border: solid 1px white;
padding: 0;
margin: 0 auto;
font-size: 14px;
cursor: pointer;
color: white;
width: 100%;
height:100%;
background-color: black;
}
#tblLesion > tr {background-color: #545454;border-bottom: solid 1px black; width: 100%;}
#tblLesion > tr.headRow{background-color: #424242;width: 100%; line-height: 15px;}
#tblLesion > tr.headRow th{padding:5px;text-align: left;font-style: italic;font-size:14px;}