Commit e4f882e8c090944adde848d4b0b0ee54fa5d2a5d
1 parent
d1408db5
Bind image path through jQuery removed the inline image tag from controler
Showing
4 changed files
with
23 additions
and
153 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -7,134 +7,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7 | 7 | |
8 | 8 | $rootScope.OpenedTileData=[]; |
9 | 9 | |
10 | - $scope.genderId = ""; | |
11 | - $scope.BodyViewData; | |
12 | - $scope.selectedGenderBodyViewData; | |
13 | - $scope.imagePath = ""; | |
14 | - $rootScope.BodyRegionData; | |
15 | - $rootScope.BodyRegionCordinatesData; | |
16 | - $scope.isTransparencyActivated = false; | |
17 | - $rootScope.BodyLayerData; | |
18 | - $rootScope.VocabTermData; | |
19 | - | |
20 | - $scope.VocabTermTxt; | |
21 | - $scope.CommonData | |
22 | - $rootScope.TermNumberData; | |
23 | - $rootScope.BodySystemData | |
24 | - $scope.bodyViewId = 0; | |
25 | - $rootScope.bgartData; | |
26 | - $scope.drawnBodyRegions; | |
27 | - //view specific constants | |
28 | - //TODO | |
29 | - //$rootScope.voId; | |
30 | - | |
31 | - $rootScope.voId = 1; | |
32 | - $scope.layerNumber; | |
33 | - $scope.daCounter = 1; | |
34 | - $scope.bagartDetails; | |
35 | - $scope.transNumber = 50; | |
36 | - | |
37 | - //for transarency scale | |
38 | - $scope.TBDrawStartX; | |
39 | - $scope.TBDrawStartY; | |
40 | - $rootScope.path = "~/../content/images/speeachBubbleClose.png"; | |
41 | - $rootScope.isHighLight = false; | |
42 | - $rootScope.coloredImageCanvasList = []; | |
43 | - $rootScope.coloredImageMRCanvasList = []; | |
44 | - $rootScope.ColoredCanvasData = []; | |
45 | - $rootScope.grayImageDataList = []; | |
46 | - $rootScope.grayImageMRDataList = []; | |
47 | - $rootScope.updatedGrayDataList = []; | |
48 | - $rootScope.updatedGrayMRDataList = []; | |
49 | - $scope.isEligibleForHighlight = false; | |
50 | - $scope.doHighlightOrExtract = false; | |
51 | - $scope.isEligibleForHighlightBodyByTermList = false; | |
52 | - | |
53 | - // $scope.AnteriorView = "active"; | |
54 | - | |
55 | - $scope.zoomInOut = 75; | |
56 | - $scope.speechBubbleCounter = 0; | |
57 | - $scope.j = 0; | |
58 | - $scope.speechbubbleList = []; | |
59 | - $scope.speachBubbleArrayAnnotation = []; | |
60 | - $rootScope.multiAnnotationIsON = false; | |
61 | - $scope.previousGrayImageDataVar; | |
62 | - $scope.previousGrayCanvas; | |
63 | - $rootScope.updatedImageDataList = []; | |
64 | - $rootScope.updatedImageMRDataList = []; | |
65 | - | |
66 | - $scope.previousSelectedTermList = []; | |
67 | - $scope.runningWorkers = []; | |
68 | - $scope.runningSearchWorkers = []; | |
69 | - $scope.runningBodyViewWorkers = []; | |
70 | - | |
71 | - // This variable is used for unhighlight previously highlighted body portion, if multiAnnotation is false. | |
72 | - $scope.machedIcolorInBodyRegion = []; | |
73 | - | |
74 | - $rootScope.MaskCanvasData = []; | |
75 | - | |
76 | - //extract | |
77 | - $rootScope.isExtract = false; | |
78 | - | |
79 | - | |
80 | - $rootScope.whiteImageDataList = []; | |
81 | - $rootScope.whiteImageMRDataList = []; | |
82 | - $rootScope.previousHighlightList = []; | |
83 | - | |
84 | - $rootScope.isViewChange = false; | |
85 | - $rootScope.isGenderChnage = false; | |
86 | - | |
87 | - // to do it is setting but not using. need to check | |
88 | - $rootScope.updatedWhiteImageDataList = []; | |
89 | - $rootScope.updatedWhiteImageMRDataList = []; | |
90 | - | |
91 | - //normal mode | |
92 | - $rootScope.isNormalMode = true; | |
93 | - $rootScope.isZoomed = false; | |
94 | - | |
95 | - //navigator man functionality | |
96 | - $scope.navigatorImage; | |
97 | - $scope.NavigatorData; | |
98 | - $scope.navimgsrc; | |
99 | - | |
100 | - $scope.dragdivleft = 0; | |
101 | - $scope.dragdivtop = 0; | |
102 | - | |
103 | - $scope.IsSearchVisible = false; | |
104 | - $scope.shapesize = 1; | |
105 | - $scope.dragdivposition = { | |
106 | - "left": $scope.dragdivleft, | |
107 | - "top": $scope.dragdivtop | |
108 | - }; | |
109 | - | |
110 | - | |
111 | - //array for bodyviewid correspoing to male female(used for gender change) | |
112 | - $scope.correspondingBodyViewIds = { | |
113 | - '1': '5', | |
114 | - '2': '6', | |
115 | - '3': '7', | |
116 | - '4': '8', | |
117 | - '9': '11', | |
118 | - '10': '12', | |
119 | - | |
120 | - '5': '1', | |
121 | - '6': '2', | |
122 | - '7': '3', | |
123 | - '8': '4', | |
124 | - '11': '9', | |
125 | - '12': '10', | |
126 | - | |
127 | - } | |
128 | - | |
129 | - $scope.bodyViews = { | |
130 | - 'Anterior': '1', | |
131 | - 'Lateral': '2', | |
132 | - 'Medial': '3', | |
133 | - 'Posterior': '4', | |
134 | - 'Lateral Arm': '5', | |
135 | - 'Medial Arm': '6' | |
136 | - } | |
137 | - | |
10 | + | |
138 | 11 | $scope.loadForModuleById = function (moduleId) { |
139 | 12 | |
140 | 13 | $scope.moduleId = moduleId; |
... | ... | @@ -157,23 +30,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
157 | 30 | } |
158 | 31 | |
159 | 32 | $scope.openModuleItemView = function (event) { |
160 | - alert('openModuleItemView is called') | |
161 | - var moduleItemDataToBeSaved = event.target.id; | |
162 | - | |
33 | + | |
34 | + //0. Get selected Image Id | |
35 | + var moduleItemDataToBeSaved = event.target.id; | |
36 | + | |
37 | + //1.Filter selected module ietem data and get the pushed opened moduile array object | |
163 | 38 | $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); |
164 | 39 | |
40 | + //2. Pick the image name to create a source to open | |
165 | 41 | $rootScope.imageName = $rootScope.OpenedTileData[3]; |
166 | - | |
167 | 42 | $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; |
168 | - alert('img Name: ' + $rootScope.OpenItemImageName); | |
169 | 43 | |
44 | + //3. Navigate to the Module-item-view | |
170 | 45 | var u = $location.url(); |
171 | 46 | $location.url('/module-item-view'); |
172 | 47 | } |
173 | 48 | |
174 | 49 | |
175 | - $scope.openBodyView = function () | |
50 | + $scope.openModuleItem = function () | |
176 | 51 | { |
52 | + //1. create a jsPanel and load the module item view | |
53 | + | |
54 | + | |
55 | + | |
177 | 56 | $.jsPanel({ |
178 | 57 | id: 'aaImagePanel', |
179 | 58 | selector: '.aaBodyView', |
... | ... | @@ -205,8 +84,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
205 | 84 | alert('aaView val: ' + document.getElementById('aaDetailPageDiv')); |
206 | 85 | //console.log('html is compiled' + document.getElementById('daView')) |
207 | 86 | if (document.getElementById('aaDetailPageDiv') != null) { |
208 | - | |
209 | - | |
210 | 87 | ////0.4 added some stylesheets |
211 | 88 | $('#aaBodyView').css("height", $(window).outerHeight()); |
212 | 89 | |
... | ... | @@ -215,7 +92,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
215 | 92 | |
216 | 93 | $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
217 | 94 | |
218 | - $scope.loadAAImage($rootScope.OpenItemImagePath); | |
95 | + $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); | |
219 | 96 | |
220 | 97 | //$('#aaBodyView').css("height", $(window).outerHeight()); |
221 | 98 | |
... | ... | @@ -226,11 +103,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
226 | 103 | |
227 | 104 | $scope.loadAAImage = function (OpenedModuleItemPath) |
228 | 105 | { |
106 | + | |
107 | + | |
229 | 108 | //var imgNode = document.getElementById('modItemImage'); |
230 | - //imgNode.src = $rootScope.OpenItemImagePath; | |
109 | + ////document.getElementById("imageid").src = "../template/save.png"; | |
110 | + ////imgNode.src = $rootScope.OpenItemImagePath; | |
111 | + //alert($rootScope.OpenItemImagePath); | |
231 | 112 | |
232 | - var imageNode = "'<img id='modItemImage' src=' " + $rootScope.OpenItemImagePath + "'alt='' title='' class='img-responsive'>'"; | |
233 | - $('#imageDiv').append(imageNode); | |
113 | + // var imageNode = "'<img id='modItemImage' src=' " + $rootScope.OpenItemImagePath + "'alt='' title='' class='img-responsive'>'"; | |
114 | + //$('#imageDiv').append(imageNode); | |
234 | 115 | } |
235 | 116 | |
236 | 117 | angular.element(document).ready(function (e) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -56,15 +56,6 @@ AIA.service('ModuleService', function($http, DataService) { |
56 | 56 | .where("_Title == " + title) |
57 | 57 | .select(); |
58 | 58 | |
59 | - //AADataForSelectedItem.push("imageId: " + selectedTileData[0]._ImageId); | |
60 | - //AADataForSelectedItem.push("BodyRegion:" + selectedTileData[0]._BodyRegion); | |
61 | - //AADataForSelectedItem.push("BodySystem: " + selectedTileData[0]._BodySystem); | |
62 | - //AADataForSelectedItem.push("ImageName: " + selectedTileData[0]._ImageName); | |
63 | - //AADataForSelectedItem.push("ImageType:" + selectedTileData[0]._ImageType); | |
64 | - //AADataForSelectedItem.push("TileImageName: " + selectedTileData[0]._TileImageName); | |
65 | - | |
66 | - //AADataForSelectedItem.push("ViewOrientation: " + selectedTileData[0]._ViewOrientation); | |
67 | - | |
68 | 59 | AADataForSelectedItem.push(selectedTileData[0]._ImageId); |
69 | 60 | AADataForSelectedItem.push(selectedTileData[0]._BodyRegion); |
70 | 61 | AADataForSelectedItem.push(selectedTileData[0]._BodySystem); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... | ... | @@ -87,9 +87,7 @@ |
87 | 87 | <div class="row"> |
88 | 88 | |
89 | 89 | <div class=" col-sm-12 img-thumbnail" align="center" id="imageDiv" style="height: 478px; overflow: scroll;"> |
90 | - | |
91 | - | |
92 | - <!--<img id="modItemImage" src="../../../content/images/aa/images/aa_img_3112.jpg" alt="" title="" class="img-responsive">--> | |
90 | + <img id="modItemImage" alt="" title="" class="img-responsive"> | |
93 | 91 | <div class="clearfix"> |
94 | 92 | <!--<img id="modItemImage" ng-init="alert('hi')" alt="" title="" class="img-responsive">--> |
95 | 93 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html
1 | 1 | <div> |
2 | 2 | <div ng-include="aap/widget/MainMenu.html"></div> |
3 | - <div ng-init="openBodyView()" id="" class="aaBodyView" ng-controller="TileViewListController"></div> | |
3 | + <div ng-init="openModuleItem()" id="" class="aaBodyView" ng-controller="TileViewListController"></div> | |
4 | 4 | <!--<div > |
5 | 5 | |
6 | 6 | </div>--> | ... | ... |