Commit 0820419e5f6d911f76b3796bb56931ae5d83b1f2
Merge branch 'Develop' of http://gitlab.ebix.com/ADAM/AIAHTML5 into Develop
Showing
2 changed files
with
41 additions
and
32 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -56,6 +56,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
56 | 56 | $scope.isEligibleForHighlight = false; |
57 | 57 | $scope.doHighlightOrExtract = false; |
58 | 58 | $scope.isClickedOnBodyForHighlight; |
59 | + $scope.isSearchClicked = false; | |
59 | 60 | $scope.isEligibleForHighlightBodyByTermList = false; |
60 | 61 | |
61 | 62 | // $scope.AnteriorView = "active"; |
... | ... | @@ -816,7 +817,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
816 | 817 | }) |
817 | 818 | // $rootScope.languageArray = []; |
818 | 819 | $rootScope.loadSearchData = function () { |
819 | - var primaryLexiconIndex; | |
820 | + | |
821 | + $scope.primaryLexiconInd; | |
820 | 822 | var languageArray = []; |
821 | 823 | $rootScope.vocabTermDataArray = []; |
822 | 824 | var languageArray = $rootScope.lexiconLanguageArray; |
... | ... | @@ -871,13 +873,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
871 | 873 | |
872 | 874 | for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { |
873 | 875 | if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { |
874 | - primaryLexiconIndex = i; | |
876 | + $scope.primaryLexiconInd = i; | |
875 | 877 | } |
876 | 878 | } |
877 | 879 | //alert(primaryLexiconIndex); |
878 | - if ($rootScope.isListManagerMenuSelected) { | |
880 | + if ($rootScope.isListManagerMenuSelected ) { | |
879 | 881 | $scope.loadListManger(); |
880 | 882 | } |
883 | + else if ($scope.isSearchClicked) { | |
884 | + $scope.ShowSearch(); | |
885 | + } | |
881 | 886 | } |
882 | 887 | |
883 | 888 | |
... | ... | @@ -8898,28 +8903,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8898 | 8903 | |
8899 | 8904 | |
8900 | 8905 | $scope.ShowSearch = function () { |
8901 | - if (($rootScope.vocabTermDataArray != null || $rootScope.vocabTermDataArray != undefined) && ($rootScope.vocabTermDataArray.length > 0)) { | |
8902 | - var primaryLexiconIndex; | |
8903 | - for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { | |
8904 | - if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { | |
8905 | - primaryLexiconIndex = i; | |
8906 | - } | |
8907 | - } | |
8908 | - console.log('ShowSearch is called'); | |
8906 | + | |
8907 | + $scope.isSearchClicked = true; | |
8908 | + console.log('ShowSearch is called'); | |
8909 | + var primaryLexiconIndx = $scope.primaryLexiconInd; | |
8910 | + | |
8909 | 8911 | //this check is for log only because we are writing length so need to check if its not null or undefined |
8910 | - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) | |
8911 | - console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length) | |
8912 | + if ($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) | |
8913 | + console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length) | |
8912 | 8914 | |
8913 | 8915 | $timeout(function () { |
8914 | 8916 | |
8915 | - if (($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) { | |
8917 | + if (($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) { | |
8916 | 8918 | //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed |
8917 | 8919 | //Remove the list and then Repopulate |
8918 | 8920 | if ($('#searchListDiv').html() != "") |
8919 | - $('#searchListDiv').empty() | |
8921 | + $('#searchListDiv').empty(); | |
8920 | 8922 | //Delay compile of ul li so that the remove of li is completed. |
8921 | 8923 | $timeout(function () { |
8922 | - console.log("INSIDE WATCH. LIST IS CREATED"); | |
8924 | + | |
8923 | 8925 | $scope.isSearchDataLoaded = true; |
8924 | 8926 | |
8925 | 8927 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
... | ... | @@ -8944,12 +8946,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8944 | 8946 | |
8945 | 8947 | }, 500); |
8946 | 8948 | $scope.IsSearchVisible = true; |
8947 | - console.log("s" + $rootScope.vocabTermDataArray[primaryLexiconIndex].language); | |
8948 | - $rootScope.a = primaryLexiconIndex; | |
8949 | + console.log("primary language: " + $rootScope.vocabTermDataArray[primaryLexiconIndx].language); | |
8950 | + | |
8951 | + | |
8952 | + $rootScope.a = primaryLexiconIndx; | |
8949 | 8953 | var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' + |
8950 | 8954 | '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + |
8951 | 8955 | ' </li></ul>').appendTo('#searchListDiv') |
8952 | 8956 | $compile($e2)($scope); |
8957 | + | |
8958 | + console.log('termlistfilter is created and complied'); | |
8959 | + | |
8953 | 8960 | document.getElementById("termlistfilter").style.display = "block"; |
8954 | 8961 | $timeout(function () { |
8955 | 8962 | $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { |
... | ... | @@ -8969,19 +8976,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8969 | 8976 | } |
8970 | 8977 | else { |
8971 | 8978 | $rootScope.loadSearchData(); |
8972 | - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length > 0) { | |
8973 | - $scope.ShowSearch(); | |
8974 | - } | |
8979 | + //if ($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length > 0) { | |
8980 | + // $scope.ShowSearch(); | |
8981 | + //} | |
8975 | 8982 | } |
8976 | 8983 | }, 500); |
8977 | 8984 | |
8978 | - } | |
8979 | - else { | |
8980 | - $rootScope.loadSearchData(); | |
8981 | - $scope.ShowSearch(); | |
8982 | - | |
8983 | - | |
8984 | - } | |
8985 | + | |
8986 | + | |
8987 | + | |
8985 | 8988 | } |
8986 | 8989 | |
8987 | 8990 | |
... | ... | @@ -9119,7 +9122,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9119 | 9122 | }); |
9120 | 9123 | |
9121 | 9124 | $scope.loadListManger = function () { |
9122 | - var primaryLexiconIndex; | |
9125 | + var primaryLexiconIndex = $scope.primaryLexiconInd;; | |
9123 | 9126 | if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) { |
9124 | 9127 | |
9125 | 9128 | for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -516,6 +516,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
516 | 516 | $rootScope.aaPinDataArray = []; |
517 | 517 | $rootScope.isShowSelectedSystemPinsClicked = false; |
518 | 518 | $scope.showAllPins = function () { |
519 | + | |
519 | 520 | $scope.allPinDataArray = []; |
520 | 521 | var promise = ModuleService.getPinDataForImage($rootScope.imageName) |
521 | 522 | .then( |
... | ... | @@ -530,7 +531,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
530 | 531 | document.getElementById('navigatorDiv').style.visibility = 'hidden'; |
531 | 532 | |
532 | 533 | } |
534 | + | |
533 | 535 | //draw pins |
536 | + | |
537 | + | |
534 | 538 | $scope.aaPinData = result.data.Root.Item; |
535 | 539 | if ($scope.aaPinData != null && $scope.aaPinData.length > 0) { |
536 | 540 | $rootScope.aaPinDataArray = $scope.aaPinData |
... | ... | @@ -771,7 +775,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
771 | 775 | $scope.isBodySystemSelected = false; |
772 | 776 | $scope.SelectedSystemTitle = "Current Structure"; |
773 | 777 | $scope.showSelectedSystemPins = function (event) { |
774 | - | |
778 | + | |
775 | 779 | if (typeof event == "object") { |
776 | 780 | if (event.currentTarget.title == $("#bodySystemList li.activeAASystemSelect a").attr("title")) { |
777 | 781 | |
... | ... | @@ -809,6 +813,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
809 | 813 | $scope.showAllPinsAfterHide(); |
810 | 814 | } |
811 | 815 | else { |
816 | + //#30499 : Atlas Anatomy > All Pins are not appeared on the body system even after selecting the Body System: All | |
817 | + $('#aaDetailViewCanvas').removeLayers(); | |
812 | 818 | $scope.showAllPins(); |
813 | 819 | } |
814 | 820 | } |
... | ... | @@ -839,7 +845,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
839 | 845 | if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) { |
840 | 846 | |
841 | 847 | angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) { |
842 | - | |
848 | + | |
843 | 849 | if (aaPinDataValue._BodySystemName != $scope.selectedSystemName) |
844 | 850 | { |
845 | 851 | $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId); |
... | ... | @@ -1384,7 +1390,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1384 | 1390 | |
1385 | 1391 | |
1386 | 1392 | $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { |
1387 | - | |
1393 | + | |
1388 | 1394 | //if ($scope.isSearchOptionClicked == true) { |
1389 | 1395 | // $scope.clickedPins = []; |
1390 | 1396 | // $scope.isSearchOptionClicked = false; | ... | ... |