Commit 4c11c348dd7551f363f8a2e83a97d5c80cdaca1a

Authored by Pratibha Raturi
1 parent 0585407e

Fixed Bug 22814

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -148,6 +148,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
148 148 $scope.currentTitleFromJson;
149 149 $scope.showTabButton = false;
150 150  
  151 +
  152 +
  153 +
  154 +
151 155 $scope.IsVisible = function () {
152 156 $scope.scroll();
153 157  
... ... @@ -2060,7 +2064,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
2060 2064 var canvasDiv = document.getElementById('canvasDiv');
2061 2065 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
2062 2066 if ($scope.isLayerChange == true) {
2063   - $scope.isLayerChange = false;
  2067 + $scope.isLayerChange = false;
2064 2068 }
2065 2069  
2066 2070 if (evt.ctrlKey) {
... ... @@ -3021,7 +3025,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
3021 3025  
3022 3026  
3023 3027 $scope.HighlightBodyByTermListForBodySystem = function (TermList) {
3024   -
  3028 +
3025 3029 $scope.isScrolledToHighlightedBR = false;
3026 3030 //disable the background till the system gets highlighted.
3027 3031 $scope.DisableUI();
... ... @@ -3400,7 +3404,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
3400 3404 var annotationText;
3401 3405 var annotation = [];
3402 3406 //0
3403   - var figLeafTermNo = 5868; // to do declare constant for this
  3407 + var figLeafTermNo = 5868;
3404 3408  
3405 3409 if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
3406 3410 $scope.TermNumber = termNumber;
... ... @@ -4953,8 +4957,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
4953 4957  
4954 4958 var tranparencyLayer;
4955 4959  
4956   - var currentLayer = $scope.layerNumberBeforeTBDraw;
4957   -
  4960 + var currentLayer = $scope.layerNumberBeforeTBDraw;
4958 4961 if (currentLayer == $rootScope.totalLayers) {
4959 4962  
4960 4963 tranparencyLayer = currentLayer;
... ... @@ -8506,32 +8509,33 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
8506 8509 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
8507 8510 $(".custom-tooltip").toggle();
8508 8511 }
  8512 + //START BUG#22814
  8513 + // Here updating structureDropdown with the mapped values only on the basis of BodyViewID
  8514 +
  8515 + var systemNumberByViewID = new jinqJs()
  8516 + .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
  8517 + .distinct('_SystemNumber')
  8518 + .orderBy([{ field: '_SystemNumber', sort: 'asc' }])
  8519 + .select('_SystemNumber');
  8520 +
  8521 +
  8522 + $('#structureDropdown').html("");
8509 8523 var currentBodyViewId = $rootScope.voId;
8510   - var systemListHtml = '<ul class="dropdown-menu" aria-labelledby="dropdownMenu2"><li><a href="#" title="Current Structure">Current Structure</a></li> <li role="separator" class="divider"></li>'
  8524 + var systemListHtml = '<li><a href="#" title="Current Structure">Current Structure</a></li> <li role="separator" class="divider"></li>'
8511 8525 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
8512 8526  
8513 8527 angular.forEach(systemList, function (value, key) {
8514   -
8515   - systemListHtml = systemListHtml + '<li><a href="#" id="' + value._BodySystemId + '" title="' + value._Name + '">' + value._Name + '</a></li>'
  8528 + angular.forEach(systemNumberByViewID, function (valueSystemNumber, keySystemNumber) {
  8529 + if (value._BodySystemId == valueSystemNumber._SystemNumber) {
  8530 + systemListHtml = systemListHtml + '<li><a href="#" id="' + value._BodySystemId + '" title="' + value._Name + '" onclick="OnBodySystemSelection(event)">' + value._Name + '</a></li>'
  8531 + }
  8532 + })
8516 8533 })
8517 8534  
8518   - systemListHtml = systemListHtml + '</ul>';
8519   - $('#bodySystem').append(systemListHtml);
8520   -
8521   -
8522   - // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
8523   - // DataService.getJson(bodySystemDataPath)
8524   - //.then(
8525   - // function (result) {
8526   -
8527   - // $rootScope.BodySystemData = result;
8528   -
8529   - // },
8530   - // function (error) {
8531   - // console.log(error.statusText)
8532   - // }
8533   - // )
  8535 + systemListHtml = systemListHtml;
8534 8536  
  8537 + //END BUG#22814
  8538 + $('#structureDropdown').append(systemListHtml);
8535 8539 }
8536 8540  
8537 8541 $scope.GetBodySystemData = function (currentBodyViewId) {
... ... @@ -9891,7 +9895,7 @@ function OnViewChange(event) {
9891 9895 function OnBodySystemSelection(event) {
9892 9896 console.log('OnBodySystem chnaged is called outside ');
9893 9897 var scope = angular.element(document.getElementById("daView")).scope();
9894   -
  9898 +
9895 9899  
9896 9900 scope.$apply(function () {
9897 9901 scope.HighlightBodyByBodySystem(event);
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -169,40 +169,7 @@
169 169 <div class="col-xs-6 dropdown hover-tool">
170 170 <div class="custom-tooltip">Highlight Options</div>
171 171 <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" ng-click="LoadBodySystemData($event)"><img src="content/images/icon-highlight.png" alt="" title=""></button>
172   - <ul class="dropdown-menu" id="structureDropdown">
173   - <li ng-class="CurrentStructure">
174   - <a href="#" title="Current Structure"
175   - onclick="OnBodySystemSelection(event)">Current Structure</a>
176   - </li>
177   -
178   -
179   - <li role="separator" class="divider"></li>
180   - <!--<li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" ng-click="HighlightBodyByBodySystem($event)">Cardiovascular</a></li>
181   - <li ng-class="Digestive"><a href="#" title="Digestive" id="2" ng-click="HighlightBodyByBodySystem($event)">Digestive</a></li>
182   - <li ng-class="Endocrine"><a href="#" title="Endocrine" id="3" ng-click="HighlightBodyByBodySystem($event)">Endocrine</a></li>
183   - <li ng-class="Immune"><a href="#" title="Immune" id="4" ng-click="HighlightBodyByBodySystem($event)">Immune</a></li>
184   - <li ng-class="Integumentary"><a href="#" title="Integumentary" id="5" ng-click="HighlightBodyByBodySystem($event)">Integumentary</a></li>
185   - <li ng-class="Lymphatic"><a href="#" title="Lymphatic" id="6" ng-click="HighlightBodyByBodySystem($event)">Lymphatic</a></li>
186   - <li ng-class="Muscular"><a href="#" title="Muscular" id="7" ng-click="HighlightBodyByBodySystem($event)">Muscular</a></li>
187   - <li ng-class="Nervous"><a href="#" title="Nervous" id="8" ng-click="HighlightBodyByBodySystem($event)">Nervous</a></li>
188   - <li ng-class="Reproductive"><a href="#" title="Reproductive" id="9" ng-click="HighlightBodyByBodySystem($event)">Reproductive</a></li>
189   - <li ng-class="Respiratory"><a href="#" title="Respiratory" id="10" ng-click="HighlightBodyByBodySystem($event)">Respiratory</a></li>
190   - <li ng-class="Skeletal"><a href="#" title="Skeletal" id="11" ng-click="HighlightBodyByBodySystem($event)">Skeletal</a></li>
191   - <li ng-class="Urinary"><a href="#" title="Urinary" id="12" ng-click="HighlightBodyByBodySystem($event)">Urinary</a></li>-->
192   -
193   - <li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" onclick="OnBodySystemSelection(event)">Cardiovascular</a></li>
194   - <li ng-class="Digestive"><a href="#" title="Digestive" id="2" onclick="OnBodySystemSelection(event)">Digestive</a></li>
195   - <li ng-class="Endocrine"><a href="#" title="Endocrine" id="3" onclick="OnBodySystemSelection(event)">Endocrine</a></li>
196   - <li ng-class="Immune"><a href="#" title="Immune" id="4" onclick="OnBodySystemSelection(event)">Immune</a></li>
197   - <li ng-class="Integumentary"><a href="#" title="Integumentary" id="5" onclick="OnBodySystemSelection(event)">Integumentary</a></li>
198   - <li ng-class="Lymphatic"><a href="#" title="Lymphatic" id="6" onclick="OnBodySystemSelection(event)">Lymphatic</a></li>
199   - <li ng-class="Muscular"><a href="#" title="Muscular" id="7" onclick="OnBodySystemSelection(event)">Muscular</a></li>
200   - <li ng-class="Nervous"><a href="#" title="Nervous" id="8" onclick="OnBodySystemSelection(event)">Nervous</a></li>
201   - <li ng-class="Reproductive"><a href="#" title="Reproductive" id="9" onclick="OnBodySystemSelection(event)">Reproductive</a></li>
202   - <li ng-class="Respiratory"><a href="#" title="Respiratory" id="10" onclick="OnBodySystemSelection(event)">Respiratory</a></li>
203   - <li ng-class="Skeletal"><a href="#" title="Skeletal" id="11" onclick="OnBodySystemSelection(event)">Skeletal</a></li>
204   - <li ng-class="Urinary"><a href="#" title="Urinary" id="12" onclick="OnBodySystemSelection(event)">Urinary</a></li>
205   - </ul>
  172 + <ul class="dropdown-menu" id="structureDropdown"></ul>
206 173 </div>
207 174 </div>
208 175  
... ...