diff --git a/LesionTracker/client/compatibility/docking-container.js b/LesionTracker/client/compatibility/docking-container.js
index d515d6c88..5b7a1b4d3 100644
--- a/LesionTracker/client/compatibility/docking-container.js
+++ b/LesionTracker/client/compatibility/docking-container.js
@@ -1,33 +1,39 @@
-//Collapse the container
-function collapseContainer ( container ) {
- container.toggleClass("collapseHorizontal");
-}
+(function($) {
-//function add collapse button
-function addButtonCollapse ( container ) {
- var btnCollapse = document.createElement("button");
- btnCollapse.innerHTML = ">";
- btnCollapse.classList.add('btnCollapse');
- btnCollapse.onclick = function() { // Note this is a function
- collapseContainer(container);
+ //Collapse the container
+ function collapseContainer ( container ) {
+ container.toggleClass("collapseHorizontal");
+ var btnCollapse = container.find(".btnCollapse");
+ }
+
+ //function add collapse button
+ function addButtonCollapse ( container ) {
+ var btnCollapse = document.createElement("button");
+ btnCollapse.innerHTML = ">";
+ $(btnCollapse).addClass ("btnCollapse");
+
+ btnCollapse.onclick = function() { // Note this is a function
+ collapseContainer(container);
+ };
+ container.append(btnCollapse);
+ }
+
+ $.fn.dockingContainer = function(options) {
+ var self = this;
+ var opts = $.extend( {}, $.fn.dockingContainer.defaults, options);
+
+ //Set container class
+ this.addClass("dockingContainer");
+
+ //Add btnCollapse
+ addButtonCollapse(this);
+ return this;
};
- container.append(btnCollapse);
-}
-$.fn.dockingContainer = function(options) {
- var self = this;
- var opts = $.extend( {}, $.fn.dockingContainer.defaults, options);
+ //Defaults
+ $.fn.dockingContainer.defaults = {
+ background: "black"
+ };
- //Set container class
- this.addClass("dockingContainer");
-
- //Add btnCollapse
- addButtonCollapse(this);
- return this;
-};
-
-//Defaults
-$.fn.dockingContainer.defaults = {
- background: "black"
-};
\ No newline at end of file
+}(jQuery));
\ No newline at end of file
diff --git a/LesionTracker/client/compatibility/lesionTool.js b/LesionTracker/client/compatibility/lesionTool.js
index 14fa4add9..2bfb8c093 100644
--- a/LesionTracker/client/compatibility/lesionTool.js
+++ b/LesionTracker/client/compatibility/lesionTool.js
@@ -22,7 +22,7 @@ var cornerstoneTools = (function ($, cornerstone, cornerstoneMath, cornerstoneTo
//Listens LesionToolModified event and calls measurementModified function when lesion measurement is changed or updated.
$(element).on("LesionToolModified", measurementModified);
- $(element).trigger("LesionMeasurementCreated");
+ $(element).trigger("LesionMeasurementCreated", mouseEventData);
// create the measurement data for this tool with the end handle activated
var measurementData = {
@@ -282,9 +282,4 @@ var cornerstoneTools = (function ($, cornerstone, cornerstoneMath, cornerstoneTo
toolType: toolType
});
return cornerstoneTools;
-}($, cornerstone, cornerstoneMath, cornerstoneTools));
-
-toolManager.addTool('lesion', {
- mouse: cornerstoneTools.lesion,
- touch: cornerstoneTools.lesionTouch
-});
\ No newline at end of file
+}($, cornerstone, cornerstoneMath, cornerstoneTools));
\ No newline at end of file
diff --git a/LesionTracker/client/components/init.js b/LesionTracker/client/components/init.js
new file mode 100644
index 000000000..a81e40987
--- /dev/null
+++ b/LesionTracker/client/components/init.js
@@ -0,0 +1,6 @@
+Meteor.startup(function() {
+ toolManager.addTool('lesion', {
+ mouse: cornerstoneTools.lesion,
+ touch: cornerstoneTools.lesionTouch
+ });
+});
\ No newline at end of file
diff --git a/LesionTracker/client/components/lesionDialog/lesionDialog.html b/LesionTracker/client/components/lesionDialog/lesionDialog.html
new file mode 100644
index 000000000..369c7cd5a
--- /dev/null
+++ b/LesionTracker/client/components/lesionDialog/lesionDialog.html
@@ -0,0 +1,3 @@
+
+ {{> lesionLocationDialog}}
+
\ No newline at end of file
diff --git a/LesionTracker/client/components/lesionDialog/lesionDialog.js b/LesionTracker/client/components/lesionDialog/lesionDialog.js
new file mode 100644
index 000000000..c6c8a0c9e
--- /dev/null
+++ b/LesionTracker/client/components/lesionDialog/lesionDialog.js
@@ -0,0 +1,23 @@
+Template.lesionDialog.onRendered(function () {
+ // Listen lesionMeaurementCreated Event and when this event is triggered, show lesionLocationDialog Box
+ var viewportIndex = this.data.activeViewport.get();
+
+ $(document).on("LesionMeasurementCreated",function(e, eventData){
+
+ console.log("lesionMeasurementCreated");
+ var data = {};
+ data.viewportIndex = viewportIndex;
+
+ //Set Lesion Table Data to insert into lesion table
+ setLesionTableData(data);
+
+ if( !Session.get("lesionLocationSelected") ) {
+ $("#modal-dialog-container").css({
+ "top": eventData.currentPoints.page.y,
+ "left": eventData.currentPoints.page.x
+ });
+
+ $("#lesionDialog").modal("show");
+ }
+ });
+});
\ No newline at end of file
diff --git a/LesionTracker/client/components/lesionLocationDialog/lesionLocationDialog.css b/LesionTracker/client/components/lesionLocationDialog/lesionLocationDialog.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/LesionTracker/client/components/lesionLocationDialog/lesionLocationDialog.html b/LesionTracker/client/components/lesionLocationDialog/lesionLocationDialog.html
new file mode 100644
index 000000000..1f25b7950
--- /dev/null
+++ b/LesionTracker/client/components/lesionLocationDialog/lesionLocationDialog.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+ #
+ Location
+ LD
+
+