Commit 7490ec357910b099bb86407e369b1f80509748e8

Authored by Birendra Kumar
1 parent adc5afdd

DA bug fixed

400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs
... ... @@ -20,7 +20,16 @@ namespace AIAHTML5.API.Controllers
20 20 public HttpResponseMessage Get(string layerNumber, string bodyViewIndex, string systemNumber, string zoomLevel)
21 21 {
22 22 dynamic bodyRegions = PixelLocator.GetBodyRegionsPixelData(layerNumber, bodyViewIndex, systemNumber, zoomLevel);
23   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) };
  23 + if (bodyRegions != "InternalServerError")
  24 + {
  25 + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) };
  26 + }
  27 + else
  28 + {
  29 + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent("Connection Failed:Internal Server Error") };
  30 + }
  31 +
  32 +
24 33 }
25 34  
26 35 // POST: api/PixelLocations
... ...
400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs
... ... @@ -38,7 +38,8 @@ namespace AIAHTML5.API.Models
38 38 }
39 39 catch (Exception e)
40 40 {
41   - string error = e.Message + "..STACKTRACE: " + e.StackTrace;
  41 + //string error = e.Message + "..STACKTRACE: " + e.StackTrace;
  42 + string error = "InternalServerError";
42 43 return error;
43 44 }
44 45 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -877,7 +877,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
877 877 $scope.btnSearchListId = "btnSearchList";
878 878 $scope.tbSliderId = "tbSlider";
879 879 $scope.IdMale = "IdMale";
880   - $scope.IdFemale = "IdFemale";
  880 + $scope.IdFemale = "IdFemale";
881 881  
882 882 //if ($rootScope.isOpenResourceBtnClicked || $rootScope.isCallFromOtherModule) {
883 883  
... ... @@ -1213,6 +1213,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1213 1213 // side bar toggle
1214 1214 $("#sidebarId").attr("id", "sidebarId_" + $rootScope.MULTI_VIEW_ID);
1215 1215  
  1216 +
1216 1217 // bodyview id
1217 1218 $("#Anterior").attr("id", "Anterior_" + $rootScope.MULTI_VIEW_ID);
1218 1219 $("#Lateral").attr("id", "Lateral_" + $rootScope.MULTI_VIEW_ID);
... ... @@ -4128,7 +4129,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4128 4129 $scope.isScrolledToHighlightedBR = false;
4129 4130 //disable the background till the system gets highlighted.
4130 4131 $scope.DisableUI();
4131   - $('.ui-slider').slider('disable');
  4132 +
  4133 + // $('.ui-slider').slider('disable');
  4134 +
  4135 + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('disable');
4132 4136  
4133 4137 var currentNumber=$scope.GetwindowStoreData(windowviewid,'currentLayerNumber');
4134 4138 if ($scope.GetwindowStoreData(windowviewid,'isTransparencyActivated')) {
... ... @@ -4157,26 +4161,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4157 4161 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
4158 4162 var lNumber=$scope.GetwindowStoreData(windowviewid,'layerNumber');
4159 4163 var zoomValue=$scope.GetwindowStoreData(windowviewid,'zoomInOut');
4160   - var systemNumber=$scope.GetwindowStoreData(windowviewid,'systemNumber');
  4164 + var systemNumber = $scope.GetwindowStoreData(windowviewid, 'systemNumber');
4161 4165  
4162 4166 TermService.getTermData(lNumber, bodyVid, systemNumber, zoomValue)
4163 4167 .then(
4164 4168 function (result) {
4165 4169  
4166   - if (result.length == 0) {
  4170 + if (result.length ==0) {
4167 4171 $rootScope.isLoading = false;
4168 4172 $('#spinner').css('visibility', 'hidden');
4169 4173  
4170 4174 //remove existing data and draw fresh data
4171 4175 $scope.removeCurrentHighlightedBodySystem(windowviewid);
4172 4176  
  4177 + // $('.ui-slider').slider('enable');
  4178 + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable');
  4179 + $scope.EnableUI();
4173 4180  
4174   - $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE;
  4181 + $rootScope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE;
  4182 +
4175 4183 $("#daMessageModal").modal('show');
4176 4184  
4177   - $scope.EnableUI();
4178   -
4179   - $('.ui-slider').slider('enable');
  4185 + $(".notfoundSystem").draggable({ handle: ".modal-header" });
  4186 + $(".modal-backdrop").css("opacity", ".5");
  4187 +
4180 4188 }
4181 4189 else {
4182 4190 console.log('1. HighlightBodyByTermListForBodySystem is called');
... ... @@ -4249,7 +4257,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4249 4257  
4250 4258  
4251 4259 grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
4252   - if ($scope.GetwindowStoreData(windowviewid,'isExtract')) {
  4260 + if ($scope.GetwindowStoreData(windowviewid, 'isExtract')) {
4253 4261 grayCanvasContext.putImageData(whiteImageDataList[parseInt(TermExistInBodyRegionId) - 1], 0, 0);
4254 4262 }
4255 4263 else {
... ... @@ -4264,7 +4272,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4264 4272 var grayCanvasMRX;
4265 4273 var grayCanvasMRY;
4266 4274  
4267   - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
  4275 + var bodyVid = $scope.GetwindowStoreData(windowviewid, 'voId');
4268 4276 //draw a canvas for same bodyregion wich will be flipped after coloring the body system
4269 4277 if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
4270 4278 if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
... ... @@ -4303,10 +4311,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4303 4311 .from($rootScope.macthedTermList)
4304 4312 .where('bodyRegionId == ' + TermExistInBodyRegionId)
4305 4313 .select();
4306   - var coloredImageDataVar=null;
4307   - if (coloredImageCanvasList.length>0) {
4308   - coloredImageDataVar = coloredImageCanvasList[parseInt(TermExistInBodyRegionId)-1];
4309   - }
  4314 + var coloredImageDataVar = null;
  4315 + if (coloredImageCanvasList.length > 0) {
  4316 + coloredImageDataVar = coloredImageCanvasList[parseInt(TermExistInBodyRegionId) - 1];
  4317 + }
4310 4318  
4311 4319 var grayImageDataValue = gData.data;
4312 4320 var coloredImageDataValue = coloredImageDataVar.data;
... ... @@ -4366,14 +4374,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4366 4374  
4367 4375 }
4368 4376 }
4369   -
4370   - $('#spinner').css('visibility', 'hidden')
4371   - $rootScope.isLoading = false;
4372   -
4373   - //document.getElementById("daView").style.pointerEvents = "auto";
4374   -
4375   - //$('.ui-slider').slider('enable');
4376   - $scope.EnableUI();
  4377 +
4377 4378 prevBRID = TermExistInBodyRegionId;
4378 4379  
4379 4380 $scope.scrollToHighlightedBodyRegion(TermExistInBodyRegionId, windowviewid);
... ... @@ -4386,14 +4387,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4386 4387 $rootScope.isLoading = false;
4387 4388  
4388 4389 $scope.EnableUI();
4389   - $('.ui-slider').slider('enable');
  4390 + // $('.ui-slider').slider('enable');
  4391 + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable');
4390 4392 }
4391 4393  
4392   - })
4393   -
4394   - }
  4394 + });
  4395 +
  4396 + //$('.ui-slider').slider('enable');
  4397 + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable');
  4398 + $scope.EnableUI();
4395 4399  
4396 4400  
  4401 + }
4397 4402  
4398 4403 }
4399 4404 },
... ... @@ -4401,14 +4406,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4401 4406 console.log(' Error in getting term data = ' + error);
4402 4407 $('#spinner').css('visibility', 'hidden')
4403 4408 $rootScope.isLoading = false;
4404   -
  4409 + //$('.ui-slider').slider('enable');
  4410 + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable');
4405 4411 $scope.EnableUI();
4406 4412 //remove existing data and draw fresh data
4407 4413 $scope.removeCurrentHighlightedBodySystem(windowviewid);
4408 4414  
4409   - $scope.message = error;
  4415 + $rootScope.message = error;
4410 4416 $("#daMessageModal").modal('show');
4411 4417  
  4418 + $(".notfoundSystem").draggable({ handle: ".modal-header" });
  4419 + $(".modal-backdrop").css("opacity", ".5");
  4420 +
  4421 +
4412 4422 });
4413 4423  
4414 4424  
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js
... ... @@ -20,7 +20,7 @@
20 20 deferred.resolve(data);
21 21 }).error(function (data, status, headers, config) {
22 22 console.log('error status= ' + status)
23   - deferred.reject(status);
  23 + deferred.reject(data);
24 24 });
25 25 return deferred.promise;
26 26 },
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -312,50 +312,7 @@
312 312 </div>
313 313 </div>
314 314 </div>
315   - <div class="modal fade" id="daMessageModal" role="dialog" style="top:20%;">
316   -
317   - <div class="modal-dialog modal-sm">
318   -
319   - <div class="modal-content">
320   -
321   - <div class="modal-header">
322   -
323   - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
324   -
325   - </div>
326   -
327   - <div class="modal-title"></div>
328   -
329   - <!--<div class="modal-body">"No body system"</div>-->
330   -
331   - <div class="modal-header"><p data-ng-bind="message" style="font-size:15px;"></p></div>
332   -
333   -
334   -
335   - <div class="modal-footer"> <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal">OK</button></div>
336   -
337   -
338   - </div>
339   -
340   -
341   - </div>
342   -
343   - </div>
344   -
345   -
346   - <div class="modal fade" id="daMessageModal" role="dialog">
347   - <div class="modal-dialog">
348   -
349   - <div class="modal-content">
350   - <div class="modal-body" data-ng-bind="message"></div>
351   -
352   - <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div>
353   - </div>
354   - </div>
355   - </div>
356   -
357   -
358   -
  315 +
359 316 <div id="searchedTermListPopUp" style="display:none">
360 317 <div class="modal-header annotation-modal-header">
361 318 <button type="button" class="close" aria-label="Close" ng-click="closeSerachTermListPopUp()"><span aria-hidden="true">&times;</span></button>
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -264,7 +264,6 @@
264 264 <div class="modal-footer" style="padding-bottom:10px;">
265 265 <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, false)">Send Mail</button>
266 266 </div>
267   - <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
268 267 </div>
269 268 </div>
270 269 </div>
... ... @@ -301,7 +300,6 @@
301 300 <div class="modal-footer modal-footer-forgot-password" style="padding-bottom:10px;">
302 301 <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, true)">Send Mail</button>
303 302 </div>
304   - <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
305 303 </div>
306 304 </div>
307 305 </div>
... ... @@ -1056,6 +1054,33 @@
1056 1054 </div>
1057 1055 </div>
1058 1056  
  1057 +
  1058 + <!--DA Body System not found modal-->
  1059 + <div class="modal fade notfoundSystem" id="daMessageModal" role="dialog" aria-labelledby="myModalLabel"
  1060 + style="z-index: 1200002; top:10%">
  1061 +
  1062 + <div class="modal-dialog modal-sm">
  1063 +
  1064 + <div class="modal-content">
  1065 +
  1066 + <div class="modal-header">
  1067 +
  1068 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  1069 +
  1070 + </div>
  1071 +
  1072 + <div class="modal-title"></div>
  1073 +
  1074 + <div class="modal-header"><p data-ng-bind="message" style="font-size:15px;"></p></div>
  1075 +
  1076 + <div class="modal-footer"> <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal">OK</button></div>
  1077 +
  1078 + </div>
  1079 +
  1080 + </div>
  1081 +
  1082 + </div>
  1083 +
1059 1084 <!--Export Image Modal-->
1060 1085 <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
1061 1086 style="z-index: 1200002;">
... ... @@ -1179,7 +1204,8 @@
1179 1204 </div>
1180 1205 </div>
1181 1206 <!--Print Preview Modal-->
1182   - <div id="dvPrintPreview" style="display: none;"></div>
  1207 + <div id="dvPrintPreview" style="display: none;"></div>
  1208 +
1183 1209 </div>
1184 1210 </div>
1185 1211 <!--RESET PASSWORD FORM-->
... ... @@ -1258,6 +1284,8 @@
1258 1284 </div>
1259 1285 </div>
1260 1286  
  1287 +
  1288 +
1261 1289 <!--Admin Form (Under Process)-->
1262 1290  
1263 1291  
... ...