diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5be3726..c20b37b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1322,6 +1322,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.skinTone = $rootScope.globalSetting.ethnicity; var SelectedLayerData = []; + //as the data statrs with zero index and we have layer 331 on 0 index in json so we get the + //desired layer data by using below line of code. SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1]; if ((SelectedLayerData != null || SelectedLayerData != undefined)) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 2d9f841..41d33a8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -995,6 +995,40 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = false; $('#setting-spinner').css('visibility', 'hidden'); + $scope.pinTermData = []; + var primaryLexicon = $rootScope.lexiconLanguageArray[0].id; + $scope.matchedLanguageTermData = new jinqJs() + .from($scope.AAPinTermData) + .where('_LanguageId == ' + primaryLexicon) + .select(); + + for (var i = 0; i < $scope.matchedLanguageTermData.length; i++) { + $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[i]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[i]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[i]._TermText }); + + } + $scope.$watch('$$scope.pinTermData', function (newValue, oldValue, scope) { + if ($('#termlistfilter').html() != "") + $('#termlistfilter').empty() + if ($scope.pinTermData.length > 0) { + $timeout(function () { + console.log('pinTermData= ' + $scope.pinTermData.length); + + for (var j = 0; j < $scope.pinTermData.length; j++) { + var $el = $('
  • '+$scope.pinTermData[j].TermTxt+'
  • ').appendTo('#termlistfilter') + $compile($el)($scope); + + } + + + //var $e2 = $('').appendTo('#searchListDivAA') + //$compile($e2)($scope); + + }, 500); + } + }) + }, function (error) { // handle errors here @@ -1120,7 +1154,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.showItemsForSearch = function () { - console.log('ShowSearch is called'); + console.log('showItemsForSearch is called'); //this check is for log only because we are writing length so need to check if its not null or undefined @@ -1128,19 +1162,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (($scope.AAPinTermData != null || $scope.AAPinTermData != undefined) && ($scope.AAPinTermData.length > 0)) { $scope.IsSearchVisible = true; - // document.getElementById("termlistfilter").style.display = "block"; + document.getElementById("termlistfilter").style.display = "block"; } else { $rootScope.loadSearchData(); if ($scope.AAPinTermData.length > 0) { - $scope.ShowSearch(); + $scope.showItemsForSearch(); } } if ($rootScope.isSearchInputClicked == true) { $rootScope.isSearchInputClicked = false; $rootScope.searchListArray = []; - $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { + $("#backdrop > #searchListDivAA > #termlistfilter > li").each(function (key, value) { $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") }); }); @@ -1176,10 +1210,10 @@ function showAllPins(event) { }); } -function onSearch(event) { - +function OnSearchAA(event) { + console.log('AA search is called') var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); scope.$apply(function () { - scope.showSItemsForearch(); + scope.showItemsForSearch(); }); } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html index 12a3869..92495bf 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html @@ -76,11 +76,11 @@ --> - +
    -
    - +
    +